Reviewed by Anders Carlsson.
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 23 Oct 2010 22:17:20 +0000 (22:17 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 23 Oct 2010 22:17:20 +0000 (22:17 +0000)
        https://bugs.webkit.org/show_bug.cgi?id=48083
        <rdar://problem/8489082> Need WebKit2 API for private browsing (48083)

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

32 files changed:
WebCore/ChangeLog
WebCore/GNUmakefile.am
WebCore/WebCore.exp.in
WebCore/WebCore.gypi
WebCore/WebCore.pro
WebCore/WebCore.vcproj/WebCore.vcproj
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/page/Settings.cpp
WebCore/page/Settings.h
WebCore/platform/android/TemporaryLinkStubs.cpp
WebCore/platform/chromium/TemporaryLinkStubs.cpp
WebCore/platform/efl/TemporaryLinkStubs.cpp
WebCore/platform/gtk/TemporaryLinkStubs.cpp
WebCore/platform/haiku/TemporaryLinkStubs.cpp
WebCore/platform/mac/WebCoreSystemInterface.h
WebCore/platform/mac/WebCoreSystemInterface.mm
WebCore/platform/network/CookieStorage.h [new file with mode: 0644]
WebCore/platform/network/cf/CookieStorageCFNet.cpp
WebCore/platform/network/cf/CookieStorageCFNet.h
WebCore/platform/network/mac/CookieStorageMac.mm [new file with mode: 0644]
WebCore/platform/qt/TemporaryLinkStubsQt.cpp
WebKit/mac/ChangeLog
WebKit/mac/WebCoreSupport/WebSystemInterface.mm
WebKit2/ChangeLog
WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm
WebKitLibraries/ChangeLog
WebKitLibraries/WebKitSystemInterface.h
WebKitLibraries/libWebKitSystemInterfaceLeopard.a
WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a
WebKitLibraries/win/include/WebKitSystemInterface/WebKitSystemInterface.h
WebKitLibraries/win/lib/WebKitSystemInterface.lib
WebKitLibraries/win/lib/WebKitSystemInterface_debug.lib

index 0fce9b1..9bdf778 100644 (file)
@@ -1,3 +1,56 @@
+2010-10-23  Alexey Proskuryakov  <ap@apple.com>
+
+        Reviewed by Anders Carlsson.
+
+        https://bugs.webkit.org/show_bug.cgi?id=48083
+        <rdar://problem/8489082> Need WebKit2 API for private browsing (48083)
+
+        * GNUmakefile.am:
+        * WebCore.gypi:
+        * WebCore.pro:
+        * WebCore.vcproj/WebCore.vcproj:
+        Added CookieStorage.h to build files that contain headers.
+
+        * WebCore.xcodeproj/project.pbxproj: Added CookieStorage.h and CookieStorageMac.mm.
+
+        * WebCore.exp.in: Export _wkSetCookieStoragePrivateBrowsingEnabled (WebKit initializes WKSI
+        on WebCore's behalf).
+
+        * platform/mac/WebCoreSystemInterface.h:
+        * platform/mac/WebCoreSystemInterface.mm:
+        More work for passing the function pointer down to WebCore.
+
+        * page/Settings.cpp: (WebCore::Settings::setPrivateBrowsingEnabled): Tell cookie manager to
+        when to use private browsing mode. Note that although this is a per-page setting, it
+        actually has global effect.
+
+        * page/Settings.h: Extended a comment about what private browsing does.
+
+        * platform/android/TemporaryLinkStubs.cpp: (setCookieStoragePrivateBrowsingEnabled):
+        * platform/chromium/TemporaryLinkStubs.cpp: (WebCore::setCookieStoragePrivateBrowsingEnabled):
+        * platform/efl/TemporaryLinkStubs.cpp: (WebCore::setCookieStoragePrivateBrowsingEnabled):
+        * platform/gtk/TemporaryLinkStubs.cpp: (WebCore::setCookieStoragePrivateBrowsingEnabled):
+        * platform/haiku/TemporaryLinkStubs.cpp: (WebCore::setCookieStoragePrivateBrowsingEnabled):
+        * platform/qt/TemporaryLinkStubsQt.cpp: (WebCore::setCookieStoragePrivateBrowsingEnabled):
+        Added an empty implementation for ports that don't implement private browsing, or implement
+        it in ways I cannot discover.
+
+        * platform/network/CookieStorage.h: Added. I'm not entirely sure how this is different from
+        CookieJar.h, just following a precedent already set by Windows port with CookieStorageWin.h.
+
+        * platform/network/mac/CookieStorageMac.mm: Added.
+        (WebCore::setCookieStoragePrivateBrowsingEnabled): Call a WKSI function to enable private
+        browsing mode for cookies.
+
+        * platform/network/cf/CookieStorageCFNet.cpp:
+        (WebCore::currentCookieStorage): Added ASSERT(isMainThread()).
+        (WebCore::setCurrentCookieStorage): Ditto.
+        (WebCore::setCookieStoragePrivateBrowsingEnabled): Set cookie storage to a private one
+        when in private browsing mode. ResourceHandle applies the storage to each individual request.
+
+        * platform/network/cf/CookieStorageCFNet.h: Added a comment explaining that these functions
+        are only for WebKit1.
+
 2010-10-23  David Kilzer  <ddkilzer@apple.com>
 
         <http://webkit.org/b/48181> Add missing include of MacErrors.h
index 26b692d..c9689f7 100644 (file)
@@ -2372,6 +2372,7 @@ webcore_sources += \
        WebCore/platform/network/BlobResourceHandle.cpp \
        WebCore/platform/network/BlobResourceHandle.h \
        WebCore/platform/network/BlobStorageData.h \
+       WebCore/platform/network/CookieStorage.h \
        WebCore/platform/network/Credential.cpp \
        WebCore/platform/network/Credential.h \
        WebCore/platform/network/DNS.h \
index a58699f..233de29 100644 (file)
@@ -1178,6 +1178,7 @@ _wkQTMovieViewSetDrawSynchronously
 _wkSetCGFontRenderingMode
 _wkSetCONNECTProxyAuthorizationForStream
 _wkSetCONNECTProxyForStream
+_wkSetCookieStoragePrivateBrowsingEnabled
 _wkSetDragImage
 _wkSetNSURLConnectionDefersCallbacks
 _wkSetNSURLRequestShouldContentSniff
index 4a417f3..ddde4fd 100644 (file)
             'platform/network/BlobData.h',
             'platform/network/BlobRegistry.h',
             'platform/network/BlobStorageData.h',
+            'platform/network/CookieStorage.h',
             'platform/network/Credential.cpp',
             'platform/network/Credential.h',
             'platform/network/DNS.h',
index b6ac4ae..bf31b67 100644 (file)
@@ -2103,6 +2103,7 @@ HEADERS += \
     platform/network/BlobRegistryImpl.h \
     platform/network/BlobResourceHandle.h \
     platform/network/BlobStorageData.h \
+    platform/network/CookieStorage.h \
     platform/network/Credential.h \
     platform/network/FormDataBuilder.h \
     platform/network/FormData.h \
index bd669fa..629baed 100644 (file)
                                        >\r
                                </File>\r
                                <File\r
+                                       RelativePath="..\platform\network\CookieStorage.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
                                        RelativePath="..\platform\network\Credential.cpp"\r
                                        >\r
                                </File>\r
index 9e3abd4..8f09b8b 100644 (file)
                E1284BD61044A01E00EAEB52 /* DOMPageTransitionEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = E1284BD41044A01E00EAEB52 /* DOMPageTransitionEvent.h */; };
                E12EDB7B0B308A78002704B6 /* EventTarget.h in Headers */ = {isa = PBXBuildFile; fileRef = E12EDB7A0B308A78002704B6 /* EventTarget.h */; settings = {ATTRIBUTES = (Private, ); }; };
                E12EDBEA0B308E0B002704B6 /* EventTarget.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E12EDBE90B308E0B002704B6 /* EventTarget.cpp */; };
+               E13F01EB1270E10D00DFBA71 /* CookieStorage.h in Resources */ = {isa = PBXBuildFile; fileRef = E13F01EA1270E10D00DFBA71 /* CookieStorage.h */; };
+               E13F01F11270E19000DFBA71 /* CookieStorageMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = E13F01F01270E19000DFBA71 /* CookieStorageMac.mm */; };
                E15A36D71104572000B7B639 /* XMLNSNames.h in Headers */ = {isa = PBXBuildFile; fileRef = E15A36D61104572000B7B639 /* XMLNSNames.h */; };
                E15A36D91104572700B7B639 /* XMLNSNames.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E15A36D81104572700B7B639 /* XMLNSNames.cpp */; };
                E169803D1133542D00894115 /* CRuntimeObject.h in Headers */ = {isa = PBXBuildFile; fileRef = E169803C1133542D00894115 /* CRuntimeObject.h */; };
                E1284BD41044A01E00EAEB52 /* DOMPageTransitionEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMPageTransitionEvent.h; sourceTree = "<group>"; };
                E12EDB7A0B308A78002704B6 /* EventTarget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EventTarget.h; sourceTree = "<group>"; };
                E12EDBE90B308E0B002704B6 /* EventTarget.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EventTarget.cpp; sourceTree = "<group>"; };
+               E13F01EA1270E10D00DFBA71 /* CookieStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CookieStorage.h; sourceTree = "<group>"; };
+               E13F01F01270E19000DFBA71 /* CookieStorageMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CookieStorageMac.mm; sourceTree = "<group>"; };
                E15A36D61104572000B7B639 /* XMLNSNames.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XMLNSNames.h; sourceTree = "<group>"; };
                E15A36D81104572700B7B639 /* XMLNSNames.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XMLNSNames.cpp; sourceTree = "<group>"; };
                E169803C1133542D00894115 /* CRuntimeObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CRuntimeObject.h; sourceTree = "<group>"; };
                                2EB4BCD1121F03E300EC4885 /* BlobResourceHandle.h */,
                                2EDEF1F2121B0EFC00726DB2 /* BlobStorageData.h */,
                                514C76580CE923A1007EF3CD /* Credential.cpp */,
+                               E13F01EA1270E10D00DFBA71 /* CookieStorage.h */,
                                514C76590CE923A1007EF3CD /* Credential.h */,
                                51A052321058774F00CC9E95 /* CredentialStorage.cpp */,
                                51A052311058774F00CC9E95 /* CredentialStorage.h */,
                                934F71430D5A6F5300018D69 /* AuthenticationChallenge.h */,
                                514C76420CE9234E007EF3CD /* AuthenticationMac.h */,
                                514C76430CE9234E007EF3CD /* AuthenticationMac.mm */,
+                               E13F01F01270E19000DFBA71 /* CookieStorageMac.mm */,
                                E1B4CD2410B322E200BFFD7E /* CredentialStorageMac.mm */,
                                514C76440CE9234E007EF3CD /* FormDataStreamMac.h */,
                                514C76450CE9234E007EF3CD /* FormDataStreamMac.mm */,
                                85136CA80AED665900F90A3D /* westResizeCursor.png in Resources */,
                                1AB1AE7A0C051FDE00139F4F /* zoomInCursor.png in Resources */,
                                1AB1AE7B0C051FDE00139F4F /* zoomOutCursor.png in Resources */,
+                               E13F01EB1270E10D00DFBA71 /* CookieStorage.h in Resources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                                9728C3131268E4390041E89B /* MarkupAccumulator.cpp in Sources */,
                                E18772F1126E2629003DD586 /* Language.cpp in Sources */,
                                7A1F2B52126C61B20006A7E6 /* InspectorClient.cpp in Sources */,
+                               E13F01F11270E19000DFBA71 /* CookieStorageMac.mm in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
index 3c95b59..dc8fcb5 100644 (file)
@@ -28,6 +28,7 @@
 
 #include "BackForwardList.h"
 #include "CachedResourceLoader.h"
+#include "CookieStorage.h"
 #include "DOMTimer.h"
 #include "Database.h"
 #include "Frame.h"
@@ -312,6 +313,9 @@ void Settings::setPrivateBrowsingEnabled(bool privateBrowsingEnabled)
     if (m_privateBrowsingEnabled == privateBrowsingEnabled)
         return;
 
+    // FIXME: We can only enable cookie private browsing mode globally, so it's misleading to have it as a per-page setting.
+    setCookieStoragePrivateBrowsingEnabled(privateBrowsingEnabled);
+
     m_privateBrowsingEnabled = privateBrowsingEnabled;
     m_page->privateBrowsingStateChanged();
 }
index c217a0d..a8018dd 100644 (file)
@@ -147,6 +147,8 @@ namespace WebCore {
         //  - Application Cache
         //  - Back/Forward Page History
         //  - Page Search Results
+        //  - HTTP Cookies
+        //  - Plug-ins (that support NPNVprivateModeBool)
         void setPrivateBrowsingEnabled(bool);
         bool privateBrowsingEnabled() const { return m_privateBrowsingEnabled; }
 
index fe4514b..a4d0a95 100644 (file)
@@ -36,6 +36,7 @@
 #include "ContextMenu.h"
 #include "ContextMenuItem.h"
 #include "CookieJar.h"
+#include "CookieStorage.h"
 #include "Cursor.h"
 #include "Database.h"
 #include "DocumentFragment.h"
@@ -500,4 +501,9 @@ OpaqueJSClassContextData::~OpaqueJSClassContextData()
     notImplemented();
 }
 
+void setCookieStoragePrivateBrowsingEnabled(bool)
+{
+    notImplemented();
+}
+
 #endif
index 1f60d95..3c747d0 100644 (file)
@@ -30,6 +30,7 @@
 
 #include "config.h"
 
+#include "CookieStorage.h"
 #include "KURL.h"
 #include "NotImplemented.h"
 #include "SharedBuffer.h"
@@ -48,4 +49,9 @@ PassRefPtr<SharedBuffer> SharedBuffer::createWithContentsOfFile(const String&)
     return 0;
 }
 
+void setCookieStoragePrivateBrowsingEnabled(bool)
+{
+    notImplemented();
+}
+
 } // namespace WebCore
index 24f1111..ef6e6f7 100644 (file)
@@ -30,6 +30,7 @@
 #include "config.h"
 
 #include "AXObjectCache.h"
+#include "CookieStorage.h"
 #include "Editor.h"
 #include "FTPDirectoryDocument.h"
 #include "FrameView.h"
@@ -61,5 +62,10 @@ float userIdleTime()
     return FLT_MAX;
 }
 
+void setCookieStoragePrivateBrowsingEnabled(bool)
+{
+    notImplemented();
+}
+
 }
 
index 8c12fcb..5c27080 100644 (file)
@@ -28,6 +28,7 @@
 #include "config.h"
 
 #include "AXObjectCache.h"
+#include "CookieStorage.h"
 #include "DNS.h"
 #include "Editor.h"
 #include "FrameView.h"
@@ -46,5 +47,6 @@ namespace WebCore {
 void getSupportedKeySizes(Vector<String>&) { notImplemented(); }
 String signedPublicKeyAndChallengeString(unsigned keySizeIndex, const String &challengeString, const KURL &url) { return String(); }
 float userIdleTime() { notImplemented(); return FLT_MAX; } // return an arbitrarily high userIdleTime so that releasing pages from the page cache isn't postponed
+void setCookieStoragePrivateBrowsingEnabled(bool) { notImplemented(); }
 
 }
index aa3d538..58ab873 100644 (file)
@@ -33,6 +33,7 @@
 
 #include "config.h"
 
+#include "CookieStorage.h"
 #include "KURL.h"
 #include "NotImplemented.h"
 #include "PlatformString.h"
@@ -76,5 +77,10 @@ String KURL::fileSystemPath() const
     return String();
 }
 
+void setCookieStoragePrivateBrowsingEnabled(bool)
+{
+    notImplemented();
+}
+
 } // namespace WebCore
 
index 7cac443..64fc54a 100644 (file)
@@ -132,6 +132,7 @@ extern void (*wkQTMovieSetShowClosedCaptions)(QTMovie*, BOOL);
 extern void (*wkQTMovieSelectPreferredAlternates)(QTMovie*);
 extern void (*wkQTMovieViewSetDrawSynchronously)(QTMovieView*, BOOL);
 extern void (*wkSetCGFontRenderingMode)(CGContextRef, NSFont*);
+extern void (*wkSetCookieStoragePrivateBrowsingEnabled)(BOOL);
 extern void (*wkSetDragImage)(NSImage*, NSPoint offset);
 extern void (*wkSetNSURLConnectionDefersCallbacks)(NSURLConnection *, BOOL);
 extern void (*wkSetNSURLRequestShouldContentSniff)(NSMutableURLRequest *, BOOL);
index 52e0064..217f04c 100644 (file)
@@ -67,6 +67,7 @@ void (*wkQTMovieSetShowClosedCaptions)(QTMovie*, BOOL);
 void (*wkQTMovieSelectPreferredAlternates)(QTMovie*);
 void (*wkQTMovieViewSetDrawSynchronously)(QTMovieView*, BOOL);
 void (*wkSetCGFontRenderingMode)(CGContextRef, NSFont*);
+void (*wkSetCookieStoragePrivateBrowsingEnabled)(BOOL);
 void (*wkSetDragImage)(NSImage*, NSPoint offset);
 void (*wkSetPatternBaseCTM)(CGContextRef, CGAffineTransform);
 void (*wkSetPatternPhaseInUserSpace)(CGContextRef, CGPoint point);
diff --git a/WebCore/platform/network/CookieStorage.h b/WebCore/platform/network/CookieStorage.h
new file mode 100644 (file)
index 0000000..56ca5dc
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef CookieStorage_h
+#define CookieStorage_h
+
+namespace WebCore {
+
+void setCookieStoragePrivateBrowsingEnabled(bool);
+
+}
+
+#endif
index aefbcfb..f407899 100644 (file)
@@ -36,6 +36,8 @@ static RetainPtr<CFHTTPCookieStorageRef> s_cookieStorage;
 
 CFHTTPCookieStorageRef currentCookieStorage()
 {
+    ASSERT(isMainThread());
+
     if (s_cookieStorage)
         return s_cookieStorage.get();
     return wkGetDefaultHTTPCookieStorage();
@@ -43,7 +45,19 @@ CFHTTPCookieStorageRef currentCookieStorage()
 
 void setCurrentCookieStorage(CFHTTPCookieStorageRef cookieStorage)
 {
+    ASSERT(isMainThread());
+
     s_cookieStorage = cookieStorage;
 }
 
+void setCookieStoragePrivateBrowsingEnabled(bool enabled)
+{
+    ASSERT(isMainThread());
+
+    if (enabled)
+        s_cookieStorage.adoptPtr(wkCreatePrivateHTTPCookieStorage());
+    else
+        s_cookieStorage = 0;
+}
+
 }
index 59bc3ce..fc980c5 100644 (file)
@@ -31,7 +31,8 @@ typedef struct OpaqueCFHTTPCookieStorage*  CFHTTPCookieStorageRef;
 namespace WebCore {
 
     CFHTTPCookieStorageRef currentCookieStorage();
-    
+
+    // Needed for WebKit1 API only.
     void setCurrentCookieStorage(CFHTTPCookieStorageRef cookieStorage);
 
 }
diff --git a/WebCore/platform/network/mac/CookieStorageMac.mm b/WebCore/platform/network/mac/CookieStorageMac.mm
new file mode 100644 (file)
index 0000000..ab26f7b
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2008 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#include "config.h"
+#include "CookieStorage.h"
+
+#import "WebCoreSystemInterface.h"
+
+namespace WebCore {
+
+void setCookieStoragePrivateBrowsingEnabled(bool enabled)
+{
+    wkSetCookieStoragePrivateBrowsingEnabled(enabled);
+}
+
+}
index 15933e8..d7b5104 100644 (file)
@@ -35,6 +35,7 @@
 #include "AXObjectCache.h"
 #include "CachedResource.h"
 #include "CookieJar.h"
+#include "CookieStorage.h"
 #include "Cursor.h"
 #include "DNS.h"
 #include "FTPDirectoryDocument.h"
@@ -123,6 +124,11 @@ float userIdleTime()
 }
 #endif
 
+void setCookieStoragePrivateBrowsingEnabled(bool)
+{
+    notImplemented();
+}
+
 }
 
 // vim: ts=4 sw=4 et
index af45a63..e33dbb3 100644 (file)
@@ -1,3 +1,12 @@
+2010-10-23  Alexey Proskuryakov  <ap@apple.com>
+
+        Reviewed by Anders Carlsson.
+
+        https://bugs.webkit.org/show_bug.cgi?id=48083
+        <rdar://problem/8489082> Need WebKit2 API for private browsing (48083)
+
+        * WebCoreSupport/WebSystemInterface.mm: (InitWebCoreSystemInterface): Initialize the new method.
+
 2010-10-22  Sam Weinig  <sam@webkit.org>
 
         Reviewed by Anders Carlsson.
index 03cb33f..caea204 100644 (file)
@@ -73,6 +73,7 @@ void InitWebCoreSystemInterface(void)
     INIT(SetCGFontRenderingMode);
     INIT(SetCONNECTProxyAuthorizationForStream);
     INIT(SetCONNECTProxyForStream);
+    INIT(SetCookieStoragePrivateBrowsingEnabled);
     INIT(SetDragImage);
     INIT(SetNSURLConnectionDefersCallbacks);
     INIT(SetNSURLRequestShouldContentSniff);
index 4f77e08..f8e6cf2 100644 (file)
@@ -1,3 +1,13 @@
+2010-10-23  Alexey Proskuryakov  <ap@apple.com>
+
+        Reviewed by Anders Carlsson.
+
+        https://bugs.webkit.org/show_bug.cgi?id=48083
+        <rdar://problem/8489082> Need WebKit2 API for private browsing (48083)
+
+        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface):
+        Initialize the new method.
+
 2010-10-21  Timothy Hatcher  <timothy@apple.com>
 
         Stub out WebInspectorFrontendClient.
index caff262..6c89bbd 100644 (file)
@@ -79,6 +79,7 @@ void InitWebCoreSystemInterface(void)
         INIT(SetCGFontRenderingMode);
         INIT(SetCONNECTProxyAuthorizationForStream);
         INIT(SetCONNECTProxyForStream);
+        INIT(SetCookieStoragePrivateBrowsingEnabled);
         INIT(SetDragImage);
         INIT(SetNSURLConnectionDefersCallbacks);
         INIT(SetNSURLRequestShouldContentSniff);
index a3d1d8a..8d61b46 100644 (file)
@@ -1,3 +1,18 @@
+2010-10-23  Alexey Proskuryakov  <ap@apple.com>
+
+        Reviewed by Anders Carlsson.
+
+        https://bugs.webkit.org/show_bug.cgi?id=48083
+        <rdar://problem/8489082> Need WebKit2 API for private browsing (48083)
+
+        * WebKitSystemInterface.h:
+        * libWebKitSystemInterfaceLeopard.a:
+        * libWebKitSystemInterfaceSnowLeopard.a:
+        * win/include/WebKitSystemInterface/WebKitSystemInterface.h:
+        * win/lib/WebKitSystemInterface.lib:
+        * win/lib/WebKitSystemInterface_debug.lib:
+        Updated WebKitSystemInterface with necessary methods.
+
 2010-10-22  Adam Roben  <aroben@apple.com>
 
         Turn on ENABLE_3D_RENDERING on all Windows builds
index b67906d..79e816f 100644 (file)
@@ -60,6 +60,8 @@ void WKDisableCGDeferredUpdates(void);
 Class WKNSURLProtocolClassForRequest(NSURLRequest *request);
 void WKSetNSURLRequestShouldContentSniff(NSMutableURLRequest *request, BOOL shouldContentSniff);
 
+void WKSetCookieStoragePrivateBrowsingEnabled(BOOL enabled);
+
 unsigned WKGetNSAutoreleasePoolCount(void);
 
 void WKAdvanceDefaultButtonPulseAnimation(NSButtonCell *button);
index 87e9b2d..0de4a0b 100644 (file)
Binary files a/WebKitLibraries/libWebKitSystemInterfaceLeopard.a and b/WebKitLibraries/libWebKitSystemInterfaceLeopard.a differ
index 7ac0fcb..2a5ca23 100644 (file)
Binary files a/WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a and b/WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a differ
index a87cfb6..52aac61 100644 (file)
@@ -85,6 +85,7 @@ CFDictionaryRef wkGetSSLCertificateInfo(CFURLResponseRef);
 void* wkGetSSLPeerCertificateData(CFDictionaryRef);
 void* wkGetSSLCertificateChainContext(CFDictionaryRef);
 CFHTTPCookieStorageRef wkGetDefaultHTTPCookieStorage();
+CFHTTPCookieStorageRef wkCreatePrivateHTTPCookieStorage();
 void wkSetCFURLRequestShouldContentSniff(CFMutableURLRequestRef, bool);
 CFStringRef wkCopyFoundationCacheDirectory();
 void wkSetClientCertificateInSSLProperties(CFMutableDictionaryRef, CFDataRef);
index 6e2018b..7ef03bf 100644 (file)
Binary files a/WebKitLibraries/win/lib/WebKitSystemInterface.lib and b/WebKitLibraries/win/lib/WebKitSystemInterface.lib differ
index b9f1433..c07a17b 100644 (file)
Binary files a/WebKitLibraries/win/lib/WebKitSystemInterface_debug.lib and b/WebKitLibraries/win/lib/WebKitSystemInterface_debug.lib differ