Add _ prefix to WKRemoteObjectRegistery and WKRemoteObjectInterface
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 27 Mar 2014 22:59:07 +0000 (22:59 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 27 Mar 2014 22:59:07 +0000 (22:59 +0000)
https://bugs.webkit.org/show_bug.cgi?id=130868

Reviewed by Sam Weinig.

* Shared/API/Cocoa/RemoteObjectRegistry.h:
* Shared/API/Cocoa/RemoteObjectRegistry.mm:
(WebKit::RemoteObjectRegistry::RemoteObjectRegistry):
* Shared/API/Cocoa/WKRemoteObject.h:
* Shared/API/Cocoa/WKRemoteObject.mm:
(-[WKRemoteObject _initWithObjectRegistry:interface:]):
* Shared/API/Cocoa/WKRemoteObjectCoder.h:
* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(-[WKRemoteObjectDecoder initWithInterface:rootObjectDictionary:WebKit::]):
* Shared/API/Cocoa/WKRemoteObjectInterface.h:
* Shared/API/Cocoa/WKRemoteObjectInterface.mm:
(isContainerClass): Deleted.
(propertyListClasses): Deleted.
(allowedArgumentClassesForMethod): Deleted.
(initializeAllowedArgumentClasses): Deleted.
(-[WKRemoteObjectInterface initWithProtocol:identifier:]): Deleted.
(+[WKRemoteObjectInterface remoteObjectInterfaceWithProtocol:]): Deleted.
(-[WKRemoteObjectInterface description]): Deleted.
(classesForSelectorArgument): Deleted.
(-[WKRemoteObjectInterface classesForSelector:argumentIndex:]): Deleted.
(-[WKRemoteObjectInterface setClasses:forSelector:argumentIndex:]): Deleted.
(methodArgumentTypeEncodingForSelector): Deleted.
(-[WKRemoteObjectInterface _methodSignatureForSelector:]): Deleted.
(-[WKRemoteObjectInterface _allowedArgumentClassesForSelector:]): Deleted.
* Shared/API/Cocoa/WKRemoteObjectRegistry.h:
* Shared/API/Cocoa/WKRemoteObjectRegistry.mm:
(-[WKRemoteObjectRegistry registerExportedObject:interface:]): Deleted.
(-[WKRemoteObjectRegistry unregisterExportedObject:interface:]): Deleted.
(-[WKRemoteObjectRegistry remoteObjectProxyWithInterface:]): Deleted.
(-[WKRemoteObjectRegistry _initWithMessageSender:IPC::]): Deleted.
(-[WKRemoteObjectRegistry _invalidate]): Deleted.
(-[WKRemoteObjectRegistry _sendInvocation:interface:]): Deleted.
(-[WKRemoteObjectRegistry WebKit::]): Deleted.
(-[WKRemoteObjectRegistry _invokeMethod:]): Deleted.
(-[WKRemoteObjectRegistry _invokeMessageWithInterfaceIdentifier:encodedInvocation:]): Deleted.
* Shared/API/Cocoa/_WKRemoteObjectInterface.h: Copied from Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectInterface.h.
* Shared/API/Cocoa/_WKRemoteObjectInterface.mm: Copied from Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectInterface.mm.
(isContainerClass):
(propertyListClasses):
(allowedArgumentClassesForMethod):
(initializeAllowedArgumentClasses):
(-[_WKRemoteObjectInterface initWithProtocol:identifier:]):
(+[_WKRemoteObjectInterface remoteObjectInterfaceWithProtocol:]):
(-[_WKRemoteObjectInterface description]):
(classesForSelectorArgument):
(-[_WKRemoteObjectInterface classesForSelector:argumentIndex:]):
(-[_WKRemoteObjectInterface setClasses:forSelector:argumentIndex:]):
(methodArgumentTypeEncodingForSelector):
(-[_WKRemoteObjectInterface _methodSignatureForSelector:]):
(-[_WKRemoteObjectInterface _allowedArgumentClassesForSelector:]):
* Shared/API/Cocoa/_WKRemoteObjectInterfaceInternal.h: Renamed from Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectInterfaceInternal.h.
* Shared/API/Cocoa/_WKRemoteObjectRegistry.h: Copied from Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectRegistry.h.
* Shared/API/Cocoa/_WKRemoteObjectRegistry.mm: Copied from Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectRegistry.mm.
(-[_WKRemoteObjectRegistry registerExportedObject:interface:]):
(-[_WKRemoteObjectRegistry unregisterExportedObject:interface:]):
(-[_WKRemoteObjectRegistry remoteObjectProxyWithInterface:]):
(-[_WKRemoteObjectRegistry _initWithMessageSender:IPC::]):
(-[_WKRemoteObjectRegistry _invalidate]):
(-[_WKRemoteObjectRegistry _sendInvocation:interface:]):
(-[_WKRemoteObjectRegistry WebKit::]):
(-[_WKRemoteObjectRegistry _invokeMethod:]):
(-[_WKRemoteObjectRegistry _invokeMessageWithInterfaceIdentifier:encodedInvocation:]):
* Shared/API/Cocoa/_WKRemoteObjectRegistryInternal.h: Renamed from Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectRegistryInternal.h.
* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(-[WKBrowsingContextController _remoteObjectRegistry]):
(-[WKBrowsingContextController remoteObjectRegistry]): Deleted.
* UIProcess/API/Cocoa/WKBrowsingContextControllerPrivate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _remoteObjectRegistry]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInBrowserContextControllerToBeRemoved.mm: Copied from Source/WebKit2/Shared/API/Cocoa/WKRemoteObject.h.
(-[WKWebProcessPlugInBrowserContextController remoteObjectRegistry]):
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(-[WKWebProcessPlugInBrowserContextController _remoteObjectRegistry]):
(-[WKWebProcessPlugInBrowserContextController remoteObjectRegistry]): Deleted.
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:

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

26 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/API/Cocoa/RemoteObjectRegistry.h
Source/WebKit2/Shared/API/Cocoa/RemoteObjectRegistry.mm
Source/WebKit2/Shared/API/Cocoa/WKRemoteObject.h
Source/WebKit2/Shared/API/Cocoa/WKRemoteObject.mm
Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectCoder.h
Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectCoder.mm
Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectInterface.h
Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectInterface.mm
Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectRegistry.h
Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectRegistry.mm
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/_WKRemoteObjectInterfaceInternal.h [moved from Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectInterfaceInternal.h with 95% similarity]
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/Shared/API/Cocoa/_WKRemoteObjectRegistryInternal.h [moved from Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectRegistryInternal.h with 90% similarity]
Source/WebKit2/UIProcess/API/Cocoa/WKBrowsingContextController.mm
Source/WebKit2/UIProcess/API/Cocoa/WKBrowsingContextControllerPrivate.h
Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm
Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h
Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
Source/WebKit2/WebKit2Prefix.h
Source/WebKit2/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInBrowserContextControllerToBeRemoved.mm [new file with mode: 0644]
Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm
Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h

index bc70326..87cc1ae 100644 (file)
@@ -1,3 +1,88 @@
+2014-03-27  Anders Carlsson  <andersca@apple.com>
+
+        Add _ prefix to WKRemoteObjectRegistery and WKRemoteObjectInterface
+        https://bugs.webkit.org/show_bug.cgi?id=130868
+
+        Reviewed by Sam Weinig.
+
+        * Shared/API/Cocoa/RemoteObjectRegistry.h:
+        * Shared/API/Cocoa/RemoteObjectRegistry.mm:
+        (WebKit::RemoteObjectRegistry::RemoteObjectRegistry):
+        * Shared/API/Cocoa/WKRemoteObject.h:
+        * Shared/API/Cocoa/WKRemoteObject.mm:
+        (-[WKRemoteObject _initWithObjectRegistry:interface:]):
+        * Shared/API/Cocoa/WKRemoteObjectCoder.h:
+        * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
+        (-[WKRemoteObjectDecoder initWithInterface:rootObjectDictionary:WebKit::]):
+        * Shared/API/Cocoa/WKRemoteObjectInterface.h:
+        * Shared/API/Cocoa/WKRemoteObjectInterface.mm:
+        (isContainerClass): Deleted.
+        (propertyListClasses): Deleted.
+        (allowedArgumentClassesForMethod): Deleted.
+        (initializeAllowedArgumentClasses): Deleted.
+        (-[WKRemoteObjectInterface initWithProtocol:identifier:]): Deleted.
+        (+[WKRemoteObjectInterface remoteObjectInterfaceWithProtocol:]): Deleted.
+        (-[WKRemoteObjectInterface description]): Deleted.
+        (classesForSelectorArgument): Deleted.
+        (-[WKRemoteObjectInterface classesForSelector:argumentIndex:]): Deleted.
+        (-[WKRemoteObjectInterface setClasses:forSelector:argumentIndex:]): Deleted.
+        (methodArgumentTypeEncodingForSelector): Deleted.
+        (-[WKRemoteObjectInterface _methodSignatureForSelector:]): Deleted.
+        (-[WKRemoteObjectInterface _allowedArgumentClassesForSelector:]): Deleted.
+        * Shared/API/Cocoa/WKRemoteObjectRegistry.h:
+        * Shared/API/Cocoa/WKRemoteObjectRegistry.mm:
+        (-[WKRemoteObjectRegistry registerExportedObject:interface:]): Deleted.
+        (-[WKRemoteObjectRegistry unregisterExportedObject:interface:]): Deleted.
+        (-[WKRemoteObjectRegistry remoteObjectProxyWithInterface:]): Deleted.
+        (-[WKRemoteObjectRegistry _initWithMessageSender:IPC::]): Deleted.
+        (-[WKRemoteObjectRegistry _invalidate]): Deleted.
+        (-[WKRemoteObjectRegistry _sendInvocation:interface:]): Deleted.
+        (-[WKRemoteObjectRegistry WebKit::]): Deleted.
+        (-[WKRemoteObjectRegistry _invokeMethod:]): Deleted.
+        (-[WKRemoteObjectRegistry _invokeMessageWithInterfaceIdentifier:encodedInvocation:]): Deleted.
+        * Shared/API/Cocoa/_WKRemoteObjectInterface.h: Copied from Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectInterface.h.
+        * Shared/API/Cocoa/_WKRemoteObjectInterface.mm: Copied from Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectInterface.mm.
+        (isContainerClass):
+        (propertyListClasses):
+        (allowedArgumentClassesForMethod):
+        (initializeAllowedArgumentClasses):
+        (-[_WKRemoteObjectInterface initWithProtocol:identifier:]):
+        (+[_WKRemoteObjectInterface remoteObjectInterfaceWithProtocol:]):
+        (-[_WKRemoteObjectInterface description]):
+        (classesForSelectorArgument):
+        (-[_WKRemoteObjectInterface classesForSelector:argumentIndex:]):
+        (-[_WKRemoteObjectInterface setClasses:forSelector:argumentIndex:]):
+        (methodArgumentTypeEncodingForSelector):
+        (-[_WKRemoteObjectInterface _methodSignatureForSelector:]):
+        (-[_WKRemoteObjectInterface _allowedArgumentClassesForSelector:]):
+        * Shared/API/Cocoa/_WKRemoteObjectInterfaceInternal.h: Renamed from Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectInterfaceInternal.h.
+        * Shared/API/Cocoa/_WKRemoteObjectRegistry.h: Copied from Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectRegistry.h.
+        * Shared/API/Cocoa/_WKRemoteObjectRegistry.mm: Copied from Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectRegistry.mm.
+        (-[_WKRemoteObjectRegistry registerExportedObject:interface:]):
+        (-[_WKRemoteObjectRegistry unregisterExportedObject:interface:]):
+        (-[_WKRemoteObjectRegistry remoteObjectProxyWithInterface:]):
+        (-[_WKRemoteObjectRegistry _initWithMessageSender:IPC::]):
+        (-[_WKRemoteObjectRegistry _invalidate]):
+        (-[_WKRemoteObjectRegistry _sendInvocation:interface:]):
+        (-[_WKRemoteObjectRegistry WebKit::]):
+        (-[_WKRemoteObjectRegistry _invokeMethod:]):
+        (-[_WKRemoteObjectRegistry _invokeMessageWithInterfaceIdentifier:encodedInvocation:]):
+        * Shared/API/Cocoa/_WKRemoteObjectRegistryInternal.h: Renamed from Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectRegistryInternal.h.
+        * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
+        (-[WKBrowsingContextController _remoteObjectRegistry]):
+        (-[WKBrowsingContextController remoteObjectRegistry]): Deleted.
+        * UIProcess/API/Cocoa/WKBrowsingContextControllerPrivate.h:
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (-[WKWebView _remoteObjectRegistry]):
+        * UIProcess/API/Cocoa/WKWebViewPrivate.h:
+        * WebKit2.xcodeproj/project.pbxproj:
+        * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInBrowserContextControllerToBeRemoved.mm: Copied from Source/WebKit2/Shared/API/Cocoa/WKRemoteObject.h.
+        (-[WKWebProcessPlugInBrowserContextController remoteObjectRegistry]):
+        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
+        (-[WKWebProcessPlugInBrowserContextController _remoteObjectRegistry]):
+        (-[WKWebProcessPlugInBrowserContextController remoteObjectRegistry]): Deleted.
+        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:
+
 2014-03-27  Commit Queue  <commit-queue@webkit.org>
 
         Unreviewed, rolling out r166360.
index 457c9e4..1389357 100644 (file)
@@ -28,7 +28,7 @@
 
 #include "MessageReceiver.h"
 
-OBJC_CLASS WKRemoteObjectRegistry;
+OBJC_CLASS _WKRemoteObjectRegistry;
 
 namespace IPC {
 class MessageSender;
@@ -40,7 +40,7 @@ class UserData;
 
 class RemoteObjectRegistry final : public IPC::MessageReceiver {
 public:
-    RemoteObjectRegistry(WKRemoteObjectRegistry *, IPC::MessageSender&);
+    RemoteObjectRegistry(_WKRemoteObjectRegistry *, IPC::MessageSender&);
     ~RemoteObjectRegistry();
 
     void sendInvocation(const UserData&);
@@ -52,7 +52,7 @@ private:
     // Message handlers
     void invokeMethod(const UserData&);
 
-    WKRemoteObjectRegistry *m_remoteObjectRegistry;
+    _WKRemoteObjectRegistry *m_remoteObjectRegistry;
     IPC::MessageSender& m_messageSender;
 };
 
index a030e80..6f7fdab 100644 (file)
 #import "MessageSender.h"
 #import "RemoteObjectRegistryMessages.h"
 #import "UserData.h"
-#import "WKRemoteObjectRegistryInternal.h"
+#import "_WKRemoteObjectRegistryInternal.h"
 
 namespace WebKit {
 
-RemoteObjectRegistry::RemoteObjectRegistry(WKRemoteObjectRegistry *remoteObjectRegistry, IPC::MessageSender& messageSender)
+RemoteObjectRegistry::RemoteObjectRegistry(_WKRemoteObjectRegistry *remoteObjectRegistry, IPC::MessageSender& messageSender)
     : m_remoteObjectRegistry(remoteObjectRegistry)
     , m_messageSender(messageSender)
 {
index fa1c6ec..4abf2c9 100644 (file)
 
 #if WK_API_ENABLED
 
-@class WKRemoteObjectInterface;
-@class WKRemoteObjectRegistry;
+@class _WKRemoteObjectInterface;
+@class _WKRemoteObjectRegistry;
 
 @interface WKRemoteObject : NSObject
 
-- (instancetype)_initWithObjectRegistry:(WKRemoteObjectRegistry *)objectRegistry interface:(WKRemoteObjectInterface *)interface;
+- (instancetype)_initWithObjectRegistry:(_WKRemoteObjectRegistry *)objectRegistry interface:(_WKRemoteObjectInterface *)interface;
 
 @end
 
index 118f038..94f558b 100644 (file)
 
 #if WK_API_ENABLED
 
-#import "WKRemoteObjectInterface.h"
-#import "WKRemoteObjectRegistryInternal.h"
+#import "_WKRemoteObjectInterface.h"
+#import "_WKRemoteObjectRegistryInternal.h"
 #import <objc/runtime.h>
 #import <wtf/RetainPtr.h>
 
 @implementation WKRemoteObject {
-    RetainPtr<WKRemoteObjectRegistry> _objectRegistry;
-    RetainPtr<WKRemoteObjectInterface> _interface;
+    RetainPtr<_WKRemoteObjectRegistry> _objectRegistry;
+    RetainPtr<_WKRemoteObjectInterface> _interface;
 }
 
-- (instancetype)_initWithObjectRegistry:(WKRemoteObjectRegistry *)objectRegistry interface:(WKRemoteObjectInterface *)interface
+- (instancetype)_initWithObjectRegistry:(_WKRemoteObjectRegistry *)objectRegistry interface:(_WKRemoteObjectInterface *)interface
 {
     if (!(self = [super init]))
         return nil;
index fc1dc3c..0da0ebe 100644 (file)
@@ -31,7 +31,7 @@ namespace WebKit {
 class ImmutableDictionary;
 }
 
-@class WKRemoteObjectInterface;
+@class _WKRemoteObjectInterface;
 
 @interface WKRemoteObjectEncoder : NSCoder
 
@@ -41,7 +41,7 @@ class ImmutableDictionary;
 
 @interface WKRemoteObjectDecoder : NSCoder
 
-- (id)initWithInterface:(WKRemoteObjectInterface *)interface rootObjectDictionary:(const WebKit::ImmutableDictionary*)rootObjectDictionary;
+- (id)initWithInterface:(_WKRemoteObjectInterface *)interface rootObjectDictionary:(const WebKit::ImmutableDictionary*)rootObjectDictionary;
 
 @end
 
index 1141939..e543bdb 100644 (file)
@@ -33,7 +33,7 @@
 #import "APINumber.h"
 #import "APIString.h"
 #import "MutableDictionary.h"
-#import "WKRemoteObjectInterfaceInternal.h"
+#import "_WKRemoteObjectInterfaceInternal.h"
 #import <objc/runtime.h>
 #import <wtf/RetainPtr.h>
 #import <wtf/TemporaryChange.h>
@@ -290,7 +290,7 @@ static NSString *escapeKey(NSString *key)
 @end
 
 @implementation WKRemoteObjectDecoder {
-    RetainPtr<WKRemoteObjectInterface> _interface;
+    RetainPtr<_WKRemoteObjectInterface> _interface;
 
     const ImmutableDictionary* _rootDictionary;
     const ImmutableDictionary* _currentDictionary;
@@ -301,7 +301,7 @@ static NSString *escapeKey(NSString *key)
     NSSet *_allowedClasses;
 }
 
-- (id)initWithInterface:(WKRemoteObjectInterface *)interface rootObjectDictionary:(const WebKit::ImmutableDictionary*)rootObjectDictionary
+- (id)initWithInterface:(_WKRemoteObjectInterface *)interface rootObjectDictionary:(const WebKit::ImmutableDictionary*)rootObjectDictionary
 {
     if (!(self = [super init]))
         return nil;
index 4a90404..66d213f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013 Apple Inc. All rights reserved.
+ * 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
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#import <WebKit2/WKFoundation.h>
+#import <WebKit2/_WKRemoteObjectInterface.h>
 
 #if WK_API_ENABLED
 
-#import <Foundation/Foundation.h>
-
 WK_API_CLASS
-@interface WKRemoteObjectInterface : NSObject
-
-+ (instancetype)remoteObjectInterfaceWithProtocol:(Protocol *)protocol;
-
-- (id)initWithProtocol:(Protocol *)protocol identifier:(NSString *)identifier;
-
-@property (readonly) Protocol *protocol;
-@property (readonly) NSString *identifier;
-
-- (NSSet *)classesForSelector:(SEL)selector argumentIndex:(NSUInteger)argumentIndex;
-- (void)setClasses:(NSSet *)classes forSelector:(SEL)selector argumentIndex:(NSUInteger)argumentIndex;
+@interface WKRemoteObjectInterface : _WKRemoteObjectInterface
 
 @end
 
-#endif // WK_API_ENABLED
+#endif
index 0b14036..f22b3fa 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013 Apple Inc. All rights reserved.
+ * 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
 
 #if WK_API_ENABLED
 
-#import <objc/runtime.h>
-#import <wtf/HashMap.h>
-#import <wtf/Vector.h>
-#import <wtf/RetainPtr.h>
-
-extern "C"
-const char *_protocol_getMethodTypeEncoding(Protocol *p, SEL sel, BOOL isRequiredMethod, BOOL isInstanceMethod);
-
-@interface NSMethodSignature (WKDetails)
-- (Class)_classForObjectAtArgumentIndex:(NSInteger)idx;
-@end
-
-@implementation WKRemoteObjectInterface {
-    HashMap<SEL, Vector<RetainPtr<NSSet>>> _allowedArgumentClasses;
-}
-
-static bool isContainerClass(Class objectClass)
-{
-    // FIXME: Add more classes here if needed.
-    static NSSet *containerClasses = [[NSSet alloc] initWithObjects:[NSArray class], [NSDictionary class], nil];
-
-    return [containerClasses containsObject:objectClass];
-}
-
-static NSSet *propertyListClasses()
-{
-    // FIXME: Add more property list classes if needed.
-    static NSSet *propertyListClasses = [[NSSet alloc] initWithObjects:[NSArray class], [NSDictionary class], [NSNumber class], [NSString class], nil];
-
-    return propertyListClasses;
-}
-
-static Vector<RetainPtr<NSSet>> allowedArgumentClassesForMethod(NSMethodSignature *methodSignature)
-{
-    Vector<RetainPtr<NSSet>> result;
-
-    NSSet *emptySet = [NSSet set];
-
-    // We ignore self and _cmd.
-    NSUInteger argumentCount = methodSignature.numberOfArguments - 2;
-
-    result.reserveInitialCapacity(argumentCount);
-
-    for (NSUInteger i = 0; i < argumentCount; ++i) {
-        const char* type = [methodSignature getArgumentTypeAtIndex:i + 2];
-
-        if (*type != '@') {
-            // This is a non-object type; we won't allow any classes to be decoded for it.
-            result.uncheckedAppend(emptySet);
-            continue;
-        }
-
-        Class objectClass = [methodSignature _classForObjectAtArgumentIndex:i + 2];
-        if (!objectClass) {
-            result.uncheckedAppend(emptySet);
-            continue;
-        }
-
-        if (isContainerClass(objectClass)) {
-            // For container classes, we allow all simple property list classes.
-            result.uncheckedAppend(propertyListClasses());
-            continue;
-        }
-
-        result.uncheckedAppend([NSSet setWithObject:objectClass]);
-    }
-
-    return result;
-}
-
-static void initializeAllowedArgumentClasses(WKRemoteObjectInterface *interface, bool requiredMethods)
-{
-    unsigned methodCount;
-    struct objc_method_description *methods = protocol_copyMethodDescriptionList(interface->_protocol, requiredMethods, true, &methodCount);
-
-    for (unsigned i = 0; i < methodCount; ++i) {
-        SEL selector = methods[i].name;
-
-        const char* types = _protocol_getMethodTypeEncoding(interface->_protocol, selector, requiredMethods, true);
-        if (!types)
-            [NSException raise:NSInvalidArgumentException format:@"Could not find method type encoding for method \"%s\"", sel_getName(selector)];
-
-        NSMethodSignature *methodSignature = [NSMethodSignature signatureWithObjCTypes:types];
-        interface->_allowedArgumentClasses.set(selector, allowedArgumentClassesForMethod(methodSignature));
-    }
-
-    free(methods);
-}
-
-static void initializeAllowedArgumentClasses(WKRemoteObjectInterface *interface)
-{
-    initializeAllowedArgumentClasses(interface, true);
-    initializeAllowedArgumentClasses(interface, false);
-}
-
-- (id)initWithProtocol:(Protocol *)protocol identifier:(NSString *)identifier
-{
-    if (!(self = [super init]))
-        return nil;
-
-    _protocol = protocol;
-    _identifier = [identifier copy];
-
-    initializeAllowedArgumentClasses(self);
-
-    return self;
-}
-
-+ (instancetype)remoteObjectInterfaceWithProtocol:(Protocol *)protocol
-{
-    return [[[self alloc] initWithProtocol:protocol identifier:NSStringFromProtocol(protocol)] autorelease];
-}
-
-- (NSString *)description
-{
-    return [NSString stringWithFormat:@"<%@: %p; protocol = \"%@\"; identifier = \"%@\">", NSStringFromClass(self.class), self, _identifier, NSStringFromProtocol(_protocol)];
-}
-
-static RetainPtr<NSSet>& classesForSelectorArgument(WKRemoteObjectInterface *interface, SEL selector, NSUInteger argumentIndex)
-{
-    auto it = interface->_allowedArgumentClasses.find(selector);
-    if (it == interface->_allowedArgumentClasses.end())
-        [NSException raise:NSInvalidArgumentException format:@"Interface does not contain selector \"%s\"", sel_getName(selector)];
-
-    if (argumentIndex >= it->value.size())
-        [NSException raise:NSInvalidArgumentException format:@"Argument index %ld is out of range for selector \"%s\"", (unsigned long)argumentIndex, sel_getName(selector)];
-
-    return it->value[argumentIndex];
-}
-
-- (NSSet *)classesForSelector:(SEL)selector argumentIndex:(NSUInteger)argumentIndex
-{
-    return [[classesForSelectorArgument(self, selector, argumentIndex).get() retain] autorelease];
-}
-
-- (void)setClasses:(NSSet *)classes forSelector:(SEL)selector argumentIndex:(NSUInteger)argumentIndex
-{
-    classesForSelectorArgument(self, selector, argumentIndex) = adoptNS([classes copy]);
-}
-
-static const char* methodArgumentTypeEncodingForSelector(Protocol *protocol, SEL selector)
-{
-    // First look at required methods.
-    struct objc_method_description method = protocol_getMethodDescription(protocol, selector, YES, YES);
-    if (method.name)
-        return method.types;
-
-    // Then look at optional methods.
-    method = protocol_getMethodDescription(protocol, selector, NO, YES);
-    if (method.name)
-        return method.types;
-
-    return nullptr;
-}
-
-- (NSMethodSignature *)_methodSignatureForSelector:(SEL)selector
-{
-    const char* types = methodArgumentTypeEncodingForSelector(_protocol, selector);
-    if (!types)
-        return nil;
-
-    return [NSMethodSignature signatureWithObjCTypes:types];
-}
-
-- (const Vector<RetainPtr<NSSet>>&)_allowedArgumentClassesForSelector:(SEL)selector
-{
-    auto it = _allowedArgumentClasses.find(selector);
-    ASSERT(it != _allowedArgumentClasses.end());
-
-    return it->value;
-}
+@implementation WKRemoteObjectInterface
 
 @end
 
-#endif // WK_API_ENABLED
+#endif
index 65f5db7..41659ba 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013 Apple Inc. All rights reserved.
+ * 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
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#import <WebKit2/WKFoundation.h>
+#import <WebKit2/_WKRemoteObjectRegistry.h>
 
 #if WK_API_ENABLED
 
-#import <Foundation/Foundation.h>
-
-@class WKRemoteObjectInterface;
-
 WK_API_CLASS
-@interface WKRemoteObjectRegistry : NSObject
-
-- (void)registerExportedObject:(id)object interface:(WKRemoteObjectInterface *)interface;
-- (void)unregisterExportedObject:(id)object interface:(WKRemoteObjectInterface *)interface;
-
-- (id)remoteObjectProxyWithInterface:(WKRemoteObjectInterface *)interface;
+@interface WKRemoteObjectRegistry : _WKRemoteObjectRegistry
 
 @end
 
-#endif // WK_API_ENABLED
+#endif
index 0d8f359..3e997ae 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013 Apple Inc. All rights reserved.
+ * 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
  */
 
 #import "config.h"
-#import "WKRemoteObjectRegistryInternal.h"
+#import "WKRemoteObjectRegistry.h"
 
 #if WK_API_ENABLED
 
-#import "Connection.h"
-#import "ImmutableDictionary.h"
-#import "MutableDictionary.h"
-#import "RemoteObjectRegistry.h"
-#import "UserData.h"
-#import "WKConnectionRef.h"
-#import "WKRemoteObject.h"
-#import "WKRemoteObjectCoder.h"
-#import "WKRemoteObjectInterface.h"
-#import "WKSharedAPICast.h"
-#import "WebConnection.h"
-
-const char* const encodedInvocationKey = "encodedInvocation";
-const char* const interfaceIdentifierKey = "interfaceIdentifier";
-
-NSString * const invocationKey = @"invocation";
-
-using namespace WebKit;
-
-@implementation WKRemoteObjectRegistry {
-    std::unique_ptr<RemoteObjectRegistry> _remoteObjectRegistry;
-
-    RetainPtr<NSMapTable> _remoteObjectProxies;
-    HashMap<String, std::pair<RetainPtr<id>, RetainPtr<WKRemoteObjectInterface>>> _exportedObjects;
-}
-
-- (void)registerExportedObject:(id)object interface:(WKRemoteObjectInterface *)interface
-{
-    ASSERT(!_exportedObjects.contains(interface.identifier));
-    _exportedObjects.add(interface.identifier, std::make_pair<RetainPtr<id>, RetainPtr<WKRemoteObjectInterface>>(object, interface));
-}
-
-- (void)unregisterExportedObject:(id)object interface:(WKRemoteObjectInterface *)interface
-{
-    ASSERT(_exportedObjects.get(interface.identifier).first == object);
-    ASSERT(_exportedObjects.get(interface.identifier).second == interface);
-
-    _exportedObjects.remove(interface.identifier);
-}
-
-- (id)remoteObjectProxyWithInterface:(WKRemoteObjectInterface *)interface
-{
-    if (!_remoteObjectProxies)
-        _remoteObjectProxies = [NSMapTable strongToWeakObjectsMapTable];
-
-    if (id remoteObjectProxy = [_remoteObjectProxies objectForKey:interface.identifier])
-        return remoteObjectProxy;
-
-    RetainPtr<NSString> identifier = adoptNS([interface.identifier copy]);
-    RetainPtr<WKRemoteObject> remoteObject = adoptNS([[WKRemoteObject alloc] _initWithObjectRegistry:self interface:interface]);
-    [_remoteObjectProxies setObject:remoteObject.get() forKey:identifier.get()];
-
-    return [remoteObject.leakRef() autorelease];
-}
-
-- (id)_initWithMessageSender:(IPC::MessageSender&)messageSender
-{
-    if (!(self = [super init]))
-        return nil;
-
-    _remoteObjectRegistry = std::make_unique<RemoteObjectRegistry>(self, messageSender);
-
-    return self;
-}
-
-- (void)_invalidate
-{
-    _remoteObjectRegistry = nullptr;
-}
-
-- (void)_sendInvocation:(NSInvocation *)invocation interface:(WKRemoteObjectInterface *)interface
-{
-    RetainPtr<WKRemoteObjectEncoder> encoder = adoptNS([[WKRemoteObjectEncoder alloc] init]);
-    [encoder encodeObject:invocation forKey:invocationKey];
-
-    RefPtr<MutableDictionary> body = MutableDictionary::create();
-    body->set(interfaceIdentifierKey, API::String::create(interface.identifier));
-    body->set(encodedInvocationKey, [encoder rootObjectDictionary]);
-
-    if (!_remoteObjectRegistry)
-        return;
-
-    _remoteObjectRegistry->sendInvocation(UserData(body.get()));
-}
-
-- (WebKit::RemoteObjectRegistry&)remoteObjectRegistry
-{
-    return *_remoteObjectRegistry;
-}
-
-- (BOOL)_invokeMethod:(const UserData&)invocation
-{
-    if (!invocation.object() || invocation.object()->type() != API::Object::Type::Dictionary)
-        return NO;
-    
-    const ImmutableDictionary& dictionary = static_cast<const ImmutableDictionary&>(*invocation.object());
-
-    API::String* interfaceIdentifier = dictionary.get<API::String>(interfaceIdentifierKey);
-    if (!interfaceIdentifier)
-        return NO;
-
-    const ImmutableDictionary* encodedInvocation = dictionary.get<ImmutableDictionary>(encodedInvocationKey);
-    if (!encodedInvocationKey)
-        return NO;
-
-    [self _invokeMessageWithInterfaceIdentifier:interfaceIdentifier->string() encodedInvocation:encodedInvocation];
-
-    return YES;
-}
-
-- (void)_invokeMessageWithInterfaceIdentifier:(const String&)interfaceIdentifier encodedInvocation:(const ImmutableDictionary*)encodedInvocation
-{
-    auto interfaceAndObject = _exportedObjects.get(interfaceIdentifier);
-    if (!interfaceAndObject.second) {
-        NSLog(@"Did not find a registered object for the interface \"%@\"", (NSString *)interfaceIdentifier);
-        return;
-    }
-
-    RetainPtr<WKRemoteObjectDecoder> decoder = adoptNS([[WKRemoteObjectDecoder alloc] initWithInterface:interfaceAndObject.second.get() rootObjectDictionary:encodedInvocation]);
-
-    NSInvocation *invocation = nil;
-
-    @try {
-        invocation = [decoder decodeObjectOfClass:[NSInvocation class] forKey:invocationKey];
-    } @catch (NSException *exception) {
-        NSLog(@"Exception caught during decoding of message: %@", exception);
-    }
-
-    invocation.target = interfaceAndObject.first.get();
-
-    @try {
-        [invocation invoke];
-    } @catch (NSException *exception) {
-        NSLog(@"%@: Warning: Exception caught during invocation of received message, dropping incoming message .\nException: %@", self, exception);
-    }
-}
+@implementation WKRemoteObjectRegistry
 
 @end
 
-#endif // WK_API_ENABLED
+#endif
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..17aa227
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * 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
+
+#import <Foundation/Foundation.h>
+
+WK_API_CLASS
+@interface _WKRemoteObjectInterface : NSObject
+
++ (instancetype)remoteObjectInterfaceWithProtocol:(Protocol *)protocol;
+
+- (id)initWithProtocol:(Protocol *)protocol identifier:(NSString *)identifier;
+
+@property (readonly) Protocol *protocol;
+@property (readonly) NSString *identifier;
+
+- (NSSet *)classesForSelector:(SEL)selector argumentIndex:(NSUInteger)argumentIndex;
+- (void)setClasses:(NSSet *)classes forSelector:(SEL)selector argumentIndex:(NSUInteger)argumentIndex;
+
+@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..c4d4195
--- /dev/null
@@ -0,0 +1,205 @@
+/*
+ * 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
+
+#import <objc/runtime.h>
+#import <wtf/HashMap.h>
+#import <wtf/Vector.h>
+#import <wtf/RetainPtr.h>
+
+extern "C"
+const char *_protocol_getMethodTypeEncoding(Protocol *p, SEL sel, BOOL isRequiredMethod, BOOL isInstanceMethod);
+
+@interface NSMethodSignature (WKDetails)
+- (Class)_classForObjectAtArgumentIndex:(NSInteger)idx;
+@end
+
+@implementation _WKRemoteObjectInterface {
+    HashMap<SEL, Vector<RetainPtr<NSSet>>> _allowedArgumentClasses;
+}
+
+static bool isContainerClass(Class objectClass)
+{
+    // FIXME: Add more classes here if needed.
+    static NSSet *containerClasses = [[NSSet alloc] initWithObjects:[NSArray class], [NSDictionary class], nil];
+
+    return [containerClasses containsObject:objectClass];
+}
+
+static NSSet *propertyListClasses()
+{
+    // FIXME: Add more property list classes if needed.
+    static NSSet *propertyListClasses = [[NSSet alloc] initWithObjects:[NSArray class], [NSDictionary class], [NSNumber class], [NSString class], nil];
+
+    return propertyListClasses;
+}
+
+static Vector<RetainPtr<NSSet>> allowedArgumentClassesForMethod(NSMethodSignature *methodSignature)
+{
+    Vector<RetainPtr<NSSet>> result;
+
+    NSSet *emptySet = [NSSet set];
+
+    // We ignore self and _cmd.
+    NSUInteger argumentCount = methodSignature.numberOfArguments - 2;
+
+    result.reserveInitialCapacity(argumentCount);
+
+    for (NSUInteger i = 0; i < argumentCount; ++i) {
+        const char* type = [methodSignature getArgumentTypeAtIndex:i + 2];
+
+        if (*type != '@') {
+            // This is a non-object type; we won't allow any classes to be decoded for it.
+            result.uncheckedAppend(emptySet);
+            continue;
+        }
+
+        Class objectClass = [methodSignature _classForObjectAtArgumentIndex:i + 2];
+        if (!objectClass) {
+            result.uncheckedAppend(emptySet);
+            continue;
+        }
+
+        if (isContainerClass(objectClass)) {
+            // For container classes, we allow all simple property list classes.
+            result.uncheckedAppend(propertyListClasses());
+            continue;
+        }
+
+        result.uncheckedAppend([NSSet setWithObject:objectClass]);
+    }
+
+    return result;
+}
+
+static void initializeAllowedArgumentClasses(_WKRemoteObjectInterface *interface, bool requiredMethods)
+{
+    unsigned methodCount;
+    struct objc_method_description *methods = protocol_copyMethodDescriptionList(interface->_protocol, requiredMethods, true, &methodCount);
+
+    for (unsigned i = 0; i < methodCount; ++i) {
+        SEL selector = methods[i].name;
+
+        const char* types = _protocol_getMethodTypeEncoding(interface->_protocol, selector, requiredMethods, true);
+        if (!types)
+            [NSException raise:NSInvalidArgumentException format:@"Could not find method type encoding for method \"%s\"", sel_getName(selector)];
+
+        NSMethodSignature *methodSignature = [NSMethodSignature signatureWithObjCTypes:types];
+        interface->_allowedArgumentClasses.set(selector, allowedArgumentClassesForMethod(methodSignature));
+    }
+
+    free(methods);
+}
+
+static void initializeAllowedArgumentClasses(_WKRemoteObjectInterface *interface)
+{
+    initializeAllowedArgumentClasses(interface, true);
+    initializeAllowedArgumentClasses(interface, false);
+}
+
+- (id)initWithProtocol:(Protocol *)protocol identifier:(NSString *)identifier
+{
+    if (!(self = [super init]))
+        return nil;
+
+    _protocol = protocol;
+    _identifier = [identifier copy];
+
+    initializeAllowedArgumentClasses(self);
+
+    return self;
+}
+
++ (instancetype)remoteObjectInterfaceWithProtocol:(Protocol *)protocol
+{
+    return [[[self alloc] initWithProtocol:protocol identifier:NSStringFromProtocol(protocol)] autorelease];
+}
+
+- (NSString *)description
+{
+    return [NSString stringWithFormat:@"<%@: %p; protocol = \"%@\"; identifier = \"%@\">", NSStringFromClass(self.class), self, _identifier, NSStringFromProtocol(_protocol)];
+}
+
+static RetainPtr<NSSet>& classesForSelectorArgument(_WKRemoteObjectInterface *interface, SEL selector, NSUInteger argumentIndex)
+{
+    auto it = interface->_allowedArgumentClasses.find(selector);
+    if (it == interface->_allowedArgumentClasses.end())
+        [NSException raise:NSInvalidArgumentException format:@"Interface does not contain selector \"%s\"", sel_getName(selector)];
+
+    if (argumentIndex >= it->value.size())
+        [NSException raise:NSInvalidArgumentException format:@"Argument index %ld is out of range for selector \"%s\"", (unsigned long)argumentIndex, sel_getName(selector)];
+
+    return it->value[argumentIndex];
+}
+
+- (NSSet *)classesForSelector:(SEL)selector argumentIndex:(NSUInteger)argumentIndex
+{
+    return [[classesForSelectorArgument(self, selector, argumentIndex).get() retain] autorelease];
+}
+
+- (void)setClasses:(NSSet *)classes forSelector:(SEL)selector argumentIndex:(NSUInteger)argumentIndex
+{
+    classesForSelectorArgument(self, selector, argumentIndex) = adoptNS([classes copy]);
+}
+
+static const char* methodArgumentTypeEncodingForSelector(Protocol *protocol, SEL selector)
+{
+    // First look at required methods.
+    struct objc_method_description method = protocol_getMethodDescription(protocol, selector, YES, YES);
+    if (method.name)
+        return method.types;
+
+    // Then look at optional methods.
+    method = protocol_getMethodDescription(protocol, selector, NO, YES);
+    if (method.name)
+        return method.types;
+
+    return nullptr;
+}
+
+- (NSMethodSignature *)_methodSignatureForSelector:(SEL)selector
+{
+    const char* types = methodArgumentTypeEncodingForSelector(_protocol, selector);
+    if (!types)
+        return nil;
+
+    return [NSMethodSignature signatureWithObjCTypes:types];
+}
+
+- (const Vector<RetainPtr<NSSet>>&)_allowedArgumentClassesForSelector:(SEL)selector
+{
+    auto it = _allowedArgumentClasses.find(selector);
+    ASSERT(it != _allowedArgumentClasses.end());
+
+    return it->value;
+}
+
+@end
+
+#endif // WK_API_ENABLED
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#import "WKRemoteObjectInterface.h"
+#import "_WKRemoteObjectInterface.h"
 
 #if WK_API_ENABLED
 
 #import <wtf/Forward.h>
 #import <wtf/RetainPtr.h>
 
-@interface WKRemoteObjectInterface ()
+@interface _WKRemoteObjectInterface ()
 
 - (NSMethodSignature *)_methodSignatureForSelector:(SEL)selector;
 - (const Vector<RetainPtr<NSSet>>&)_allowedArgumentClassesForSelector:(SEL)selector;
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..5906202
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * 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
+
+#import <Foundation/Foundation.h>
+
+@class _WKRemoteObjectInterface;
+
+WK_API_CLASS
+@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..3f20648
--- /dev/null
@@ -0,0 +1,170 @@
+/*
+ * 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 "_WKRemoteObjectRegistryInternal.h"
+
+#if WK_API_ENABLED
+
+#import "Connection.h"
+#import "ImmutableDictionary.h"
+#import "MutableDictionary.h"
+#import "RemoteObjectRegistry.h"
+#import "UserData.h"
+#import "WKConnectionRef.h"
+#import "WKRemoteObject.h"
+#import "WKRemoteObjectCoder.h"
+#import "WKSharedAPICast.h"
+#import "WebConnection.h"
+#import "_WKRemoteObjectInterface.h"
+
+const char* const encodedInvocationKey = "encodedInvocation";
+const char* const interfaceIdentifierKey = "interfaceIdentifier";
+
+NSString * const invocationKey = @"invocation";
+
+using namespace WebKit;
+
+@implementation _WKRemoteObjectRegistry {
+    std::unique_ptr<RemoteObjectRegistry> _remoteObjectRegistry;
+
+    RetainPtr<NSMapTable> _remoteObjectProxies;
+    HashMap<String, std::pair<RetainPtr<id>, RetainPtr<_WKRemoteObjectInterface>>> _exportedObjects;
+}
+
+- (void)registerExportedObject:(id)object interface:(_WKRemoteObjectInterface *)interface
+{
+    ASSERT(!_exportedObjects.contains(interface.identifier));
+    _exportedObjects.add(interface.identifier, std::make_pair<RetainPtr<id>, RetainPtr<_WKRemoteObjectInterface>>(object, interface));
+}
+
+- (void)unregisterExportedObject:(id)object interface:(_WKRemoteObjectInterface *)interface
+{
+    ASSERT(_exportedObjects.get(interface.identifier).first == object);
+    ASSERT(_exportedObjects.get(interface.identifier).second == interface);
+
+    _exportedObjects.remove(interface.identifier);
+}
+
+- (id)remoteObjectProxyWithInterface:(_WKRemoteObjectInterface *)interface
+{
+    if (!_remoteObjectProxies)
+        _remoteObjectProxies = [NSMapTable strongToWeakObjectsMapTable];
+
+    if (id remoteObjectProxy = [_remoteObjectProxies objectForKey:interface.identifier])
+        return remoteObjectProxy;
+
+    RetainPtr<NSString> identifier = adoptNS([interface.identifier copy]);
+    RetainPtr<WKRemoteObject> remoteObject = adoptNS([[WKRemoteObject alloc] _initWithObjectRegistry:self interface:interface]);
+    [_remoteObjectProxies setObject:remoteObject.get() forKey:identifier.get()];
+
+    return [remoteObject.leakRef() autorelease];
+}
+
+- (id)_initWithMessageSender:(IPC::MessageSender&)messageSender
+{
+    if (!(self = [super init]))
+        return nil;
+
+    _remoteObjectRegistry = std::make_unique<RemoteObjectRegistry>(self, messageSender);
+
+    return self;
+}
+
+- (void)_invalidate
+{
+    _remoteObjectRegistry = nullptr;
+}
+
+- (void)_sendInvocation:(NSInvocation *)invocation interface:(_WKRemoteObjectInterface *)interface
+{
+    RetainPtr<WKRemoteObjectEncoder> encoder = adoptNS([[WKRemoteObjectEncoder alloc] init]);
+    [encoder encodeObject:invocation forKey:invocationKey];
+
+    RefPtr<MutableDictionary> body = MutableDictionary::create();
+    body->set(interfaceIdentifierKey, API::String::create(interface.identifier));
+    body->set(encodedInvocationKey, [encoder rootObjectDictionary]);
+
+    if (!_remoteObjectRegistry)
+        return;
+
+    _remoteObjectRegistry->sendInvocation(UserData(body.get()));
+}
+
+- (WebKit::RemoteObjectRegistry&)remoteObjectRegistry
+{
+    return *_remoteObjectRegistry;
+}
+
+- (BOOL)_invokeMethod:(const UserData&)invocation
+{
+    if (!invocation.object() || invocation.object()->type() != API::Object::Type::Dictionary)
+        return NO;
+    
+    const ImmutableDictionary& dictionary = static_cast<const ImmutableDictionary&>(*invocation.object());
+
+    API::String* interfaceIdentifier = dictionary.get<API::String>(interfaceIdentifierKey);
+    if (!interfaceIdentifier)
+        return NO;
+
+    const ImmutableDictionary* encodedInvocation = dictionary.get<ImmutableDictionary>(encodedInvocationKey);
+    if (!encodedInvocationKey)
+        return NO;
+
+    [self _invokeMessageWithInterfaceIdentifier:interfaceIdentifier->string() encodedInvocation:encodedInvocation];
+
+    return YES;
+}
+
+- (void)_invokeMessageWithInterfaceIdentifier:(const String&)interfaceIdentifier encodedInvocation:(const ImmutableDictionary*)encodedInvocation
+{
+    auto interfaceAndObject = _exportedObjects.get(interfaceIdentifier);
+    if (!interfaceAndObject.second) {
+        NSLog(@"Did not find a registered object for the interface \"%@\"", (NSString *)interfaceIdentifier);
+        return;
+    }
+
+    RetainPtr<WKRemoteObjectDecoder> decoder = adoptNS([[WKRemoteObjectDecoder alloc] initWithInterface:interfaceAndObject.second.get() rootObjectDictionary:encodedInvocation]);
+
+    NSInvocation *invocation = nil;
+
+    @try {
+        invocation = [decoder decodeObjectOfClass:[NSInvocation class] forKey:invocationKey];
+    } @catch (NSException *exception) {
+        NSLog(@"Exception caught during decoding of message: %@", exception);
+    }
+
+    invocation.target = interfaceAndObject.first.get();
+
+    @try {
+        [invocation invoke];
+    } @catch (NSException *exception) {
+        NSLog(@"%@: Warning: Exception caught during invocation of received message, dropping incoming message .\nException: %@", self, exception);
+    }
+}
+
+@end
+
+#endif // WK_API_ENABLED
@@ -23,7 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#import "WKRemoteObjectRegistry.h"
+#import "_WKRemoteObjectRegistry.h"
 
 #if WK_API_ENABLED
 
@@ -36,14 +36,14 @@ class RemoteObjectRegistry;
 class UserData;
 }
 
-@interface WKRemoteObjectRegistry ()
+@interface _WKRemoteObjectRegistry ()
 
 @property (nonatomic, readonly) WebKit::RemoteObjectRegistry& remoteObjectRegistry;
 
 - (id)_initWithMessageSender:(IPC::MessageSender&)messageSender;
 - (void)_invalidate;
 
-- (void)_sendInvocation:(NSInvocation *)invocation interface:(WKRemoteObjectInterface *)interface;
+- (void)_sendInvocation:(NSInvocation *)invocation interface:(_WKRemoteObjectInterface *)interface;
 - (BOOL)_invokeMethod:(const WebKit::UserData&)invocation;
 
 @end
index 343c6a9..d31c790 100644 (file)
@@ -49,7 +49,6 @@
 #import "WKNSURLProtectionSpace.h"
 #import "WKPagePolicyClientInternal.h"
 #import "WKProcessGroupPrivate.h"
-#import "WKRemoteObjectRegistryInternal.h"
 #import "WKRenderingProgressEventsInternal.h"
 #import "WKRetainPtr.h"
 #import "WKURLRequestNS.h"
@@ -58,6 +57,7 @@
 #import "WebCertificateInfo.h"
 #import "WebContext.h"
 #import "WebPageProxy.h"
+#import "_WKRemoteObjectRegistryInternal.h"
 #import <wtf/NeverDestroyed.h>
 
 using namespace WebCore;
@@ -147,7 +147,7 @@ static NSString * const frameErrorKey = @"WKBrowsingContextFrameErrorKey";
     WeakObjCPtr<id <WKBrowsingContextLoadDelegate>> _loadDelegate;
     WeakObjCPtr<id <WKBrowsingContextPolicyDelegate>> _policyDelegate;
     
-    RetainPtr<WKRemoteObjectRegistry> _remoteObjectRegistry;
+    RetainPtr<_WKRemoteObjectRegistry> _remoteObjectRegistry;
 }
 
 static HashMap<WebPageProxy*, WKBrowsingContextController *>& browsingContextControllerMap()
@@ -908,10 +908,10 @@ static void setUpPagePolicyClient(WKBrowsingContextController *browsingContext,
     return [[[WKBrowsingContextHandle alloc] _initWithPageID:_page->pageID()] autorelease];
 }
 
-- (WKRemoteObjectRegistry *)remoteObjectRegistry
+- (_WKRemoteObjectRegistry *)_remoteObjectRegistry
 {
     if (!_remoteObjectRegistry) {
-        _remoteObjectRegistry = [[WKRemoteObjectRegistry alloc] _initWithMessageSender:*_page];
+        _remoteObjectRegistry = [[_WKRemoteObjectRegistry alloc] _initWithMessageSender:*_page];
         _page->process().context().addMessageReceiver(Messages::RemoteObjectRegistry::messageReceiverName(), _page->pageID(), [_remoteObjectRegistry remoteObjectRegistry]);
     }
 
index 1ecfb51..e726bce 100644 (file)
@@ -38,7 +38,7 @@ typedef NS_ENUM(NSUInteger, WKBrowsingContextPaginationMode) {
 };
 
 @class WKBrowsingContextHandle;
-@class WKRemoteObjectRegistry;
+@class _WKRemoteObjectRegistry;
 
 @interface WKBrowsingContextController (Private)
 
@@ -60,7 +60,7 @@ typedef NS_ENUM(NSUInteger, WKBrowsingContextPaginationMode) {
 
 @property (nonatomic, readonly) WKBrowsingContextHandle *handle;
 
-@property (nonatomic, readonly) WKRemoteObjectRegistry *remoteObjectRegistry;
+@property (nonatomic, readonly) _WKRemoteObjectRegistry *_remoteObjectRegistry;
 
 @property (nonatomic, readonly) pid_t processIdentifier;
 
index 0af9b2c..a6ac97f 100644 (file)
@@ -44,7 +44,6 @@
 #import "WKNavigationInternal.h"
 #import "WKPreferencesInternal.h"
 #import "WKProcessPoolInternal.h"
-#import "WKRemoteObjectRegistryInternal.h"
 #import "WKUIDelegate.h"
 #import "WKWebViewConfigurationInternal.h"
 #import "WKWebViewContentProvider.h"
@@ -54,6 +53,7 @@
 #import "WebPageGroup.h"
 #import "WebPageProxy.h"
 #import "WebProcessProxy.h"
+#import "_WKRemoteObjectRegistryInternal.h"
 #import "_WKVisitedLinkProviderInternal.h"
 #import <wtf/RetainPtr.h>
 
@@ -79,7 +79,7 @@
 @implementation WKWebView {
     std::unique_ptr<WebKit::NavigationState> _navigationState;
 
-    RetainPtr<WKRemoteObjectRegistry> _remoteObjectRegistry;
+    RetainPtr<_WKRemoteObjectRegistry> _remoteObjectRegistry;
     _WKRenderingProgressEvents _observedRenderingProgressEvents;
 
 #if PLATFORM(IOS)
@@ -811,10 +811,10 @@ static WebCore::FloatPoint constrainContentOffset(WebCore::FloatPoint contentOff
 
 @implementation WKWebView (WKPrivate)
 
-- (WKRemoteObjectRegistry *)_remoteObjectRegistry
+- (_WKRemoteObjectRegistry *)_remoteObjectRegistry
 {
     if (!_remoteObjectRegistry) {
-        _remoteObjectRegistry = adoptNS([[WKRemoteObjectRegistry alloc] _initWithMessageSender:*_page]);
+        _remoteObjectRegistry = adoptNS([[_WKRemoteObjectRegistry alloc] _initWithMessageSender:*_page]);
         _page->process().context().addMessageReceiver(Messages::RemoteObjectRegistry::messageReceiverName(), _page->pageID(), [_remoteObjectRegistry remoteObjectRegistry]);
     }
 
index 7ed04d0..1e7284c 100644 (file)
@@ -41,12 +41,13 @@ typedef NS_ENUM(NSInteger, _WKPaginationMode) {
 };
 
 @class WKBrowsingContextHandle;
-@class WKRemoteObjectRegistry;
+@class _WKRemoteObjectRegistry;
 @protocol WKHistoryDelegatePrivate;
 
 @interface WKWebView (WKPrivate)
 
-@property (nonatomic, readonly) WKRemoteObjectRegistry *_remoteObjectRegistry;
+// FIXME: This should return a _WKRemoteObjectRegistry *.
+@property (nonatomic, readonly) id _remoteObjectRegistry;
 @property (nonatomic, readonly) WKBrowsingContextHandle *_handle;
 
 @property (nonatomic, setter=_setObservedRenderingProgressEvents:) _WKRenderingProgressEvents _observedRenderingProgressEvents;
index 7eb6e8b..3d9d2d8 100644 (file)
                1A910072126675C4001842F5 /* FindIndicator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A910070126675C4001842F5 /* FindIndicator.cpp */; };
                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 */; settings = {ATTRIBUTES = (Private, ); }; };
-               1A9E328A1821636900F5D04C /* WKRemoteObjectRegistry.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A9E32881821636900F5D04C /* WKRemoteObjectRegistry.mm */; };
-               1A9E328D182165A900F5D04C /* WKRemoteObjectInterface.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A9E328B182165A900F5D04C /* WKRemoteObjectInterface.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               1A9E328E182165A900F5D04C /* WKRemoteObjectInterface.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A9E328C182165A900F5D04C /* WKRemoteObjectInterface.mm */; };
+               1A9E32891821636900F5D04C /* _WKRemoteObjectRegistry.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A9E32871821636900F5D04C /* _WKRemoteObjectRegistry.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               1A9E328A1821636900F5D04C /* _WKRemoteObjectRegistry.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A9E32881821636900F5D04C /* _WKRemoteObjectRegistry.mm */; };
+               1A9E328D182165A900F5D04C /* _WKRemoteObjectInterface.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A9E328B182165A900F5D04C /* _WKRemoteObjectInterface.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               1A9E328E182165A900F5D04C /* _WKRemoteObjectInterface.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A9E328C182165A900F5D04C /* _WKRemoteObjectInterface.mm */; };
                1A9E329A1822E1CC00F5D04C /* WKRemoteObject.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A9E32981822E1CC00F5D04C /* WKRemoteObject.mm */; };
                1A9E329B1822E1CC00F5D04C /* WKRemoteObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A9E32991822E1CC00F5D04C /* WKRemoteObject.h */; };
                1A9E329E1822FEDD00F5D04C /* WKRemoteObjectCoder.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A9E329C1822FEDD00F5D04C /* WKRemoteObjectCoder.mm */; };
                1A9E329F1822FEDD00F5D04C /* WKRemoteObjectCoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A9E329D1822FEDD00F5D04C /* WKRemoteObjectCoder.h */; };
-               1A9E32A11823018900F5D04C /* WKRemoteObjectRegistryInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A9E32A01823018900F5D04C /* WKRemoteObjectRegistryInternal.h */; };
+               1A9E32A11823018900F5D04C /* _WKRemoteObjectRegistryInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A9E32A01823018900F5D04C /* _WKRemoteObjectRegistryInternal.h */; };
                1A9FBA8D13FF04E600DEED67 /* PluginComplexTextInputState.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A9FBA8C13FF04E600DEED67 /* PluginComplexTextInputState.h */; };
                1AA20D5118AD50E0005D1ED4 /* WKNavigationDelegatePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AA20D5018AD50E0005D1ED4 /* WKNavigationDelegatePrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
                1AA2E51D12E4C05E00BC4966 /* CGUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AA2E51B12E4C05E00BC4966 /* CGUtilities.h */; };
                1AAB037C185F99D800EDF501 /* APIData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAB037B185F99D800EDF501 /* APIData.cpp */; };
                1AAB4A8D1296F0A20023952F /* SandboxExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AAB4A8C1296F0A20023952F /* SandboxExtension.h */; };
                1AAB4AAA1296F1540023952F /* SandboxExtensionMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AAB4AA91296F1540023952F /* SandboxExtensionMac.mm */; };
-               1AABFE3A1829C1ED005B070E /* WKRemoteObjectInterfaceInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AABFE391829C1ED005B070E /* WKRemoteObjectInterfaceInternal.h */; };
+               1AABFE3A1829C1ED005B070E /* _WKRemoteObjectInterfaceInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AABFE391829C1ED005B070E /* _WKRemoteObjectInterfaceInternal.h */; };
                1AAF0C4A12B16334008E49E2 /* ArgumentCodersCF.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AAF0C4812B16334008E49E2 /* ArgumentCodersCF.h */; };
                1AAF0C4B12B16334008E49E2 /* ArgumentCodersCF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAF0C4912B16334008E49E2 /* ArgumentCodersCF.cpp */; };
                1AAF263814687C39004A1E8A /* TiledCoreAnimationDrawingArea.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AAF263614687C39004A1E8A /* TiledCoreAnimationDrawingArea.mm */; };
                1AC1338618590C4600F3EC05 /* RemoteObjectRegistryMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AC1338418590C4600F3EC05 /* RemoteObjectRegistryMessages.h */; };
                1AC1415118AC47EE006C602C /* WKWebViewConfigurationPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AC1415018AC47EE006C602C /* WKWebViewConfigurationPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
                1AC25FC212A48F6000BD2671 /* PluginProcessShim.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AC25F8A12A48E0300BD2671 /* PluginProcessShim.mm */; };
+               1AC303A218E4D9F90018609F /* WKRemoteObjectRegistry.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AC303A018E4D9F90018609F /* WKRemoteObjectRegistry.mm */; };
+               1AC303A318E4D9F90018609F /* WKRemoteObjectRegistry.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AC303A118E4D9F90018609F /* WKRemoteObjectRegistry.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               1AC303A718E4DAE90018609F /* WKWebProcessPlugInBrowserContextControllerToBeRemoved.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AC303A518E4DAE90018609F /* WKWebProcessPlugInBrowserContextControllerToBeRemoved.mm */; };
+               1AC303AB18E4DB7C0018609F /* WKRemoteObjectInterface.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AC303A918E4DB7C0018609F /* WKRemoteObjectInterface.mm */; };
+               1AC303AC18E4DB7C0018609F /* WKRemoteObjectInterface.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AC303AA18E4DB7C0018609F /* WKRemoteObjectInterface.h */; settings = {ATTRIBUTES = (Private, ); }; };
                1AC4C82916B876A90069DCCD /* MessageFlags.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AC4C82816B876A90069DCCD /* MessageFlags.h */; };
                1AC5FFC2174BFD1B0001483D /* PluginProcessAttributes.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AC5FFC1174BFD1B0001483D /* PluginProcessAttributes.h */; };
                1AC7537B183A9FDB0072CB15 /* PageLoadState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC75379183A9FDA0072CB15 /* PageLoadState.cpp */; };
                1A910070126675C4001842F5 /* FindIndicator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FindIndicator.cpp; 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>"; };
+               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>"; };
                1A9E32981822E1CC00F5D04C /* WKRemoteObject.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKRemoteObject.mm; sourceTree = "<group>"; };
                1A9E32991822E1CC00F5D04C /* WKRemoteObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKRemoteObject.h; sourceTree = "<group>"; };
                1A9E329C1822FEDD00F5D04C /* WKRemoteObjectCoder.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKRemoteObjectCoder.mm; sourceTree = "<group>"; };
                1A9E329D1822FEDD00F5D04C /* WKRemoteObjectCoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKRemoteObjectCoder.h; sourceTree = "<group>"; };
-               1A9E32A01823018900F5D04C /* WKRemoteObjectRegistryInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKRemoteObjectRegistryInternal.h; sourceTree = "<group>"; };
+               1A9E32A01823018900F5D04C /* _WKRemoteObjectRegistryInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKRemoteObjectRegistryInternal.h; 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; };
                1AAB037B185F99D800EDF501 /* APIData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = APIData.cpp; sourceTree = "<group>"; };
                1AAB4A8C1296F0A20023952F /* SandboxExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SandboxExtension.h; sourceTree = "<group>"; };
                1AAB4AA91296F1540023952F /* SandboxExtensionMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SandboxExtensionMac.mm; sourceTree = "<group>"; };
-               1AABFE391829C1ED005B070E /* WKRemoteObjectInterfaceInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKRemoteObjectInterfaceInternal.h; sourceTree = "<group>"; };
+               1AABFE391829C1ED005B070E /* _WKRemoteObjectInterfaceInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKRemoteObjectInterfaceInternal.h; sourceTree = "<group>"; };
                1AADE6FE10D855FC00D3D63D /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = System/Library/Frameworks/ApplicationServices.framework; sourceTree = SDKROOT; };
                1AAF0C4812B16334008E49E2 /* ArgumentCodersCF.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArgumentCodersCF.h; sourceTree = "<group>"; };
                1AAF0C4912B16334008E49E2 /* ArgumentCodersCF.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 4; path = ArgumentCodersCF.cpp; sourceTree = "<group>"; };
                1AC25F8912A48E0300BD2671 /* PluginProcessShim.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginProcessShim.h; sourceTree = "<group>"; };
                1AC25F8A12A48E0300BD2671 /* PluginProcessShim.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PluginProcessShim.mm; sourceTree = "<group>"; };
                1AC25FB012A48EA700BD2671 /* PluginProcessShim.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = PluginProcessShim.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
+               1AC303A018E4D9F90018609F /* WKRemoteObjectRegistry.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKRemoteObjectRegistry.mm; sourceTree = "<group>"; };
+               1AC303A118E4D9F90018609F /* WKRemoteObjectRegistry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKRemoteObjectRegistry.h; sourceTree = "<group>"; };
+               1AC303A518E4DAE90018609F /* WKWebProcessPlugInBrowserContextControllerToBeRemoved.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKWebProcessPlugInBrowserContextControllerToBeRemoved.mm; sourceTree = "<group>"; };
+               1AC303A918E4DB7C0018609F /* WKRemoteObjectInterface.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKRemoteObjectInterface.mm; sourceTree = "<group>"; };
+               1AC303AA18E4DB7C0018609F /* WKRemoteObjectInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKRemoteObjectInterface.h; sourceTree = "<group>"; };
                1AC4C82816B876A90069DCCD /* MessageFlags.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessageFlags.h; sourceTree = "<group>"; };
                1AC5FFC1174BFD1B0001483D /* PluginProcessAttributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginProcessAttributes.h; sourceTree = "<group>"; };
                1AC75379183A9FDA0072CB15 /* PageLoadState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PageLoadState.cpp; sourceTree = "<group>"; };
                        path = Cocoa;
                        sourceTree = "<group>";
                };
+               1AC3039D18E4D9C90018609F /* To Be Removed */ = {
+                       isa = PBXGroup;
+                       children = (
+                               1AC303A118E4D9F90018609F /* WKRemoteObjectRegistry.h */,
+                               1AC303A018E4D9F90018609F /* WKRemoteObjectRegistry.mm */,
+                               1AC303AA18E4DB7C0018609F /* WKRemoteObjectInterface.h */,
+                               1AC303A918E4DB7C0018609F /* WKRemoteObjectInterface.mm */,
+                       );
+                       name = "To Be Removed";
+                       sourceTree = "<group>";
+               };
+               1AC303A418E4DAD30018609F /* To Be Removed */ = {
+                       isa = PBXGroup;
+                       children = (
+                               1AC303A518E4DAE90018609F /* WKWebProcessPlugInBrowserContextControllerToBeRemoved.mm */,
+                       );
+                       name = "To Be Removed";
+                       sourceTree = "<group>";
+               };
                1AE00D6818327C1200087DD7 /* IPC */ = {
                        isa = PBXGroup;
                        children = (
                1F0181681858DC1500F92884 /* Cocoa */ = {
                        isa = PBXGroup;
                        children = (
+                               1AC303A418E4DAD30018609F /* To Be Removed */,
                                1AA2E56518D77508003814BD /* WKWebProcessBundleParameters.h */,
                                1AA2E56418D77508003814BD /* WKWebProcessBundleParameters.mm */,
                                3795789B18AD4F1100B9ED2E /* WKWebProcessPlugInFormDelegatePrivate.h */,
                37DFA6FE1810BB2D001F4A9F /* Cocoa */ = {
                        isa = PBXGroup;
                        children = (
+                               1AC3039D18E4D9C90018609F /* To Be Removed */,
                                1AC1337E18590AE400F3EC05 /* RemoteObjectRegistry.h */,
                                1AC1338118590B0500F3EC05 /* RemoteObjectRegistry.messages.in */,
                                1AC1337D18590AE400F3EC05 /* RemoteObjectRegistry.mm */,
                                1A9E32981822E1CC00F5D04C /* WKRemoteObject.mm */,
                                1A9E329D1822FEDD00F5D04C /* WKRemoteObjectCoder.h */,
                                1A9E329C1822FEDD00F5D04C /* WKRemoteObjectCoder.mm */,
-                               1A9E328B182165A900F5D04C /* WKRemoteObjectInterface.h */,
-                               1A9E328C182165A900F5D04C /* WKRemoteObjectInterface.mm */,
-                               1AABFE391829C1ED005B070E /* WKRemoteObjectInterfaceInternal.h */,
-                               1A9E32871821636900F5D04C /* WKRemoteObjectRegistry.h */,
-                               1A9E32881821636900F5D04C /* WKRemoteObjectRegistry.mm */,
-                               1A9E32A01823018900F5D04C /* WKRemoteObjectRegistryInternal.h */,
                                1F604BA61889FA7400EE0395 /* WKRenderingProgressEvents.h */,
                                1F604BA71889FA7400EE0395 /* WKRenderingProgressEventsInternal.h */,
                                373D122118A473010066D9CC /* _WKFrameHandle.h */,
                                373D122018A473010066D9CC /* _WKFrameHandle.mm */,
                                373D122618A473F60066D9CC /* _WKFrameHandleInternal.h */,
+                               1A9E328B182165A900F5D04C /* _WKRemoteObjectInterface.h */,
+                               1A9E328C182165A900F5D04C /* _WKRemoteObjectInterface.mm */,
+                               1AABFE391829C1ED005B070E /* _WKRemoteObjectInterfaceInternal.h */,
+                               1A9E32871821636900F5D04C /* _WKRemoteObjectRegistry.h */,
+                               1A9E32881821636900F5D04C /* _WKRemoteObjectRegistry.mm */,
+                               1A9E32A01823018900F5D04C /* _WKRemoteObjectRegistryInternal.h */,
                        );
                        path = Cocoa;
                        sourceTree = "<group>";
                                BCA8C6A911E3BA5F00812FB7 /* InjectedBundlePageLoaderClient.h in Headers */,
                                BC8147A912F64CDA007B2C32 /* InjectedBundlePagePolicyClient.h in Headers */,
                                BCA8C6B011E3C08700812FB7 /* InjectedBundlePageUIClient.h in Headers */,
-                               1A9E32891821636900F5D04C /* WKRemoteObjectRegistry.h in Headers */,
+                               1A9E32891821636900F5D04C /* _WKRemoteObjectRegistry.h in Headers */,
                                51654EFE184EF33F007DC837 /* UniqueIDBDatabaseBackingStoreSQLite.h in Headers */,
                                BC33E0D112408E8600360F3F /* InjectedBundleRangeHandle.h in Headers */,
                                0FCB4E6018BBE3D9000FCFC9 /* FindIndicatorWindow.h in Headers */,
                                7CF47FFB17275C57008ACB91 /* PageBanner.h in Headers */,
                                BC6EDAA6111271C600E7678B /* PageClient.h in Headers */,
                                1A90C23712650717003E44D4 /* PageOverlay.h in Headers */,
+                               1AC303A318E4D9F90018609F /* WKRemoteObjectRegistry.h in Headers */,
                                C574A58112E66681002DFE98 /* PasteboardTypes.h in Headers */,
                                E19582D3153CBFD700B60875 /* PDFKitImports.h in Headers */,
                                51FCB18917BBFE0300394CD8 /* SynchronousNetworkLoaderClient.h in Headers */,
                                1A6FB7D311E651E200DB1371 /* Plugin.h in Headers */,
                                31A67E0D165B2A99006CBA66 /* PlugInAutoStartProvider.h in Headers */,
                                1A9FBA8D13FF04E600DEED67 /* PluginComplexTextInputState.h in Headers */,
+                               1AC303AC18E4DB7C0018609F /* WKRemoteObjectInterface.h in Headers */,
                                1AA56F2911E92BC80061B882 /* PluginController.h in Headers */,
                                1A8EF4CB1252403700F7067F /* PluginControllerProxy.h in Headers */,
-                               1A9E32A11823018900F5D04C /* WKRemoteObjectRegistryInternal.h in Headers */,
+                               1A9E32A11823018900F5D04C /* _WKRemoteObjectRegistryInternal.h in Headers */,
                                1A8EF96F1252AF6B00F7067F /* PluginControllerProxyMessages.h in Headers */,
                                1A179780137EE82C00F97D45 /* PluginCreationParameters.h in Headers */,
                                1A9E329B1822E1CC00F5D04C /* WKRemoteObject.h in Headers */,
                                BC4075FA124FF0270068F20A /* WKDictionary.h in Headers */,
                                BC017D0B16260FF4007054F5 /* WKDOMInternals.h in Headers */,
                                BC5D24C216CD706D007D5461 /* WKDOMNodePrivate.h in Headers */,
-                               1AABFE3A1829C1ED005B070E /* WKRemoteObjectInterfaceInternal.h in Headers */,
+                               1AABFE3A1829C1ED005B070E /* _WKRemoteObjectInterfaceInternal.h in Headers */,
                                BC5D24C516CD7088007D5461 /* WKDOMRangePrivate.h in Headers */,
-                               1A9E328D182165A900F5D04C /* WKRemoteObjectInterface.h in Headers */,
+                               1A9E328D182165A900F5D04C /* _WKRemoteObjectInterface.h in Headers */,
                                51290993183ACEAF005522A6 /* WebIDBServerConnection.h in Headers */,
                                370F34A31829BE1E009027C8 /* WKNavigationData.h in Headers */,
                                1AB7D78D1288CD9A00CFD08C /* WKDownload.h in Headers */,
                                E170877016D6CFE500F99226 /* BlobRegistrationData.cpp in Sources */,
                                E170876B16D6CA6900F99226 /* BlobRegistryProxy.cpp in Sources */,
                                BCF18638167D071E00A1A85A /* CacheModel.cpp in Sources */,
+                               1AC303A718E4DAE90018609F /* WKWebProcessPlugInBrowserContextControllerToBeRemoved.mm in Sources */,
                                1AA2E51E12E4C05E00BC4966 /* CGUtilities.cpp in Sources */,
                                2DA944B01884E9BA00ED86DB /* WebProcessProxyIOS.mm in Sources */,
                                1A2D957012848564001EB962 /* ChildProcess.cpp in Sources */,
                                1A43E829188F3CDC009E4D30 /* _WKProcessPoolConfiguration.mm in Sources */,
                                1A7C6CDA1378950800B9C04D /* EnvironmentVariables.cpp in Sources */,
                                1AA575FA1496B52600A4EE06 /* EventDispatcher.cpp in Sources */,
-                               1A9E328A1821636900F5D04C /* WKRemoteObjectRegistry.mm in Sources */,
+                               1A9E328A1821636900F5D04C /* _WKRemoteObjectRegistry.mm in Sources */,
                                2DA944BA1884EA3C00ED86DB /* WebPageIOS.mm in Sources */,
                                1AA576021496B97900A4EE06 /* EventDispatcherMessageReceiver.cpp in Sources */,
                                1A1E093318861D3800D2DC49 /* WebProgressTrackerClient.cpp in Sources */,
                                1A232902162C867300D82F7A /* MessageDecoder.cpp in Sources */,
                                1A2328FE162C866A00D82F7A /* MessageEncoder.cpp in Sources */,
                                1A3EED0E161A535400AEB4F5 /* MessageReceiverMap.cpp in Sources */,
-                               1A9E328E182165A900F5D04C /* WKRemoteObjectInterface.mm in Sources */,
+                               1A9E328E182165A900F5D04C /* _WKRemoteObjectInterface.mm in Sources */,
                                C0E3AA7B1209E83500A49D01 /* Module.cpp in Sources */,
                                C0E3AA7A1209E83000A49D01 /* ModuleCF.cpp in Sources */,
                                370F34A21829BE1E009027C8 /* WKNavigationData.mm in Sources */,
                                372CAF0C1833FD910040AC27 /* WKNSError.mm in Sources */,
                                1A9E329A1822E1CC00F5D04C /* WKRemoteObject.mm in Sources */,
                                2D28F3E41885CCC1004B9EAE /* WebChromeClientIOS.mm in Sources */,
+                               1AC303AB18E4DB7C0018609F /* WKRemoteObjectInterface.mm in Sources */,
                                F6A90813133C20510082C3F4 /* WebCookieManagerMac.mm in Sources */,
                                330934471315B9220097A7BC /* WebCookieManagerMessageReceiver.cpp in Sources */,
                                330934551315B9750097A7BC /* WebCookieManagerProxy.cpp in Sources */,
                                2D1B5D5D185869C8006C6596 /* ViewGestureControllerMessageReceiver.cpp in Sources */,
                                37608822150414F700FC82C7 /* WKRenderObject.cpp in Sources */,
                                3336763A130C99DC006C9DE2 /* WKResourceCacheManager.cpp in Sources */,
+                               1AC303A218E4D9F90018609F /* WKRemoteObjectRegistry.mm in Sources */,
                                F634445C12A885E9000612D8 /* WKSecurityOrigin.cpp in Sources */,
                                BC407603124FF0270068F20A /* WKSerializedScriptValue.cpp in Sources */,
                                1AC1337118566C7C00F3EC05 /* APIFrameHandle.cpp in Sources */,
index 308bd31..97a13d3 100644 (file)
@@ -91,3 +91,4 @@
 #define new ("if you use new/delete make sure to include config.h at the top of the file"()) 
 #define delete ("if you use new/delete make sure to include config.h at the top of the file"()) 
 #endif
+
diff --git a/Source/WebKit2/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInBrowserContextControllerToBeRemoved.mm b/Source/WebKit2/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInBrowserContextControllerToBeRemoved.mm
new file mode 100644 (file)
index 0000000..3eacd14
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * 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 "WKWebProcessPlugInBrowserContextControllerPrivate.h"
+
+#if WK_API_ENABLED
+
+@implementation WKWebProcessPlugInBrowserContextController (WKToBeRemoved)
+
+- (WKRemoteObjectRegistry *)remoteObjectRegistry
+{
+    return (WKRemoteObjectRegistry *)self._remoteObjectRegistry;
+}
+
+@end
+
+#endif
index 44c98db..ece1ce9 100644 (file)
@@ -36,7 +36,6 @@
 #import "WKBundlePagePrivate.h"
 #import "WKDOMInternals.h"
 #import "WKNSError.h"
-#import "WKRemoteObjectRegistryInternal.h"
 #import "WKRenderingProgressEventsInternal.h"
 #import "WKRetainPtr.h"
 #import "WKURLRequestNS.h"
@@ -50,6 +49,7 @@
 #import "WeakObjCPtr.h"
 #import "WebPage.h"
 #import "WebProcess.h"
+#import "_WKRemoteObjectRegistryInternal.h"
 #import <WebCore/Document.h>
 #import <WebCore/Frame.h>
 
@@ -61,7 +61,7 @@ using namespace WebKit;
     WeakObjCPtr<id <WKWebProcessPlugInLoadDelegate>> _loadDelegate;
     WeakObjCPtr<id <WKWebProcessPlugInFormDelegatePrivate>> _formDelegate;
     
-    RetainPtr<WKRemoteObjectRegistry> _remoteObjectRegistry;
+    RetainPtr<_WKRemoteObjectRegistry> _remoteObjectRegistry;
 }
 
 static void didStartProvisionalLoadForFrame(WKBundlePageRef page, WKBundleFrameRef frame, WKTypeRef* userDataRef, const void *clientInfo)
@@ -353,7 +353,7 @@ static void setUpFormClient(WKWebProcessPlugInBrowserContextController *contextC
 
 @end
 
-@implementation WKWebProcessPlugInBrowserContextController (Private)
+@implementation WKWebProcessPlugInBrowserContextController (WKPrivate)
 
 - (WKBundlePageRef)_bundlePageRef
 {
@@ -374,10 +374,10 @@ static void setUpFormClient(WKWebProcessPlugInBrowserContextController *contextC
     return wrapper(*webPage);
 }
 
-- (WKRemoteObjectRegistry *)remoteObjectRegistry
+- (_WKRemoteObjectRegistry *)_remoteObjectRegistry
 {
     if (!_remoteObjectRegistry) {
-        _remoteObjectRegistry = [[WKRemoteObjectRegistry alloc] _initWithMessageSender:*_page];
+        _remoteObjectRegistry = [[_WKRemoteObjectRegistry alloc] _initWithMessageSender:*_page];
         WebProcess::shared().addMessageReceiver(Messages::RemoteObjectRegistry::messageReceiverName(), _page->pageID(), [_remoteObjectRegistry remoteObjectRegistry]);
     }
 
index 6bc3d07..8e1e15d 100644 (file)
 #import <WebKit2/WKBase.h>
 
 @class WKBrowsingContextHandle;
-@class WKRemoteObjectRegistry;
+@class _WKRemoteObjectRegistry;
 @protocol WKWebProcessPlugInFormDelegatePrivate;
 
-@interface WKWebProcessPlugInBrowserContextController (Private)
+@interface WKWebProcessPlugInBrowserContextController (WKPrivate)
 
 @property (nonatomic, readonly) WKBundlePageRef _bundlePageRef;
 
 @property (nonatomic, readonly) WKBrowsingContextHandle *handle;
 
-@property (nonatomic, readonly) WKRemoteObjectRegistry *remoteObjectRegistry;
+@property (nonatomic, readonly) _WKRemoteObjectRegistry *_remoteObjectRegistry;
 
 @property (weak, setter=_setFormDelegate:) id <WKWebProcessPlugInFormDelegatePrivate> _formDelegate;
 
 
 @end
 
+@class WKRemoteObjectRegistry;
+
+@interface WKWebProcessPlugInBrowserContextController (WKToBeRemoved)
+
+@property (nonatomic, readonly) WKRemoteObjectRegistry *remoteObjectRegistry;
+@end;
+
+
+
 #endif // WK_API_ENABLED