Stub for Session API
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Jan 2014 04:01:48 +0000 (04:01 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Jan 2014 04:01:48 +0000 (04:01 +0000)
https://bugs.webkit.org/show_bug.cgi?id=126626

Patch by Martin Hock <mhock@apple.com> on 2014-01-08
Reviewed by Sam Weinig.

* Shared/API/c/WKBase.h:
* Shared/API/c/WKSharedAPICast.h:
* Shared/APIObject.h:
* UIProcess/API/C/WKSessionRef.cpp: Added.
(WKSessionGetTypeID):
(WKSessionGetEphemeral):
* UIProcess/API/C/WKSessionRef.h: Added.
* UIProcess/API/Cocoa/WKSession.h: Added.
* UIProcess/API/Cocoa/WKSession.mm: Added.
(-[WKSession dealloc]):
(-[WKSession ephemeral]):
(-[WKSession API::]):
* UIProcess/API/Cocoa/WKSessionInternal.h: Added.
(WebKit::wrapper):
* UIProcess/APISession.cpp: Added.
(API::Session::Session):
(API::Session::create):
(API::Session::isEphemeral):
(API::Session::~Session):
* UIProcess/APISession.h: Added.
* WebKit2.xcodeproj/project.pbxproj:

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

12 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/API/c/WKBase.h
Source/WebKit2/Shared/API/c/WKSharedAPICast.h
Source/WebKit2/Shared/APIObject.h
Source/WebKit2/UIProcess/API/C/WKSessionRef.cpp [new file with mode: 0644]
Source/WebKit2/UIProcess/API/C/WKSessionRef.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/Cocoa/WKSession.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/Cocoa/WKSession.mm [new file with mode: 0644]
Source/WebKit2/UIProcess/API/Cocoa/WKSessionInternal.h [new file with mode: 0644]
Source/WebKit2/UIProcess/APISession.cpp [new file with mode: 0644]
Source/WebKit2/UIProcess/APISession.h [new file with mode: 0644]
Source/WebKit2/WebKit2.xcodeproj/project.pbxproj

index 0760eb8..2d11d94 100644 (file)
@@ -1,3 +1,32 @@
+2014-01-08  Martin Hock  <mhock@apple.com>
+
+        Stub for Session API
+        https://bugs.webkit.org/show_bug.cgi?id=126626
+
+        Reviewed by Sam Weinig.
+
+        * Shared/API/c/WKBase.h:
+        * Shared/API/c/WKSharedAPICast.h:
+        * Shared/APIObject.h:
+        * UIProcess/API/C/WKSessionRef.cpp: Added.
+        (WKSessionGetTypeID):
+        (WKSessionGetEphemeral):
+        * UIProcess/API/C/WKSessionRef.h: Added.
+        * UIProcess/API/Cocoa/WKSession.h: Added.
+        * UIProcess/API/Cocoa/WKSession.mm: Added.
+        (-[WKSession dealloc]):
+        (-[WKSession ephemeral]):
+        (-[WKSession API::]):
+        * UIProcess/API/Cocoa/WKSessionInternal.h: Added.
+        (WebKit::wrapper):
+        * UIProcess/APISession.cpp: Added.
+        (API::Session::Session):
+        (API::Session::create):
+        (API::Session::isEphemeral):
+        (API::Session::~Session):
+        * UIProcess/APISession.h: Added.
+        * WebKit2.xcodeproj/project.pbxproj:
+
 2014-01-08  Claudio Saavedra  <csaavedra@igalia.com>
 
         [GTK] Add xdg.origin.url extended attribute to downloads
 2014-01-08  Claudio Saavedra  <csaavedra@igalia.com>
 
         [GTK] Add xdg.origin.url extended attribute to downloads
index 197ad9f..d41894c 100644 (file)
@@ -126,6 +126,7 @@ typedef const struct OpaqueWKPluginSiteDataManager* WKPluginSiteDataManagerRef;
 typedef const struct OpaqueWKPreferences* WKPreferencesRef;
 typedef const struct OpaqueWKProtectionSpace* WKProtectionSpaceRef;
 typedef const struct OpaqueWKTextChecker* WKTextCheckerRef;
 typedef const struct OpaqueWKPreferences* WKPreferencesRef;
 typedef const struct OpaqueWKProtectionSpace* WKProtectionSpaceRef;
 typedef const struct OpaqueWKTextChecker* WKTextCheckerRef;
+typedef const struct OpaqueWKSession* WKSessionRef;
 typedef const struct OpaqueWKVibration* WKVibrationRef;
 typedef const struct OpaqueWKViewportAttributes* WKViewportAttributesRef;
 
 typedef const struct OpaqueWKVibration* WKVibrationRef;
 typedef const struct OpaqueWKViewportAttributes* WKViewportAttributesRef;
 
index d4cbb77..8439dbc 100644 (file)
@@ -28,6 +28,7 @@
 
 #include "APIError.h"
 #include "APINumber.h"
 
 #include "APIError.h"
 #include "APINumber.h"
+#include "APISession.h"
 #include "APIString.h"
 #include "APIURL.h"
 #include "APIURLRequest.h"
 #include "APIString.h"
 #include "APIURL.h"
 #include "APIURLRequest.h"
@@ -113,6 +114,7 @@ WK_ADD_API_MAPPING(WKURLRef, API::URL)
 WK_ADD_API_MAPPING(WKURLRequestRef, API::URLRequest)
 WK_ADD_API_MAPPING(WKURLResponseRef, API::URLResponse)
 WK_ADD_API_MAPPING(WKUserContentURLPatternRef, WebUserContentURLPattern)
 WK_ADD_API_MAPPING(WKURLRequestRef, API::URLRequest)
 WK_ADD_API_MAPPING(WKURLResponseRef, API::URLResponse)
 WK_ADD_API_MAPPING(WKUserContentURLPatternRef, WebUserContentURLPattern)
+WK_ADD_API_MAPPING(WKSessionRef, API::Session)
 
 template<> struct APITypeInfo<WKMutableArrayRef> { typedef API::Array* ImplType; };
 
 
 template<> struct APITypeInfo<WKMutableArrayRef> { typedef API::Array* ImplType; };
 
index 004eb0c..0da0469 100644 (file)
@@ -129,6 +129,7 @@ public:
         PageGroup,
         PluginSiteDataManager,
         Preferences,
         PageGroup,
         PluginSiteDataManager,
         Preferences,
+        Session,
         TextChecker,
         Vibration,
         ViewportAttributes,
         TextChecker,
         Vibration,
         ViewportAttributes,
diff --git a/Source/WebKit2/UIProcess/API/C/WKSessionRef.cpp b/Source/WebKit2/UIProcess/API/C/WKSessionRef.cpp
new file mode 100644 (file)
index 0000000..f1f8f27
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2014 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.
+ */
+
+#include "config.h"
+#include "WKSessionRef.h"
+
+#include "APISession.h"
+#include "WKAPICast.h"
+
+using namespace WebKit;
+
+WKTypeID WKSessionGetTypeID()
+{
+    return toAPI(API::Session::APIType);
+}
+
+bool WKSessionGetEphemeral(WKSessionRef sessionRef)
+{
+    return toAPI(toImpl(sessionRef)->isEphemeral());
+}
diff --git a/Source/WebKit2/UIProcess/API/C/WKSessionRef.h b/Source/WebKit2/UIProcess/API/C/WKSessionRef.h
new file mode 100644 (file)
index 0000000..fc0b5e7
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2014 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 WKSessionRef_h
+#define WKSessionRef_h
+
+#include <WebKit2/WKBase.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+WK_EXPORT WKTypeID WKSessionGetTypeID();
+
+WK_EXPORT bool WKSessionGetEphemeral(WKSessionRef session);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* WKSessionRef_h */
diff --git a/Source/WebKit2/UIProcess/API/Cocoa/WKSession.h b/Source/WebKit2/UIProcess/API/Cocoa/WKSession.h
new file mode 100644 (file)
index 0000000..6499a92
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2014 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.
+ */
+
+#import <WebKit2/WKFoundation.h>
+
+#if WK_API_ENABLED
+
+#import <Foundation/Foundation.h>
+
+WK_API_CLASS
+@interface WKSession : NSObject
+
+@property (readonly) bool ephemeral;
+
+@end
+
+#endif // WK_API_ENABLED
diff --git a/Source/WebKit2/UIProcess/API/Cocoa/WKSession.mm b/Source/WebKit2/UIProcess/API/Cocoa/WKSession.mm
new file mode 100644 (file)
index 0000000..f3b1616
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2014 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.
+ */
+
+#import "config.h"
+#import "WKSessionInternal.h"
+
+#if WK_API_ENABLED
+
+using namespace WebKit;
+
+@implementation WKSession {
+    API::ObjectStorage<API::Session> _session;
+}
+
+- (void)dealloc
+{
+    _session->API::Session::~Session();
+
+    [super dealloc];
+}
+
+- (bool)ephemeral
+{
+    return _session->isEphemeral();
+}
+
+#pragma mark WKObject protocol implementation
+
+- (API::Object&)_apiObject
+{
+    return *_session;
+}
+
+@end
+
+#endif // WK_API_ENABLED
diff --git a/Source/WebKit2/UIProcess/API/Cocoa/WKSessionInternal.h b/Source/WebKit2/UIProcess/API/Cocoa/WKSessionInternal.h
new file mode 100644 (file)
index 0000000..617ae0f
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2014 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.
+ */
+
+#import "WKSession.h"
+
+#if WK_API_ENABLED
+
+#import "WKObject.h"
+#import "APISession.h"
+
+namespace WebKit {
+
+inline WKSession *wrapper(API::Session& session)
+{
+    ASSERT([session.wrapper() isKindOfClass:[WKSession class]]);
+    return (WKSession *)session.wrapper();
+}
+
+}
+
+@interface WKSession () <WKObject>
+@end
+
+#endif // WK_API_ENABLED
diff --git a/Source/WebKit2/UIProcess/APISession.cpp b/Source/WebKit2/UIProcess/APISession.cpp
new file mode 100644 (file)
index 0000000..42312bb
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2014 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.
+ */
+
+#include "config.h"
+#include "APISession.h"
+
+namespace API {
+
+Session::Session(bool isEphemeral)
+    : m_isEphemeral(isEphemeral)
+{
+}
+
+PassRefPtr<Session> Session::create(bool isEphemeral)
+{
+    return adoptRef(new Session(isEphemeral));
+}
+
+bool Session::isEphemeral()
+{
+    return m_isEphemeral;
+}
+
+Session::~Session()
+{
+}
+
+} // namespace API
diff --git a/Source/WebKit2/UIProcess/APISession.h b/Source/WebKit2/UIProcess/APISession.h
new file mode 100644 (file)
index 0000000..3fb5f67
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2014 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 APISession_h
+#define APISession_h
+
+#include "APIObject.h"
+#include <wtf/PassRefPtr.h>
+
+namespace API {
+
+class Session : public API::ObjectImpl<API::Object::Type::Session> {
+public:
+    static PassRefPtr<Session> create(bool isEphemeral);
+    bool isEphemeral();
+    virtual ~Session();
+
+private:
+    explicit Session(bool isEphemeral);
+    bool m_isEphemeral;
+};
+
+} // namespace API
+
+#endif // APISession_h
index ba4d717..9c0ddd6 100644 (file)
                759CCD581808F1640078E8A8 /* WebOriginDataManagerProxyChangeClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 759CCD541808F1600078E8A8 /* WebOriginDataManagerProxyChangeClient.cpp */; };
                759CCD591808F1690078E8A8 /* WebOriginDataManagerProxyChangeClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 759CCD551808F1600078E8A8 /* WebOriginDataManagerProxyChangeClient.h */; };
                759CCD5A1808F6160078E8A8 /* WebOriginDataManagerProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 755422BF18062BE40046F6A8 /* WebOriginDataManagerProxy.h */; };
                759CCD581808F1640078E8A8 /* WebOriginDataManagerProxyChangeClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 759CCD541808F1600078E8A8 /* WebOriginDataManagerProxyChangeClient.cpp */; };
                759CCD591808F1690078E8A8 /* WebOriginDataManagerProxyChangeClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 759CCD551808F1600078E8A8 /* WebOriginDataManagerProxyChangeClient.h */; };
                759CCD5A1808F6160078E8A8 /* WebOriginDataManagerProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 755422BF18062BE40046F6A8 /* WebOriginDataManagerProxy.h */; };
+               75A8D2C8187CCFAB00C39C9E /* WKSession.h in Headers */ = {isa = PBXBuildFile; fileRef = 75A8D2C4187CCF9F00C39C9E /* WKSession.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               75A8D2C9187CCFAF00C39C9E /* WKSession.mm in Sources */ = {isa = PBXBuildFile; fileRef = 75A8D2C5187CCF9F00C39C9E /* WKSession.mm */; };
+               75A8D2D6187D1C0E00C39C9E /* WKSessionInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 75A8D2D4187D1C0100C39C9E /* WKSessionInternal.h */; };
+               75A8D2D7187D303A00C39C9E /* WKSessionRef.h in Headers */ = {isa = PBXBuildFile; fileRef = 75A8D2D1187D17BF00C39C9E /* WKSessionRef.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               75A8D2D8187D304000C39C9E /* WKSessionRef.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 75A8D2D0187D17BF00C39C9E /* WKSessionRef.cpp */; };
+               75A8D2E1187DEC1A00C39C9E /* APISession.h in Headers */ = {isa = PBXBuildFile; fileRef = 75A8D2DE187DE87400C39C9E /* APISession.h */; };
+               75A8D2E2187DEC1E00C39C9E /* APISession.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 75A8D2DD187DE87400C39C9E /* APISession.cpp */; };
                75E749E9180DBB9800088BA6 /* WebOriginDataManagerMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 75E749E5180DBB9800088BA6 /* WebOriginDataManagerMessageReceiver.cpp */; };
                75E749EA180DBB9800088BA6 /* WebOriginDataManagerMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 75E749E6180DBB9800088BA6 /* WebOriginDataManagerMessages.h */; };
                75E749EB180DBB9800088BA6 /* WebOriginDataManagerProxyMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 75E749E7180DBB9800088BA6 /* WebOriginDataManagerProxyMessageReceiver.cpp */; };
                75E749E9180DBB9800088BA6 /* WebOriginDataManagerMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 75E749E5180DBB9800088BA6 /* WebOriginDataManagerMessageReceiver.cpp */; };
                75E749EA180DBB9800088BA6 /* WebOriginDataManagerMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 75E749E6180DBB9800088BA6 /* WebOriginDataManagerMessages.h */; };
                75E749EB180DBB9800088BA6 /* WebOriginDataManagerProxyMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 75E749E7180DBB9800088BA6 /* WebOriginDataManagerProxyMessageReceiver.cpp */; };
                755422C818064FFC0046F6A8 /* WebOriginDataManager.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = WebOriginDataManager.messages.in; path = OriginData/WebOriginDataManager.messages.in; sourceTree = "<group>"; };
                759CCD541808F1600078E8A8 /* WebOriginDataManagerProxyChangeClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebOriginDataManagerProxyChangeClient.cpp; sourceTree = "<group>"; };
                759CCD551808F1600078E8A8 /* WebOriginDataManagerProxyChangeClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebOriginDataManagerProxyChangeClient.h; sourceTree = "<group>"; };
                755422C818064FFC0046F6A8 /* WebOriginDataManager.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = WebOriginDataManager.messages.in; path = OriginData/WebOriginDataManager.messages.in; sourceTree = "<group>"; };
                759CCD541808F1600078E8A8 /* WebOriginDataManagerProxyChangeClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebOriginDataManagerProxyChangeClient.cpp; sourceTree = "<group>"; };
                759CCD551808F1600078E8A8 /* WebOriginDataManagerProxyChangeClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebOriginDataManagerProxyChangeClient.h; sourceTree = "<group>"; };
+               75A8D2C4187CCF9F00C39C9E /* WKSession.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKSession.h; sourceTree = "<group>"; };
+               75A8D2C5187CCF9F00C39C9E /* WKSession.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKSession.mm; sourceTree = "<group>"; };
+               75A8D2D0187D17BF00C39C9E /* WKSessionRef.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKSessionRef.cpp; sourceTree = "<group>"; };
+               75A8D2D1187D17BF00C39C9E /* WKSessionRef.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKSessionRef.h; sourceTree = "<group>"; };
+               75A8D2D4187D1C0100C39C9E /* WKSessionInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKSessionInternal.h; sourceTree = "<group>"; };
+               75A8D2DD187DE87400C39C9E /* APISession.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = APISession.cpp; sourceTree = "<group>"; };
+               75A8D2DE187DE87400C39C9E /* APISession.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APISession.h; sourceTree = "<group>"; };
                75E749E5180DBB9800088BA6 /* WebOriginDataManagerMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebOriginDataManagerMessageReceiver.cpp; sourceTree = "<group>"; };
                75E749E6180DBB9800088BA6 /* WebOriginDataManagerMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebOriginDataManagerMessages.h; sourceTree = "<group>"; };
                75E749E7180DBB9800088BA6 /* WebOriginDataManagerProxyMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebOriginDataManagerProxyMessageReceiver.cpp; sourceTree = "<group>"; };
                75E749E5180DBB9800088BA6 /* WebOriginDataManagerMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebOriginDataManagerMessageReceiver.cpp; sourceTree = "<group>"; };
                75E749E6180DBB9800088BA6 /* WebOriginDataManagerMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebOriginDataManagerMessages.h; sourceTree = "<group>"; };
                75E749E7180DBB9800088BA6 /* WebOriginDataManagerProxyMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebOriginDataManagerProxyMessageReceiver.cpp; sourceTree = "<group>"; };
                                BCBAACE6145225CA0053F82F /* WKProcessGroup.mm */,
                                7C1FB3BF1846AEFC001A03D8 /* WKProcessGroupInternal.h */,
                                BCBAACE7145225CB0053F82F /* WKProcessGroupPrivate.h */,
                                BCBAACE6145225CA0053F82F /* WKProcessGroup.mm */,
                                7C1FB3BF1846AEFC001A03D8 /* WKProcessGroupInternal.h */,
                                BCBAACE7145225CB0053F82F /* WKProcessGroupPrivate.h */,
+                               75A8D2C4187CCF9F00C39C9E /* WKSession.h */,
+                               75A8D2C5187CCF9F00C39C9E /* WKSession.mm */,
+                               75A8D2D4187D1C0100C39C9E /* WKSessionInternal.h */,
                                7CD5EBBD1746B04C000C1C45 /* WKTypeRefWrapper.h */,
                                7CD5EBBC1746B04C000C1C45 /* WKTypeRefWrapper.mm */,
                                BC8699B2116AADAA002A925B /* WKView.h */,
                                7CD5EBBD1746B04C000C1C45 /* WKTypeRefWrapper.h */,
                                7CD5EBBC1746B04C000C1C45 /* WKTypeRefWrapper.mm */,
                                BC8699B2116AADAA002A925B /* WKView.h */,
                                1A44B95816B73F8C00B7BBD8 /* Storage */,
                                BCF69FA11176D01400471A52 /* APINavigationData.cpp */,
                                BCF69FA01176D01400471A52 /* APINavigationData.h */,
                                1A44B95816B73F8C00B7BBD8 /* Storage */,
                                BCF69FA11176D01400471A52 /* APINavigationData.cpp */,
                                BCF69FA01176D01400471A52 /* APINavigationData.h */,
+                               75A8D2DD187DE87400C39C9E /* APISession.cpp */,
+                               75A8D2DE187DE87400C39C9E /* APISession.h */,
                                7CD102D91866770600ED429D /* AutoCorrectionCallback.h */,
                                BC2652121182608100243E12 /* DrawingAreaProxy.cpp */,
                                BC2652131182608100243E12 /* DrawingAreaProxy.h */,
                                7CD102D91866770600ED429D /* AutoCorrectionCallback.h */,
                                BC2652121182608100243E12 /* DrawingAreaProxy.cpp */,
                                BC2652131182608100243E12 /* DrawingAreaProxy.h */,
                                33D3A3B91339606200709BE4 /* WebMediaCacheManagerProxy.messages.in */,
                                BC1DFEA312B31F87005DF730 /* WebOpenPanelResultListenerProxy.cpp */,
                                BC1DFEA212B31F87005DF730 /* WebOpenPanelResultListenerProxy.h */,
                                33D3A3B91339606200709BE4 /* WebMediaCacheManagerProxy.messages.in */,
                                BC1DFEA312B31F87005DF730 /* WebOpenPanelResultListenerProxy.cpp */,
                                BC1DFEA212B31F87005DF730 /* WebOpenPanelResultListenerProxy.h */,
-                               755422BE18062BE40046F6A8 /* WebOriginDataManagerProxy.cpp */,
                                755422BF18062BE40046F6A8 /* WebOriginDataManagerProxy.h */,
                                755422BF18062BE40046F6A8 /* WebOriginDataManagerProxy.h */,
+                               755422BE18062BE40046F6A8 /* WebOriginDataManagerProxy.cpp */,
                                755422C018062BE40046F6A8 /* WebOriginDataManagerProxy.messages.in */,
                                759CCD541808F1600078E8A8 /* WebOriginDataManagerProxyChangeClient.cpp */,
                                759CCD551808F1600078E8A8 /* WebOriginDataManagerProxyChangeClient.h */,
                                755422C018062BE40046F6A8 /* WebOriginDataManagerProxy.messages.in */,
                                759CCD541808F1600078E8A8 /* WebOriginDataManagerProxyChangeClient.cpp */,
                                759CCD551808F1600078E8A8 /* WebOriginDataManagerProxyChangeClient.h */,
                                518ACAE912AEE6BB00B04B83 /* WKProtectionSpaceTypes.h */,
                                33367638130C99DC006C9DE2 /* WKResourceCacheManager.cpp */,
                                33367639130C99DC006C9DE2 /* WKResourceCacheManager.h */,
                                518ACAE912AEE6BB00B04B83 /* WKProtectionSpaceTypes.h */,
                                33367638130C99DC006C9DE2 /* WKResourceCacheManager.cpp */,
                                33367639130C99DC006C9DE2 /* WKResourceCacheManager.h */,
+                               75A8D2D0187D17BF00C39C9E /* WKSessionRef.cpp */,
+                               75A8D2D1187D17BF00C39C9E /* WKSessionRef.h */,
                        );
                        path = C;
                        sourceTree = "<group>";
                        );
                        path = C;
                        sourceTree = "<group>";
                                518D2CAE12D5153B003BB93B /* WebBackForwardListItem.h in Headers */,
                                BC72B9FB11E6476B001EB4EA /* WebBackForwardListProxy.h in Headers */,
                                37FC194B18510D6A008CFA47 /* WKNSURLAuthenticationChallenge.h in Headers */,
                                518D2CAE12D5153B003BB93B /* WebBackForwardListItem.h in Headers */,
                                BC72B9FB11E6476B001EB4EA /* WebBackForwardListProxy.h in Headers */,
                                37FC194B18510D6A008CFA47 /* WKNSURLAuthenticationChallenge.h in Headers */,
+                               75A8D2C8187CCFAB00C39C9E /* WKSession.h in Headers */,
                                BCF50728124329AA005955AE /* WebCertificateInfo.h in Headers */,
                                BC032D7510F4378D0058C15A /* WebChromeClient.h in Headers */,
                                515E773418402D510007203F /* UniqueIDBDatabaseIdentifier.h in Headers */,
                                BCF50728124329AA005955AE /* WebCertificateInfo.h in Headers */,
                                BC032D7510F4378D0058C15A /* WebChromeClient.h in Headers */,
                                515E773418402D510007203F /* UniqueIDBDatabaseIdentifier.h in Headers */,
                                1A90C1EE1264FD50003E44D4 /* WebFindOptions.h in Headers */,
                                BCE469541214E6CB000B98EB /* WebFormClient.h in Headers */,
                                BCE469561214E6CB000B98EB /* WebFormSubmissionListenerProxy.h in Headers */,
                                1A90C1EE1264FD50003E44D4 /* WebFindOptions.h in Headers */,
                                BCE469541214E6CB000B98EB /* WebFormClient.h in Headers */,
                                BCE469561214E6CB000B98EB /* WebFormSubmissionListenerProxy.h in Headers */,
+                               75A8D2D7187D303A00C39C9E /* WKSessionRef.h in Headers */,
                                BC032D8D10F437A00058C15A /* WebFrame.h in Headers */,
                                BCE469771214F27B000B98EB /* WebFrameListenerProxy.h in Headers */,
                                BC032D7F10F4378D0058C15A /* WebFrameLoaderClient.h in Headers */,
                                BC032D8D10F437A00058C15A /* WebFrame.h in Headers */,
                                BCE469771214F27B000B98EB /* WebFrameListenerProxy.h in Headers */,
                                BC032D7F10F4378D0058C15A /* WebFrameLoaderClient.h in Headers */,
                                1AC1338018590AE400F3EC05 /* RemoteObjectRegistry.h in Headers */,
                                BC3066BF125A442100E71278 /* WebProcessMessages.h in Headers */,
                                BC032DD510F4389F0058C15A /* WebProcessProxy.h in Headers */,
                                1AC1338018590AE400F3EC05 /* RemoteObjectRegistry.h in Headers */,
                                BC3066BF125A442100E71278 /* WebProcessMessages.h in Headers */,
                                BC032DD510F4389F0058C15A /* WebProcessProxy.h in Headers */,
+                               75A8D2D6187D1C0E00C39C9E /* WKSessionInternal.h in Headers */,
                                51032F19180F73BB00961BB7 /* WebToDatabaseProcessConnection.h in Headers */,
                                BCEE7AD112817988009827DA /* WebProcessProxyMessages.h in Headers */,
                                BCE0E425168B7A280057E66A /* WebProcessSupplement.h in Headers */,
                                51032F19180F73BB00961BB7 /* WebToDatabaseProcessConnection.h in Headers */,
                                BCEE7AD112817988009827DA /* WebProcessProxyMessages.h in Headers */,
                                BCE0E425168B7A280057E66A /* WebProcessSupplement.h in Headers */,
                                BC06F44E12DBDF3F002D78DE /* WKGeolocationPermissionRequest.h in Headers */,
                                BC0E619812D6CD120012A72A /* WKGeolocationPosition.h in Headers */,
                                37FC19471850FBF2008CFA47 /* WKBrowsingContextLoadDelegatePrivate.h in Headers */,
                                BC06F44E12DBDF3F002D78DE /* WKGeolocationPermissionRequest.h in Headers */,
                                BC0E619812D6CD120012A72A /* WKGeolocationPosition.h in Headers */,
                                37FC19471850FBF2008CFA47 /* WKBrowsingContextLoadDelegatePrivate.h in Headers */,
+                               75A8D2E1187DEC1A00C39C9E /* APISession.h in Headers */,
                                BCC8B374125FB69000DE46A4 /* WKGeometry.h in Headers */,
                                B62E7312143047B00069EC35 /* WKHitTestResult.h in Headers */,
                                5110AE0D133C16CB0072717A /* WKIconDatabase.h in Headers */,
                                BCC8B374125FB69000DE46A4 /* WKGeometry.h in Headers */,
                                B62E7312143047B00069EC35 /* WKHitTestResult.h in Headers */,
                                5110AE0D133C16CB0072717A /* WKIconDatabase.h in Headers */,
                        buildActionMask = 2147483647;
                        files = (
                                51E35200180F5D0F00E53BE9 /* DatabaseToWebProcessConnection.cpp in Sources */,
                        buildActionMask = 2147483647;
                        files = (
                                51E35200180F5D0F00E53BE9 /* DatabaseToWebProcessConnection.cpp in Sources */,
+                               75A8D2E2187DEC1E00C39C9E /* APISession.cpp in Sources */,
                                A7D792D61767CB6E00881CBE /* ActivityAssertion.cpp in Sources */,
                                B63403F914910D57001070B5 /* APIObject.cpp in Sources */,
                                1A3D610513A7F03A00F95D4E /* ArgumentCoders.cpp in Sources */,
                                A7D792D61767CB6E00881CBE /* ActivityAssertion.cpp in Sources */,
                                B63403F914910D57001070B5 /* APIObject.cpp in Sources */,
                                1A3D610513A7F03A00F95D4E /* ArgumentCoders.cpp in Sources */,
                                37C4C0931814B3AF003688B9 /* WKNSArray.mm in Sources */,
                                935EEBA1127761CC003322B8 /* InjectedBundleBackForwardList.cpp in Sources */,
                                935EEBA3127761D3003322B8 /* InjectedBundleBackForwardListItem.cpp in Sources */,
                                37C4C0931814B3AF003688B9 /* WKNSArray.mm in Sources */,
                                935EEBA1127761CC003322B8 /* InjectedBundleBackForwardList.cpp in Sources */,
                                935EEBA3127761D3003322B8 /* InjectedBundleBackForwardListItem.cpp in Sources */,
+                               75A8D2C9187CCFAF00C39C9E /* WKSession.mm in Sources */,
                                BCEE7DC6128B645D009827DA /* InjectedBundleClient.cpp in Sources */,
                                51FA2D7415212DF100C1BA0B /* InjectedBundleDOMWindowExtension.cpp in Sources */,
                                BC498619124D10E200D834E1 /* InjectedBundleHitTestResult.cpp in Sources */,
                                BCEE7DC6128B645D009827DA /* InjectedBundleClient.cpp in Sources */,
                                51FA2D7415212DF100C1BA0B /* InjectedBundleDOMWindowExtension.cpp in Sources */,
                                BC498619124D10E200D834E1 /* InjectedBundleHitTestResult.cpp in Sources */,
                                1A2D92211281DC1B001EB962 /* PluginProxyMac.mm in Sources */,
                                755422C418062BF90046F6A8 /* WebOriginDataManagerProxy.cpp in Sources */,
                                1A8EFA701252B84100F7067F /* PluginProxyMessageReceiver.cpp in Sources */,
                                1A2D92211281DC1B001EB962 /* PluginProxyMac.mm in Sources */,
                                755422C418062BF90046F6A8 /* WebOriginDataManagerProxy.cpp in Sources */,
                                1A8EFA701252B84100F7067F /* PluginProxyMessageReceiver.cpp in Sources */,
+                               75A8D2D8187D304000C39C9E /* WKSessionRef.cpp in Sources */,
                                371A19411824D29300F32A5E /* WKNSDictionary.mm in Sources */,
                                7CD622771739D863005BD7FF /* PluginSandboxProfile.mm in Sources */,
                                BC82844D16B5081C00A278FE /* PluginServiceEntryPoint.mm in Sources */,
                                371A19411824D29300F32A5E /* WKNSDictionary.mm in Sources */,
                                7CD622771739D863005BD7FF /* PluginSandboxProfile.mm in Sources */,
                                BC82844D16B5081C00A278FE /* PluginServiceEntryPoint.mm in Sources */,