⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 136095 in webkit


Ignore:
Timestamp:
Nov 28, 2012, 9:33:42 PM (14 years ago)
Author:
weinig@apple.com
Message:

Add an objc object graph wrapper and coder for WKConnection message bodies
​https://bugs.webkit.org/show_bug.cgi?id=103589

Reviewed by Anders Carlsson.

Adds a new type of UserMessageCoder for objc object graphs that allows encoding/decoding
WKBrowsingContextController across the wire.

  • Shared/APIClient.h:

(APIClient):
(WebKit::APIClient::client):
Add accessor for the ClientInterface.

  • Shared/APIObject.h:

Add new TypeObjCObjectGraph type.

  • Shared/mac/ObjCObjectGraph.h: Added.

(ObjCObjectGraph):
(WebKit::ObjCObjectGraph::create):
(WebKit::ObjCObjectGraph::root):
(WebKit::ObjCObjectGraph::ObjCObjectGraph):
(WebKit::ObjCObjectGraph::type):

  • Shared/mac/ObjCObjectGraph.mm: Added.

Wraps

  • Shared/mac/ObjCObjectGraphCoders.h: Added.

(WebContextObjCObjectGraphEncoder):
(WebContextObjCObjectGraphDecoder):
(InjectedBundleObjCObjectGraphEncoder):
(InjectedBundleObjCObjectGraphDecoder):

  • Shared/mac/ObjCObjectGraphCoders.mm: Added.

(WebKit::typeFromObject):
(ObjCObjectGraphEncoder):
(WebKit::ObjCObjectGraphEncoder::baseEncode):
(WebKit::ObjCObjectGraphEncoder::ObjCObjectGraphEncoder):
(ObjCObjectGraphDecoder):
(WebKit::ObjCObjectGraphDecoder::baseDecode):
(WebKit::ObjCObjectGraphDecoder::ObjCObjectGraphDecoder):
(WebContextObjCObjectGraphEncoderImpl):
(WebKit::WebContextObjCObjectGraphEncoderImpl::WebContextObjCObjectGraphEncoderImpl):
(WebKit::WebContextObjCObjectGraphEncoderImpl::encode):
(WebContextObjCObjectGraphDecoderImpl):
(WebKit::WebContextObjCObjectGraphDecoderImpl::WebContextObjCObjectGraphDecoderImpl):
(WebKit::WebContextObjCObjectGraphDecoderImpl::decode):
(InjectedBundleObjCObjectGraphEncoderImpl):
(WebKit::InjectedBundleObjCObjectGraphEncoderImpl::InjectedBundleObjCObjectGraphEncoderImpl):
(WebKit::InjectedBundleObjCObjectGraphEncoderImpl::encode):
(InjectedBundleObjCObjectGraphDecoderImpl):
(WebKit::InjectedBundleObjCObjectGraphDecoderImpl::InjectedBundleObjCObjectGraphDecoderImpl):
(WebKit::InjectedBundleObjCObjectGraphDecoderImpl::decode):
(WebKit::WebContextObjCObjectGraphEncoder::WebContextObjCObjectGraphEncoder):
(WebKit::WebContextObjCObjectGraphEncoder::encode):
(WebKit::WebContextObjCObjectGraphDecoder::WebContextObjCObjectGraphDecoder):
(WebKit::WebContextObjCObjectGraphDecoder::decode):
(WebKit::InjectedBundleObjCObjectGraphEncoder::InjectedBundleObjCObjectGraphEncoder):
(WebKit::InjectedBundleObjCObjectGraphEncoder::encode):
(WebKit::InjectedBundleObjCObjectGraphDecoder::InjectedBundleObjCObjectGraphDecoder):
(WebKit::InjectedBundleObjCObjectGraphDecoder::decode):
Added.

  • UIProcess/API/mac/WKBrowsingContextController.mm:

(+[WKBrowsingContextController _browsingContextControllerForPageRef:]):

  • UIProcess/API/mac/WKBrowsingContextControllerInternal.h:

Expose the accessor to get the WKPageRef from a WKBrowsingContextController and add a
new method to get a WKBrowsingContextController from a WKPageRef.

  • UIProcess/API/mac/WKConnection.mm:

(-[WKConnection sendMessageWithName:body:]):
(didReceiveMessage):
Switch WKConnection to use ObjCObjectGraph to encode the messageBody.

  • UIProcess/WebContextUserMessageCoders.h:

(WebKit::WebContextUserMessageEncoder::encode):
(WebKit::WebContextUserMessageDecoder::decode):

  • WebProcess/InjectedBundle/InjectedBundleUserMessageCoders.h:

(WebKit::InjectedBundleUserMessageEncoder::encode):
(WebKit::InjectedBundleUserMessageDecoder::decode):
Proxy to ObjCObjectGraph coders when user message encoding/decoding ObjCObjectGraph APIObjects.

  • WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm:

(-[WKWebProcessPlugInController _browserContextControllerForBundlePageRef:]):

  • WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInInternal.h:

Add method to get WKWebProcessPlugInController from the WKBundlePageRef.

  • WebKit2.xcodeproj/project.pbxproj:

Add new files.

Location:
trunk/Source/WebKit2
Files:
4 added
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r136083 r136095  
     12012-11-28  Sam Weinig  <sam@webkit.org>
     2
     3        Add an objc object graph wrapper and coder for WKConnection message bodies
     4        https://bugs.webkit.org/show_bug.cgi?id=103589
     5
     6        Reviewed by Anders Carlsson.
     7
     8        Adds a new type of UserMessageCoder for objc object graphs that allows encoding/decoding
     9        WKBrowsingContextController across the wire.
     10
     11        * Shared/APIClient.h:
     12        (APIClient):
     13        (WebKit::APIClient::client):
     14        Add accessor for the ClientInterface.
     15
     16        * Shared/APIObject.h:
     17        Add new TypeObjCObjectGraph type.
     18
     19        * Shared/mac/ObjCObjectGraph.h: Added.
     20        (ObjCObjectGraph):
     21        (WebKit::ObjCObjectGraph::create):
     22        (WebKit::ObjCObjectGraph::root):
     23        (WebKit::ObjCObjectGraph::ObjCObjectGraph):
     24        (WebKit::ObjCObjectGraph::type):
     25        * Shared/mac/ObjCObjectGraph.mm: Added.
     26        Wraps
     27
     28        * Shared/mac/ObjCObjectGraphCoders.h: Added.
     29        (WebContextObjCObjectGraphEncoder):
     30        (WebContextObjCObjectGraphDecoder):
     31        (InjectedBundleObjCObjectGraphEncoder):
     32        (InjectedBundleObjCObjectGraphDecoder):
     33        * Shared/mac/ObjCObjectGraphCoders.mm: Added.
     34        (WebKit::typeFromObject):
     35        (ObjCObjectGraphEncoder):
     36        (WebKit::ObjCObjectGraphEncoder::baseEncode):
     37        (WebKit::ObjCObjectGraphEncoder::ObjCObjectGraphEncoder):
     38        (ObjCObjectGraphDecoder):
     39        (WebKit::ObjCObjectGraphDecoder::baseDecode):
     40        (WebKit::ObjCObjectGraphDecoder::ObjCObjectGraphDecoder):
     41        (WebContextObjCObjectGraphEncoderImpl):
     42        (WebKit::WebContextObjCObjectGraphEncoderImpl::WebContextObjCObjectGraphEncoderImpl):
     43        (WebKit::WebContextObjCObjectGraphEncoderImpl::encode):
     44        (WebContextObjCObjectGraphDecoderImpl):
     45        (WebKit::WebContextObjCObjectGraphDecoderImpl::WebContextObjCObjectGraphDecoderImpl):
     46        (WebKit::WebContextObjCObjectGraphDecoderImpl::decode):
     47        (InjectedBundleObjCObjectGraphEncoderImpl):
     48        (WebKit::InjectedBundleObjCObjectGraphEncoderImpl::InjectedBundleObjCObjectGraphEncoderImpl):
     49        (WebKit::InjectedBundleObjCObjectGraphEncoderImpl::encode):
     50        (InjectedBundleObjCObjectGraphDecoderImpl):
     51        (WebKit::InjectedBundleObjCObjectGraphDecoderImpl::InjectedBundleObjCObjectGraphDecoderImpl):
     52        (WebKit::InjectedBundleObjCObjectGraphDecoderImpl::decode):
     53        (WebKit::WebContextObjCObjectGraphEncoder::WebContextObjCObjectGraphEncoder):
     54        (WebKit::WebContextObjCObjectGraphEncoder::encode):
     55        (WebKit::WebContextObjCObjectGraphDecoder::WebContextObjCObjectGraphDecoder):
     56        (WebKit::WebContextObjCObjectGraphDecoder::decode):
     57        (WebKit::InjectedBundleObjCObjectGraphEncoder::InjectedBundleObjCObjectGraphEncoder):
     58        (WebKit::InjectedBundleObjCObjectGraphEncoder::encode):
     59        (WebKit::InjectedBundleObjCObjectGraphDecoder::InjectedBundleObjCObjectGraphDecoder):
     60        (WebKit::InjectedBundleObjCObjectGraphDecoder::decode):
     61        Added.
     62
     63        * UIProcess/API/mac/WKBrowsingContextController.mm:
     64        (+[WKBrowsingContextController _browsingContextControllerForPageRef:]):
     65        * UIProcess/API/mac/WKBrowsingContextControllerInternal.h:
     66        Expose the accessor to get the WKPageRef from a WKBrowsingContextController and add a
     67        new method to get a WKBrowsingContextController from a WKPageRef.
     68
     69        * UIProcess/API/mac/WKConnection.mm:
     70        (-[WKConnection sendMessageWithName:body:]):
     71        (didReceiveMessage):
     72        Switch WKConnection to use ObjCObjectGraph to encode the messageBody.
     73
     74        * UIProcess/WebContextUserMessageCoders.h:
     75        (WebKit::WebContextUserMessageEncoder::encode):
     76        (WebKit::WebContextUserMessageDecoder::decode):
     77        * WebProcess/InjectedBundle/InjectedBundleUserMessageCoders.h:
     78        (WebKit::InjectedBundleUserMessageEncoder::encode):
     79        (WebKit::InjectedBundleUserMessageDecoder::decode):
     80        Proxy to ObjCObjectGraph coders when user message encoding/decoding ObjCObjectGraph APIObjects.
     81
     82        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm:
     83        (-[WKWebProcessPlugInController _browserContextControllerForBundlePageRef:]):
     84        * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInInternal.h:
     85        Add method to get WKWebProcessPlugInController from the WKBundlePageRef.
     86
     87        * WebKit2.xcodeproj/project.pbxproj:
     88        Add new files.
     89
    1902012-11-28  Sergio Villar Senin  <svillar@igalia.com>
    291
  • trunk/Source/WebKit2/Shared/APIClient.h

    r95901 r136095  
    5252            memcpy(&m_client, client, APIClientTraits<ClientInterface>::interfaceSizesByVersion[client->version]);
    5353    }
    54    
     54
     55    const ClientInterface& client() const { return m_client; }
     56
    5557protected:
    5658    ClientInterface m_client;
  • trunk/Source/WebKit2/Shared/APIObject.h

    r128553 r136095  
    131131        // Platform specific
    132132        TypeEditCommandProxy,
     133        TypeObjCObjectGraph,
    133134        TypeView,
    134135#if USE(SOUP)
  • trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextController.mm

    r134681 r136095  
    3838#import "WKURLRequestNS.h"
    3939#import "WebContext.h"
     40#import "WebPageProxy.h"
    4041#import <wtf/RetainPtr.h>
    4142
    … …  
    5354    return [(NSURL *)WKURLCopyCFURL(kCFAllocatorDefault, wkURL.get()) autorelease];
    5455}
    55 
    5656
    5757@interface WKBrowsingContextControllerData : NSObject {
    … …  
    6666
    6767@implementation WKBrowsingContextControllerData
    68 @end
    69 
    70 
    71 @interface WKBrowsingContextController ()
    72 
    73 @property(readonly) WKPageRef _pageRef;
    74 
    7568@end
    7669
    … …  
    419412}
    420413
     414+ (WKBrowsingContextController *)_browsingContextControllerForPageRef:(WKPageRef)pageRef
     415{
     416    return (WKBrowsingContextController *)WebKit::toImpl(pageRef)->loaderClient().client().clientInfo;
     417}
     418
    421419+ (NSMutableSet *)customSchemes
    422420{
  • trunk/Source/WebKit2/UIProcess/API/mac/WKBrowsingContextControllerInternal.h

    r134681 r136095  
    3030/* This should only be called from associate view. */
    3131- (id)_initWithPageRef:(WKPageRef)pageRef;
     32
     33/* Returns a WKBrowsingContextController associated with the WKPageRef. */
     34+ (WKBrowsingContextController *)_browsingContextControllerForPageRef:(WKPageRef)pageRef;
     35
     36@property(readonly) WKPageRef _pageRef;
     37
    3238+ (NSMutableSet *)customSchemes;
    3339
  • trunk/Source/WebKit2/UIProcess/API/mac/WKConnection.mm

    r133558 r136095  
    2828#import "WKConnectionInternal.h"
    2929
    30 #import "ArgumentCodersMac.h"
    31 #import "ArgumentDecoder.h"
    32 #import "ArgumentEncoder.h"
     30#import "ObjCObjectGraph.h"
    3331#import "WKConnectionRef.h"
    3432#import "WKData.h"
    … …  
    6563- (void)sendMessageWithName:(NSString *)messageName body:(id)messageBody
    6664{
    67     OwnPtr<CoreIPC::ArgumentEncoder> messageData = CoreIPC::ArgumentEncoder::create();
    68     encode(*messageData, messageBody);
     65    WKRetainPtr<WKStringRef> wkMessageName = adoptWK(WKStringCreateWithCFString((CFStringRef)messageName));
     66    RefPtr<ObjCObjectGraph> wkMessageBody = ObjCObjectGraph::create(messageBody);
    6967
    70     WKRetainPtr<WKStringRef> wkMessageName = adoptWK(WKStringCreateWithCFString((CFStringRef)messageName));
    71     WKRetainPtr<WKDataRef> wkMessageBody = adoptWK(WKDataCreate(messageData->buffer(), messageData->bufferSize()));
    72 
    73     WKConnectionPostMessage(_data->_connectionRef.get(), wkMessageName.get(), wkMessageBody.get());
     68    WKConnectionPostMessage(_data->_connectionRef.get(), wkMessageName.get(), (WKTypeRef)wkMessageBody.get());
    7469}
    7570
    … …  
    9489    WKConnection *connection = (WKConnection *)clientInfo;
    9590    if ([connection.delegate respondsToSelector:@selector(connection:didReceiveMessageWithName:body:)]) {
    96         RetainPtr<CFStringRef> cfMessageName = adoptCF(WKStringCopyCFString(kCFAllocatorDefault, messageName));
     91        RetainPtr<NSString> nsMessageName = adoptNS((NSString *)WKStringCopyCFString(kCFAllocatorDefault, messageName));
     92        RetainPtr<id> nsMessageBody = ((ObjCObjectGraph*)messageBody)->rootObject();
    9793
    98         WKDataRef messageData = (WKDataRef)messageBody;
    99         OwnPtr<CoreIPC::ArgumentDecoder> decoder = CoreIPC::ArgumentDecoder::create(WKDataGetBytes(messageData), WKDataGetSize(messageData));
    100 
    101         RetainPtr<id> messageDictionary;
    102         // FIXME: Don't just silently drop decoding failures on the ground.
    103         if (!decode(decoder.get(), messageDictionary))
    104             return;
    105 
    106         [connection.delegate connection:connection didReceiveMessageWithName:(NSString *)cfMessageName.get() body:messageDictionary.get()];
     94        [connection.delegate connection:connection didReceiveMessageWithName:nsMessageName.get() body:nsMessageBody.get()];
    10795    }
    10896}
  • trunk/Source/WebKit2/UIProcess/WebContextUserMessageCoders.h

    r132926 r136095  
    3030#include "WebPageGroupData.h"
    3131#include "WebPageProxy.h"
     32
     33#if PLATFORM(MAC)
     34#include "ObjCObjectGraphCoders.h"
     35#endif
    3236
    3337namespace WebKit {
    … …  
    6973            break;
    7074        }
     75#if PLATFORM(MAC)
     76        case APIObject::TypeObjCObjectGraph: {
     77            ObjCObjectGraph* objectGraph = static_cast<ObjCObjectGraph*>(m_root);
     78            encoder << WebContextObjCObjectGraphEncoder(objectGraph);
     79            break;
     80        }
     81#endif
    7182        default:
    7283            ASSERT_NOT_REACHED();
    … …  
    128139            break;
    129140        }
     141#if PLATFORM(MAC)
     142        case APIObject::TypeObjCObjectGraph: {
     143            RefPtr<ObjCObjectGraph> objectGraph;
     144            WebContextObjCObjectGraphDecoder objectGraphDecoder(objectGraph, coder.m_process);
     145            if (!decoder->decode(objectGraphDecoder))
     146                return false;
     147            coder.m_root = objectGraph.get();
     148            break;
     149        }
     150#endif
    130151        default:
    131152            return false;
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.h

    r136075 r136095  
    755755    void endColorChooser();
    756756#endif
     757
     758    const WebLoaderClient& loaderClient() { return m_loaderClient; }
    757759
    758760private:
  • trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj

    r135958 r136095  
    812812                BC8780FC1161C2B800CC2768 /* PlatformProcessIdentifier.h in Headers */ = {isa = PBXBuildFile; fileRef = BC8780FB1161C2B800CC2768 /* PlatformProcessIdentifier.h */; };
    813813                BC8A501511765F5600757573 /* WKRetainPtr.h in Headers */ = {isa = PBXBuildFile; fileRef = BC8A501411765F5600757573 /* WKRetainPtr.h */; settings = {ATTRIBUTES = (Private, ); }; };
     814                BC8ACA1316670D89004C1941 /* ObjCObjectGraph.h in Headers */ = {isa = PBXBuildFile; fileRef = BC8ACA0F16670D7A004C1941 /* ObjCObjectGraph.h */; };
     815                BC8ACA1416670D89004C1941 /* ObjCObjectGraph.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC8ACA1016670D7B004C1941 /* ObjCObjectGraph.mm */; };
     816                BC8ACA1516670D89004C1941 /* ObjCObjectGraphCoders.h in Headers */ = {isa = PBXBuildFile; fileRef = BC8ACA1116670D7E004C1941 /* ObjCObjectGraphCoders.h */; };
     817                BC8ACA1616670D89004C1941 /* ObjCObjectGraphCoders.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC8ACA1216670D83004C1941 /* ObjCObjectGraphCoders.mm */; };
    814818                BC8F2F2A16273A2C005FACB5 /* WKWebProcessPlugInBrowserContextController.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC8F2F2816273A2B005FACB5 /* WKWebProcessPlugInBrowserContextController.mm */; };
    815819                BC8F2F2B16273A2C005FACB5 /* WKWebProcessPlugInBrowserContextController.h in Headers */ = {isa = PBXBuildFile; fileRef = BC8F2F2916273A2C005FACB5 /* WKWebProcessPlugInBrowserContextController.h */; settings = {ATTRIBUTES = (Public, ); }; };
    … …  
    20762080                BC8A501011765AF700757573 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = WebProcess/Info.plist; sourceTree = "<group>"; };
    20772081                BC8A501411765F5600757573 /* WKRetainPtr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKRetainPtr.h; sourceTree = "<group>"; };
     2082                BC8ACA0F16670D7A004C1941 /* ObjCObjectGraph.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ObjCObjectGraph.h; sourceTree = "<group>"; };
     2083                BC8ACA1016670D7B004C1941 /* ObjCObjectGraph.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ObjCObjectGraph.mm; sourceTree = "<group>"; };
     2084                BC8ACA1116670D7E004C1941 /* ObjCObjectGraphCoders.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ObjCObjectGraphCoders.h; sourceTree = "<group>"; };
     2085                BC8ACA1216670D83004C1941 /* ObjCObjectGraphCoders.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ObjCObjectGraphCoders.mm; sourceTree = "<group>"; };
    20782086                BC8F2F2816273A2B005FACB5 /* WKWebProcessPlugInBrowserContextController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKWebProcessPlugInBrowserContextController.mm; sourceTree = "<group>"; };
    20792087                BC8F2F2916273A2C005FACB5 /* WKWebProcessPlugInBrowserContextController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKWebProcessPlugInBrowserContextController.h; sourceTree = "<group>"; };
    … …  
    37763784                        isa = PBXGroup;
    37773785                        children = (
     3786                                BC8ACA0F16670D7A004C1941 /* ObjCObjectGraph.h */,
     3787                                BC8ACA1016670D7B004C1941 /* ObjCObjectGraph.mm */,
     3788                                BC8ACA1116670D7E004C1941 /* ObjCObjectGraphCoders.h */,
     3789                                BC8ACA1216670D83004C1941 /* ObjCObjectGraphCoders.mm */,
    37783790                                E179FD9B134D38060015B883 /* ArgumentCodersMac.h */,
    37793791                                E179FD9E134D38250015B883 /* ArgumentCodersMac.mm */,
    … …  
    37903802                                31EA25D0134F78B2005B1452 /* NativeWebMouseEventMac.mm */,
    37913803                                DF58C6351371ACA000F9A37C /* NativeWebWheelEventMac.mm */,
     3804                                C574A57F12E66681002DFE98 /* PasteboardTypes.h */,
     3805                                C574A58012E66681002DFE98 /* PasteboardTypes.mm */,
    37923806                                E19582D2153CBFD700B60875 /* PDFKitImports.h */,
    37933807                                E19582D4153CC05300B60875 /* PDFKitImports.mm */,
    3794                                 C574A57F12E66681002DFE98 /* PasteboardTypes.h */,
    3795                                 C574A58012E66681002DFE98 /* PasteboardTypes.mm */,
    37963808                                BCF505E51243047B005955AE /* PlatformCertificateInfo.h */,
    37973809                                BCF505E61243047B005955AE /* PlatformCertificateInfo.mm */,
    … …  
    50035015                                51F060E01654317F00F3281B /* WebResourceLoaderMessages.h in Headers */,
    50045016                                5175944B1657080400DD771D /* NetworkResourceLoaderMessages.h in Headers */,
     5017                                BC8ACA1316670D89004C1941 /* ObjCObjectGraph.h in Headers */,
     5018                                BC8ACA1516670D89004C1941 /* ObjCObjectGraphCoders.h in Headers */,
    50055019                        );
    50065020                        runOnlyForDeploymentPostprocessing = 0;
    … …  
    59575971                                51F060E11654318500F3281B /* WebResourceLoaderMessageReceiver.cpp in Sources */,
    59585972                                5175944A1657080400DD771D /* NetworkResourceLoaderMessageReceiver.cpp in Sources */,
     5973                                BC8ACA1416670D89004C1941 /* ObjCObjectGraph.mm in Sources */,
     5974                                BC8ACA1616670D89004C1941 /* ObjCObjectGraphCoders.mm in Sources */,
    59595975                        );
    59605976                        runOnlyForDeploymentPostprocessing = 0;
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm

    r133558 r136095  
    124124}
    125125
     126- (WKWebProcessPlugInBrowserContextController *)_browserContextControllerForBundlePageRef:(WKBundlePageRef)pageRef
     127{
     128    ASSERT(_bundlePageWrapperCache.contains(pageRef));
     129    return _bundlePageWrapperCache.get(pageRef).get();
     130}
     131
    126132@end
    127133
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInInternal.h

    r131264 r136095  
    3333- (id)_initWithPrincipalClassInstance:(id<WKWebProcessPlugIn>)principalClassInstance bundleRef:(WKBundleRef)bundleRef;
    3434
     35- (WKWebProcessPlugInBrowserContextController *)_browserContextControllerForBundlePageRef:(WKBundlePageRef)pageRef;
     36
    3537@end
    3638
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundleUserMessageCoders.h

    r132926 r136095  
    3333#include "WebPageGroupProxy.h"
    3434#include "WebProcess.h"
     35
     36#if PLATFORM(MAC)
     37#include "ObjCObjectGraphCoders.h"
     38#endif
    3539
    3640namespace WebKit {
    … …  
    7276            break;
    7377        }
     78#if PLATFORM(MAC)
     79        case APIObject::TypeObjCObjectGraph: {
     80            ObjCObjectGraph* objectGraph = static_cast<ObjCObjectGraph*>(m_root);
     81            encoder << InjectedBundleObjCObjectGraphEncoder(objectGraph);
     82            break;
     83        }
     84#endif
    7485        default:
    7586            ASSERT_NOT_REACHED();
    … …  
    129140            break;
    130141        }
     142#if PLATFORM(MAC)
     143        case APIObject::TypeObjCObjectGraph: {
     144            RefPtr<ObjCObjectGraph> objectGraph;
     145            InjectedBundleObjCObjectGraphDecoder objectGraphDecoder(objectGraph, &WebProcess::shared());
     146            if (!decoder->decode(objectGraphDecoder))
     147                return false;
     148            coder.m_root = objectGraph.get();
     149            break;
     150        }
     151#endif
    131152        default:
    132153            return false;
Note: See TracChangeset for help on using the changeset viewer.