Begin stubbing out the WKRemoteObjectCoder NSCoder subclass
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Nov 2013 00:48:49 +0000 (00:48 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Nov 2013 00:48:49 +0000 (00:48 +0000)
commit5017887d62d70216dcc7be0f5c828e9645fc2aaf
treec82692c55f7e4cb805dff9b35b1533e35312ebd1
parent3b28048e569b02bcf24da09d5595182f56762b6c
Begin stubbing out the WKRemoteObjectCoder NSCoder subclass
https://bugs.webkit.org/show_bug.cgi?id=123596

Reviewed by Tim Horton.

* Shared/API/Cocoa/WKRemoteObject.mm:
(-[WKRemoteObject forwardInvocation:]):
Call through to the WKRemoteObjectRegistry.

* Shared/API/Cocoa/WKRemoteObjectCoder.h: Added.
* Shared/API/Cocoa/WKRemoteObjectCoder.mm: Added.
(-[WKRemoteObjectEncoder init]):
Create a root WKDictionary.

(-[WKRemoteObjectEncoder dealloc]):
Assert that the current dictionary is the root dictionary; that we're back where we started.

(-[WKRemoteObjectEncoder allowsKeyedCoding]):
Return YES.

(-[WKRemoteObjectEncoder encodeObject:forKey:]):
Check that the object is valid and then encode it.

(-[WKRemoteObjectEncoder _encodeInvocation:forKey:]):
Encode the method type string and invocation selector.

(-[WKRemoteObjectEncoder encodeBytes:length:forKey:]):
Create a WKDataRef and add it to the dictionary.

(-[WKRemoteObjectEncoder _encodeObjectForKey:usingBlock:]):
Create a new dictionary and call the block.

* Shared/API/Cocoa/WKRemoteObjectRegistry.mm:
(-[WKRemoteObjectRegistry _sendInvocation:interface:]):
Create an encoder and encode the invocation and interface.

* Shared/API/Cocoa/WKRemoteObjectRegistryInternal.h: Added.
Add IPI header.

* WebKit2.xcodeproj/project.pbxproj:
Add new files.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158413 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/API/Cocoa/WKRemoteObject.mm
Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectCoder.h [new file with mode: 0644]
Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectCoder.mm [new file with mode: 0644]
Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectRegistry.mm
Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectRegistryInternal.h [new file with mode: 0644]
Source/WebKit2/WebKit2.xcodeproj/project.pbxproj