webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
WebIconDatabase.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005 Apple Inc. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  *
8  * 1. Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above copyright
11  * notice, this list of conditions and the following disclaimer in the
12  * documentation and/or other materials provided with the distribution.
13  * 3. Neither the name of Apple Inc. ("Apple") nor the names of
14  * its contributors may be used to endorse or promote products derived
15  * from this software without specific prior written permission.
16  *
17  * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
18  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20  * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
21  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27  */
28 
29 #if TARGET_OS_IPHONE
30 #import <Foundation/Foundation.h>
31 #else
32 #import <Cocoa/Cocoa.h>
33 #endif
34 
35 // Sent whenever a site icon has changed. The object of the notification is the icon database.
36 // The userInfo contains the site URL whose icon has changed.
37 // It can be accessed with the key WebIconNotificationUserInfoURLKey.
39 
41 
44 
45 extern NSSize WebIconSmallSize; // 16 x 16
46 extern NSSize WebIconMediumSize; // 32 x 32
47 extern NSSize WebIconLargeSize; // 128 x 128
48 
50 
68 @interface WebIconDatabase : NSObject {
69 
70 @private
71  WebIconDatabasePrivate *_private;
72 }
73 
74 
80 
81 #if !TARGET_OS_IPHONE
82 
86 - (NSImage *)iconForURL:(NSString *)URL withSize:(NSSize)size;
87 
95 - (NSImage *)iconForURL:(NSString *)URL withSize:(NSSize)size cache:(BOOL)cache;
96 #endif
97 
103 
104 #if !TARGET_OS_IPHONE
105 
108 - (NSImage *)defaultIconWithSize:(NSSize)size;
109 - (NSImage *)defaultIconForURL:(NSString *)URL withSize:(NSSize)size;
110 #endif
111 
117 
123 
131 
139 
140 - (void)setDelegate:(id)delegate;
141 - (id)delegate;
142 
143 @end
WebIconDatabase * sharedIconDatabase()
Definition: WebIconDatabase.mm:98
BOOL
Definition: PlatformScreenIOS.mm:46
#define size
Definition: float-mm.c:27
EGLStreamKHR EGLint EGLint EGLint size
Definition: eglext.h:984
void allowDatabaseCleanup()
Definition: WebIconDatabase.mm:199
OBJC_CLASS NSImage
Definition: WebCoreSystemInterface.h:102
NSString * WebIconDatabaseDirectoryDefaultsKey
Definition: WebIconDatabase.mm:56
Definition: WebIconDatabase.mm:460
void delayDatabaseCleanup()
Definition: WebIconDatabase.mm:194
virtual HRESULT STDMETHODCALLTYPE releaseIconForURL(_In_ BSTR)
Definition: WebIconDatabase.cpp:206
virtual HRESULT STDMETHODCALLTYPE iconForURL(_In_ BSTR url, _In_ LPSIZE, BOOL cache, __deref_opt_out HBITMAP *image)
Definition: WebIconDatabase.cpp:164
NSSize WebIconMediumSize
Definition: WebIconDatabase.mm:62
virtual HRESULT STDMETHODCALLTYPE iconURLForURL(_In_ BSTR url, __deref_opt_out BSTR *iconURL)
Definition: WebIconDatabase.cpp:230
RequestCache cache
Definition: FetchRequest.idl:45
void
Definition: AVFoundationCFSoftLinking.h:81
GLenum GLuint id
Definition: gl2ext.h:134
id delegate()
Definition: WebIconDatabase.mm:210
NSString * WebIconDatabaseEnabledDefaultsKey
Definition: WebIconDatabase.mm:57
struct NSString NSString
Definition: WebCoreNSStringExtras.h:35
Definition: WebIconDatabase.h:68
virtual HRESULT STDMETHODCALLTYPE defaultIconWithSize(_In_ LPSIZE, __deref_opt_out HBITMAP *result)
Definition: WebIconDatabase.cpp:189
NSString * WebIconNotificationUserInfoURLKey
Definition: WebIconDatabase.mm:53
NSSize WebIconSmallSize
Definition: WebIconDatabase.mm:61
NSSize WebIconLargeSize
Definition: WebIconDatabase.mm:63
virtual HRESULT STDMETHODCALLTYPE retainIconForURL(_In_ BSTR)
Definition: WebIconDatabase.cpp:200
CFAllocatorRef CFURLRef URL
Definition: AVFoundationCFSoftLinking.h:225
NSString * WebIconDatabaseDidAddIconNotification
Definition: WebIconDatabase.mm:52
Definition: cache.py:1