WebCore:
authorbeidson <beidson@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 9 Oct 2006 22:24:19 +0000 (22:24 +0000)
committerbeidson <beidson@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 9 Oct 2006 22:24:19 +0000 (22:24 +0000)
        Reviewed by Maciej

        Tiny changes to help reorganize WebFrameLoader code in WebKit

        * bridge/mac/WebCoreIconDatabaseBridge.h: Added "createInstance"
        * bridge/mac/WebCoreIconDatabaseBridge.mm:
        (+[WebCoreIconDatabaseBridge sharedInstance]): Added, uses createInstance from WebKit side

WebKit:

        Reviewed by Maciej

        Fix to elminate WebIconDatabaseBridge.h from WebFrameLoader

        * Loader/WebFrameLoader.m:
        (-[WebFrameLoader _notifyIconChanged:]):
        * WebCoreSupport/WebIconDatabaseBridge.m:
        (+[WebIconDatabaseBridge createInstance]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@16941 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/bridge/mac/WebCoreIconDatabaseBridge.h
WebCore/bridge/mac/WebCoreIconDatabaseBridge.mm
WebKit/ChangeLog
WebKit/Loader/WebFrameLoader.m
WebKit/WebCoreSupport/WebIconDatabaseBridge.m

index c2fedc2c210185f1e45c5de34a3fc9c19a0e98f5..b0fde51b015eba8c57fa60e631d48ea9ba6da77c 100644 (file)
@@ -1,3 +1,13 @@
+2006-10-09  Brady Eidson  <beidson@apple.com>
+
+        Reviewed by Maciej
+
+        Tiny changes to help reorganize WebFrameLoader code in WebKit
+
+        * bridge/mac/WebCoreIconDatabaseBridge.h: Added "createInstance"
+        * bridge/mac/WebCoreIconDatabaseBridge.mm:
+        (+[WebCoreIconDatabaseBridge sharedInstance]): Added, uses createInstance from WebKit side
+
 2006-10-09  Adam Roben  <aroben@apple.com>
 
         Reviewed by Adele.
index 76ce0dccc05bc06d54ecda7d983a86f9ccede811..ac9305dd9b337700adc893f2290f94d1d0f900b0 100644 (file)
@@ -35,6 +35,8 @@ typedef WebCore::IconDatabase WebCoreIconDatabase;
 @interface WebCoreIconDatabaseBridge : NSObject 
 {
 }
++ (WebCoreIconDatabaseBridge *)sharedInstance;
+
 - (BOOL)openSharedDatabaseWithPath:(NSString *)path;
 - (void)closeSharedDatabase;
 - (BOOL)isOpen;
@@ -66,7 +68,7 @@ typedef WebCore::IconDatabase WebCoreIconDatabase;
 // The WebCoreIconDatabaseBridge protocol contains methods for use by the WebCore side of the bridge.
 
 @protocol WebCoreIconDatabaseBridge
-+ (WebCoreIconDatabaseBridge *)sharedInstance;
++ (WebCoreIconDatabaseBridge *)createInstance;
 @end
 
 // This interface definition allows those who hold a WebCoreIconDatabaseBridge * to call all the methods
index 4037416e2a9ce60557252d45c4c822e98724566f..e13817a6932090d4eccae073bf37074b5fa2d5fb 100644 (file)
@@ -188,5 +188,18 @@ using namespace WebCore;
     return IconDatabase::sharedIconDatabase()->enabled();
 }
 
++ (WebCoreIconDatabaseBridge *)sharedInstance
+{
+    static WebCoreIconDatabaseBridge* bridge = nil;
+
+    if (bridge == nil) {
+        bridge = [self createInstance];
+        // Need to CFRetain something that's in a global variable, since we want it to
+        // hang around forever, even when running under GC.
+        CFRetain(bridge);
+        [bridge release];
+    }
+    return bridge;
+}
 
 @end
index b4c761c02eddf62a2b9d3a540bcb8233cb046c3a..84a3f149c39b62da798cc2d5d93581caecae8a66 100644 (file)
@@ -1,3 +1,14 @@
+2006-10-09  Brady Eidson  <beidson@apple.com>
+
+        Reviewed by Maciej
+
+        Fix to elminate WebIconDatabaseBridge.h from WebFrameLoader
+
+        * Loader/WebFrameLoader.m:
+        (-[WebFrameLoader _notifyIconChanged:]):
+        * WebCoreSupport/WebIconDatabaseBridge.m:
+        (+[WebIconDatabaseBridge createInstance]):
+
 2006-10-09  Maciej Stachowiak  <mjs@apple.com>
 
         Reviewed by Darin.
index 6462066808e553c7490615904b0f6b49aba047aa..dc6e5887ba290e258814c7e07efe4e96720e9f1e 100644 (file)
@@ -37,8 +37,7 @@
 #import <JavaScriptCore/Assertions.h>
 #import <WebKit/DOMHTML.h>
 #import <WebCore/WebCoreFrameBridge.h>
-#import "WebIconDatabaseBridge.h"
-//#import <WebCore/WebCoreIconDatabaseBridge.h>
+#import <WebCore/WebCoreIconDatabaseBridge.h>
 #import <WebCore/WebCoreSystemInterface.h>
 
 #import "WebFrameInternal.h"
@@ -854,8 +853,8 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
 
 - (void)_notifyIconChanged:(NSURL *)iconURL
 {
-    ASSERT([[WebIconDatabaseBridge sharedInstance] _isEnabled]);
-    NSImage *icon = [[WebIconDatabaseBridge sharedInstance]
+    ASSERT([[WebCoreIconDatabaseBridge sharedInstance] _isEnabled]);
+    NSImage *icon = [[WebCoreIconDatabaseBridge sharedInstance]
         iconForPageURL:[[[self activeDocumentLoader] URL] _web_originalDataAsString]
         withSize:NSMakeSize(16, 16)];
     [client _dispatchDidReceiveIcon:icon];
index ccca3ee482a488b54932b5eb8708379d9dc323d6..e11b6ccd9d0f04e3a5da3b7b99ad51e8683d74ec 100644 (file)
     [super _setHaveNoIconForIconURL:iconURL];
 }
 
-+ (WebCoreIconDatabaseBridge *)sharedInstance
-{
-    static WebCoreIconDatabaseBridge* bridge = nil;
-    if (!bridge) {
-        // Need to CFRetain something that's in a global variable, since we want it to
-        // hang around forever, even when running under GC.
-        bridge = [[WebIconDatabaseBridge alloc] _init];
-        CFRetain(bridge);
-        [bridge release];
-    }
-    return bridge;
++ (WebCoreIconDatabaseBridge *)createInstance
+{    
+    return [[WebIconDatabaseBridge alloc] _init];
 }
 
 - (void)dealloc