Add stubbed out WKRemoteObjectRegistry class
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Oct 2013 16:44:21 +0000 (16:44 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Oct 2013 16:44:21 +0000 (16:44 +0000)
https://bugs.webkit.org/show_bug.cgi?id=123512

Reviewed by Andreas Kling.

Also add a WKRemoteObjectInterface class that represents a remote object interface.

* Shared/API/Cocoa/WKRemoteObjectInterface.h: Added.
* Shared/API/Cocoa/WKRemoteObjectInterface.mm: Added.
(-[WKRemoteObjectInterface initWithProtocol:identifier:]):
(+[WKRemoteObjectInterface remoteObjectInterfaceWithProtocol:]):
* Shared/API/Cocoa/WKRemoteObjectRegistry.h: Added.
* Shared/API/Cocoa/WKRemoteObjectRegistry.mm: Added.
(-[WKRemoteObjectRegistry registerExportedObject:interface:]):
(-[WKRemoteObjectRegistry unregisterExportedObject:interface:]):
(-[WKRemoteObjectRegistry remoteObjectProxyWithInterface:]):
* WebKit2.xcodeproj/project.pbxproj:

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

Source/WebKit2/ChangeLog
Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectInterface.h [new file with mode: 0644]
Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectInterface.mm [new file with mode: 0644]
Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectRegistry.h [new file with mode: 0644]
Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectRegistry.mm [new file with mode: 0644]
Source/WebKit2/WebKit2.xcodeproj/project.pbxproj

index d475977..b8a37c7 100644 (file)
@@ -1,3 +1,23 @@
+2013-10-30  Anders Carlsson  <andersca@apple.com>
+
+        Add stubbed out WKRemoteObjectRegistry class
+        https://bugs.webkit.org/show_bug.cgi?id=123512
+
+        Reviewed by Andreas Kling.
+
+        Also add a WKRemoteObjectInterface class that represents a remote object interface.
+
+        * Shared/API/Cocoa/WKRemoteObjectInterface.h: Added.
+        * Shared/API/Cocoa/WKRemoteObjectInterface.mm: Added.
+        (-[WKRemoteObjectInterface initWithProtocol:identifier:]):
+        (+[WKRemoteObjectInterface remoteObjectInterfaceWithProtocol:]):
+        * Shared/API/Cocoa/WKRemoteObjectRegistry.h: Added.
+        * Shared/API/Cocoa/WKRemoteObjectRegistry.mm: Added.
+        (-[WKRemoteObjectRegistry registerExportedObject:interface:]):
+        (-[WKRemoteObjectRegistry unregisterExportedObject:interface:]):
+        (-[WKRemoteObjectRegistry remoteObjectProxyWithInterface:]):
+        * WebKit2.xcodeproj/project.pbxproj:
+
 2013-10-30  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         [GTK] webkit_web_context_allow_tls_certificate_for_host doc is missing Since tag
diff --git a/Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectInterface.h b/Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectInterface.h
new file mode 100644 (file)
index 0000000..5fc6824
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2013 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
+
+@interface WKRemoteObjectInterface : NSObject
+
+@property (readonly) Protocol *protocol;
+@property (readonly) NSString *identifier;
+
+- (id)initWithProtocol:(Protocol *)protocol identifier:(NSString *)identifier;
+
++ (instancetype)remoteObjectInterfaceWithProtocol:(Protocol *)protocol;
+
+@end
+
+#endif // WK_API_ENABLED
diff --git a/Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectInterface.mm b/Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectInterface.mm
new file mode 100644 (file)
index 0000000..70922a6
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2013 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 "WKRemoteObjectInterface.h"
+
+#if WK_API_ENABLED
+
+@implementation WKRemoteObjectInterface
+
+- (id)initWithProtocol:(Protocol *)protocol identifier:(NSString *)identifier
+{
+    if (!(self = [super init]))
+        return nil;
+
+    _protocol = protocol;
+    _identifier = [identifier copy];
+
+    return self;
+}
+
+
++ (instancetype)remoteObjectInterfaceWithProtocol:(Protocol *)protocol
+{
+    return [[[self alloc] initWithProtocol:protocol identifier:NSStringFromProtocol(protocol)] autorelease];
+}
+
+@end
+
+#endif // WK_API_ENABLED
diff --git a/Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectRegistry.h b/Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectRegistry.h
new file mode 100644 (file)
index 0000000..40cd58e
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2013 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
+
+@class WKRemoteObjectInterface;
+
+@interface WKRemoteObjectRegistry : NSObject
+
+- (void)registerExportedObject:(id)object interface:(WKRemoteObjectInterface *)interface;
+- (void)unregisterExportedObject:(id)object interface:(WKRemoteObjectInterface *)interface;
+
+- (id)remoteObjectProxyWithInterface:(WKRemoteObjectInterface *)interface;
+
+@end
+
+#endif // WK_API_ENABLED
diff --git a/Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectRegistry.mm b/Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectRegistry.mm
new file mode 100644 (file)
index 0000000..5a4a6c0
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2013 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 "WKRemoteObjectRegistry.h"
+
+#if WK_API_ENABLED
+
+@implementation WKRemoteObjectRegistry
+
+- (void)registerExportedObject:(id)object interface:(WKRemoteObjectInterface *)interface
+{
+    // FIXME: Implement.
+}
+
+- (void)unregisterExportedObject:(id)object interface:(WKRemoteObjectInterface *)interface
+{
+    // FIXME: Implement.
+}
+
+- (id)remoteObjectProxyWithInterface:(WKRemoteObjectInterface *)interface
+{
+    // FIXME: Implement.
+    return nil;
+}
+
+@end
+
+#endif // WK_API_ENABLED
index 68744b0..99c2716 100644 (file)
                1A91010B1268C8CA001842F5 /* FindIndicatorWindow.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A9101091268C8CA001842F5 /* FindIndicatorWindow.mm */; };
                1A92DC1112F8BA460017AF65 /* LayerTreeContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A92DC1012F8BA460017AF65 /* LayerTreeContext.h */; };
                1A92DC1312F8BAB90017AF65 /* LayerTreeContextMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A92DC1212F8BAB90017AF65 /* LayerTreeContextMac.mm */; };
+               1A9E32891821636900F5D04C /* WKRemoteObjectRegistry.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A9E32871821636900F5D04C /* WKRemoteObjectRegistry.h */; };
+               1A9E328A1821636900F5D04C /* WKRemoteObjectRegistry.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A9E32881821636900F5D04C /* WKRemoteObjectRegistry.mm */; };
+               1A9E328D182165A900F5D04C /* WKRemoteObjectInterface.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A9E328B182165A900F5D04C /* WKRemoteObjectInterface.h */; };
+               1A9E328E182165A900F5D04C /* WKRemoteObjectInterface.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A9E328C182165A900F5D04C /* WKRemoteObjectInterface.mm */; };
                1A9FBA8D13FF04E600DEED67 /* PluginComplexTextInputState.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A9FBA8C13FF04E600DEED67 /* PluginComplexTextInputState.h */; };
                1AA2E51D12E4C05E00BC4966 /* CGUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AA2E51B12E4C05E00BC4966 /* CGUtilities.h */; };
                1AA2E51E12E4C05E00BC4966 /* CGUtilities.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AA2E51C12E4C05E00BC4966 /* CGUtilities.cpp */; };
                1A9101091268C8CA001842F5 /* FindIndicatorWindow.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = FindIndicatorWindow.mm; sourceTree = "<group>"; };
                1A92DC1012F8BA460017AF65 /* LayerTreeContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LayerTreeContext.h; sourceTree = "<group>"; };
                1A92DC1212F8BAB90017AF65 /* LayerTreeContextMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = LayerTreeContextMac.mm; sourceTree = "<group>"; };
+               1A9E32871821636900F5D04C /* WKRemoteObjectRegistry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKRemoteObjectRegistry.h; sourceTree = "<group>"; };
+               1A9E32881821636900F5D04C /* WKRemoteObjectRegistry.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKRemoteObjectRegistry.mm; sourceTree = "<group>"; };
+               1A9E328B182165A900F5D04C /* WKRemoteObjectInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKRemoteObjectInterface.h; sourceTree = "<group>"; };
+               1A9E328C182165A900F5D04C /* WKRemoteObjectInterface.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKRemoteObjectInterface.mm; sourceTree = "<group>"; };
                1A9FBA8C13FF04E600DEED67 /* PluginComplexTextInputState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginComplexTextInputState.h; sourceTree = "<group>"; };
                1AA1C79A100E7FC50078DEBC /* WebCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = WebCore.framework; sourceTree = BUILT_PRODUCTS_DIR; };
                1AA1C7DE100E846E0078DEBC /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = JavaScriptCore.framework; sourceTree = BUILT_PRODUCTS_DIR; };
                        isa = PBXGroup;
                        children = (
                                37DFA6FF1810BB92001F4A9F /* WKFoundation.h */,
+                               1A9E32871821636900F5D04C /* WKRemoteObjectRegistry.h */,
+                               1A9E32881821636900F5D04C /* WKRemoteObjectRegistry.mm */,
+                               1A9E328B182165A900F5D04C /* WKRemoteObjectInterface.h */,
+                               1A9E328C182165A900F5D04C /* WKRemoteObjectInterface.mm */,
                        );
                        path = Cocoa;
                        sourceTree = "<group>";
                                BCA8C6A911E3BA5F00812FB7 /* InjectedBundlePageLoaderClient.h in Headers */,
                                BC8147A912F64CDA007B2C32 /* InjectedBundlePagePolicyClient.h in Headers */,
                                BCA8C6B011E3C08700812FB7 /* InjectedBundlePageUIClient.h in Headers */,
+                               1A9E32891821636900F5D04C /* WKRemoteObjectRegistry.h in Headers */,
                                BC33E0D112408E8600360F3F /* InjectedBundleRangeHandle.h in Headers */,
                                BC14DF77120B5B7900826C0C /* InjectedBundleScriptWorld.h in Headers */,
                                BCB0B0DE12305A8C00B1341E /* InjectedBundleUserMessageCoders.h in Headers */,
                                BC5D24C216CD706D007D5461 /* WKDOMNodePrivate.h in Headers */,
                                BC39C4361626366F008BC689 /* WKDOMRange.h in Headers */,
                                BC5D24C516CD7088007D5461 /* WKDOMRangePrivate.h in Headers */,
+                               1A9E328D182165A900F5D04C /* WKRemoteObjectInterface.h in Headers */,
                                293EBEAB1627D9C9005F89F1 /* WKDOMText.h in Headers */,
                                BC017D2116263308007054F5 /* WKDOMTextIterator.h in Headers */,
                                1AB7D78D1288CD9A00CFD08C /* WKDownload.h in Headers */,
                                51B15A8413843A3900321AD8 /* EnvironmentUtilities.cpp in Sources */,
                                1A7C6CDA1378950800B9C04D /* EnvironmentVariables.cpp in Sources */,
                                1AA575FA1496B52600A4EE06 /* EventDispatcher.cpp in Sources */,
+                               1A9E328A1821636900F5D04C /* WKRemoteObjectRegistry.mm in Sources */,
                                1AA576021496B97900A4EE06 /* EventDispatcherMessageReceiver.cpp in Sources */,
                                1A90C1F51264FD71003E44D4 /* FindController.cpp in Sources */,
                                1A910072126675C4001842F5 /* FindIndicator.cpp in Sources */,
                                1A232902162C867300D82F7A /* MessageDecoder.cpp in Sources */,
                                1A2328FE162C866A00D82F7A /* MessageEncoder.cpp in Sources */,
                                1A3EED0E161A535400AEB4F5 /* MessageReceiverMap.cpp in Sources */,
+                               1A9E328E182165A900F5D04C /* WKRemoteObjectInterface.mm in Sources */,
                                1A6506D2175015E700174518 /* MessageSender.cpp in Sources */,
                                C0E3AA7B1209E83500A49D01 /* Module.cpp in Sources */,
                                C0E3AA7A1209E83000A49D01 /* ModuleMac.mm in Sources */,