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

Changeset 269701 in webkit


Ignore:
Timestamp:
Nov 11, 2020, 1:44:38 PM (6 years ago)
Author:
BJ Burg
Message:

[Cocoa] Inspector Extensions: Add _WKInspectorExtension and related plumbing
https://bugs.webkit.org/show_bug.cgi?id=217783
<rdar://problem/69968787>

Reviewed by Devin Rousso.

Source/WebCore:

  • inspector/InspectorFrontendClient.h:
  • inspector/InspectorFrontendClientLocal.h:

In order for WebInspectorUIExtensionController to work with remote and local
inspectors, it stores a weak pointer the inspector's InspectorFrontendClient.
Expose the frontend's page so that the frontend API dispatcher can dispatch to it.

Source/WebInspectorUI:

  • UserInterface/Main.html: Add new files.
  • UserInterface/Controllers/AppControllerBase.js:

(WI.AppControllerBase):
(WI.AppControllerBase.prototype.get extensionController):
Hang the extension controller off of the global singleton, as there can only be one.

  • UserInterface/Controllers/WebInspectorExtensionController.js:

(WI.WebInspectorExtensionController):
(WI.WebInspectorExtensionController.prototype.registerExtension):
(WI.WebInspectorExtensionController.prototype.unregisterExtension):
Added. For now, just keep the UUIDs in a map and log the result.

  • UserInterface/Models/WebInspectorExtension.js:

(WI.WebInspectorExtension):
(WI.WebInspectorExtension.prototype.get extensionID):
(WI.WebInspectorExtension.prototype.get displayName):
Added. This is a data object for now.

  • UserInterface/Protocol/InspectorFrontendAPI.js:

(InspectorFrontendAPI.loadCompleted):
(InspectorFrontendAPI.registerExtension):
(InspectorFrontendAPI.unregisterExtension):
Added. Forward invocations to the extension controller.

Source/WebKit:

_WKInspectorExtension is new SPI that represents a Web Extension that uses the 'devtools'
API to interact with Web Inspector. An extension is associated with its _WKInspectorExtensionHost.
A WebKit client that supports Web Extensions can use this class to implement 'devtools' extension APIs.

Add _WKInspectorExtensionHost methods to register and unregister an extension.
Add plumbing so that the extension in registered in the frontend with WI.InspectorExtensionController.

Later patches will flesh out the needed functionality to implement rest of the 'devtools' API.

  • Sources.txt:
  • SourcesCocoa.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • WebKit.xcodeproj/project.pbxproj:

Add new files.

  • Scripts/webkit/messages.py: If a message includes InspectorExtensionError,

then generate an include for InspectorExtensionTypes.h where it is declared.

  • Shared/API/APIObject.h:
  • Shared/Cocoa/APIObject.mm:

(API::Object::newObject):
New API object type.

  • Shared/InspectorExtensionTypes.h: Added error code enum and useful type aliases.
  • Shared/InspectorExtensionTypes.cpp:

(WebKit::inspectorExtensionErrorToString):

  • UIProcess/API/APIInspectorExtension.h:
  • UIProcess/API/APIInspectorExtension.cpp:

(API::InspectorExtension::create):
(API::InspectorExtension::InspectorExtension):
(API::InspectorExtension::~InspectorExtension):
Added. This is a placeholder object that's used for the wrapper system,
since we don't have single C++ objects for each extension to back the API object.

  • UIProcess/API/Cocoa/_WKInspector.h:
  • UIProcess/API/Cocoa/_WKInspector.mm:

(-[_WKInspector registerExtensionWithID:displayName:completionHandler:]):
(-[_WKInspector unregisterExtension:completionHandler:]):
Implement new _WKInspectorExtensionHost methods. Send IPC to the Inspector web process.

  • UIProcess/API/Cocoa/_WKInspectorExtension.h:
  • UIProcess/API/Cocoa/_WKInspectorExtension.mm:

(-[_WKInspectorExtension initWithIdentifier:]):
(-[_WKInspectorExtension dealloc]):
(-[_WKInspectorExtension _apiObject]):
(-[_WKInspectorExtension extensionID]):
Added. This is a data object that's also used as a token to unregister the extension.

  • UIProcess/API/Cocoa/_WKInspectorExtensionHost.h: Add new SPI.
  • UIProcess/API/Cocoa/_WKInspectorExtensionInternal.h:
  • UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.h:
  • UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm:

(-[_WKRemoteWebInspectorViewController registerExtensionWithID:displayName:completionHandler:]):
(-[_WKRemoteWebInspectorViewController unregisterExtension:completionHandler:]):
Implement new _WKInspectorExtensionHost methods. Send IPC to the Inspector web process.

  • UIProcess/Inspector/RemoteWebInspectorProxy.h:
  • UIProcess/Inspector/RemoteWebInspectorProxy.messages.in: Add FrontendLoaded.

(WebKit::RemoteWebInspectorProxy::extensionController const): Added.

  • UIProcess/Inspector/RemoteWebInspectorProxy.cpp:

(WebKit::RemoteWebInspectorProxy::frontendLoaded):
(WebKit::RemoteWebInspectorProxy::createFrontendPageAndWindow):
Set up the extension controller object after the frontend has been created.
Hook up the FrontendLoaded event sent from Inspector web process so that the
extension controller can be notified of when it's safe to message the frontend.

  • UIProcess/Inspector/WebInspectorProxy.cpp:

(WebKit::WebInspectorProxy::createFrontendPage):
(WebKit::WebInspectorProxy::closeFrontendPageAndWindow):
(WebKit::WebInspectorProxy::frontendLoaded):
Set up the extension controller object after the frontend has been created.

  • UIProcess/Inspector/WebInspectorProxy.h:

(WebKit::WebInspectorProxy::extensionController const): Added.

  • UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.h:
  • UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.cpp: Added.

(WebKit::WebInspectorUIExtensionControllerProxy::WebInspectorUIExtensionControllerProxy):
(WebKit::WebInspectorUIExtensionControllerProxy::~WebInspectorUIExtensionControllerProxy):
(WebKit::WebInspectorUIExtensionControllerProxy::whenFrontendHasLoaded):
(WebKit::WebInspectorUIExtensionControllerProxy::inspectorFrontendLoaded):
(WebKit::WebInspectorUIExtensionControllerProxy::registerExtension):
(WebKit::WebInspectorUIExtensionControllerProxy::unregisterExtension):
Added. Forward API requests to the Web Inspector's web process to be evaluated in the frontend.

  • WebProcess/Inspector/WebInspectorFrontendAPIDispatcher.h:
  • WebProcess/Inspector/WebInspectorFrontendAPIDispatcher.cpp:

(WebKit::WebInspectorFrontendAPIDispatcher::dispatchCommand):
Add a more generic way to encode values to be passed as arguments to InspectorFrontendAPI.dispatch.

  • WebProcess/Inspector/WebInspectorUI.cpp:

(WebKit::WebInspectorUI::establishConnection):
(WebKit::WebInspectorUI::closeWindow):

  • WebProcess/Inspector/WebInspectorUI.h:

(WebKit::WebInspectorUI::frontendPage const): Added.
(WebKit::WebInspectorUI::frontendAPIDispatcher): Added.

  • WebProcess/Inspector/WebInspectorUIExtensionController.h:
  • WebProcess/Inspector/WebInspectorUIExtensionController.messages.in: Added.
  • WebProcess/Inspector/WebInspectorUIExtensionController.cpp: Added.

(WebKit::WebInspectorUIExtensionController::WebInspectorUIExtensionController):
(WebKit::WebInspectorUIExtensionController::~WebInspectorUIExtensionController):
(WebKit::WebInspectorUIExtensionController::registerExtension):
(WebKit::WebInspectorUIExtensionController::unregisterExtension):
(WebKit::WebInspectorUIExtensionController::parseInspectorExtensionErrorFromResult):
Handle incoming messages by forwarding the associated command to WI.WebExtensionController
via InspectorFrontendAPI evaluations.

  • UIProcess/API/Cocoa/_WKUserStyleSheet.h:
  • UIProcess/API/Cocoa/_WKUserStyleSheet.mm:

Fallout from unified build chunking shifts.

  • UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm:

(WebKit::LocalAuthenticatorInternal::getExistingCredentials):
(WebKit::LocalAuthenticator::continueMakeCredentialAfterUserVerification):
Fallout from unified build chunking shifts, but more.

Tools:

Add API tests to exercise new methods of the _WKInspectorExtensionHost protocol.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: New test file.
  • TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtensionHost.mm: Added.

(resetGlobalState):
(-[UIDelegateForTestingInspectorExtensionHost _webView:didAttachLocalInspector:]):
(TEST):

Location:
trunk
Files:
5 added
34 edited
10 copied

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r269698 r269701  
     12020-11-11  Brian Burg  <bburg@apple.com>
     2
     3        [Cocoa] Inspector Extensions: Add _WKInspectorExtension and related plumbing
     4        https://bugs.webkit.org/show_bug.cgi?id=217783
     5        <rdar://problem/69968787>
     6
     7        Reviewed by Devin Rousso.
     8
     9        * inspector/InspectorFrontendClient.h:
     10        * inspector/InspectorFrontendClientLocal.h:
     11        In order for WebInspectorUIExtensionController to work with remote and local
     12        inspectors, it stores a weak pointer the inspector's InspectorFrontendClient.
     13        Expose the frontend's page so that the frontend API dispatcher can dispatch to it.
     14
    1152020-11-11  Chris Dumez  <cdumez@apple.com>
    216
  • trunk/Source/WebCore/inspector/InspectorFrontendClient.h

    r269524 r269701  
    3737#include "UserInterfaceLayoutDirection.h"
    3838#include <wtf/Forward.h>
     39#include <wtf/WeakPtr.h>
    3940#include <wtf/text/WTFString.h>
    4041
     
    4344class FloatRect;
    4445class InspectorFrontendAPIDispatcher;
     46class Page;
    4547
    46 class InspectorFrontendClient {
     48class InspectorFrontendClient : public CanMakeWeakPtr<InspectorFrontendClient> {
    4749public:
    4850    enum class DockSide {
     
    112114    WEBCORE_EXPORT virtual void sendMessageToBackend(const String&) = 0;
    113115    WEBCORE_EXPORT virtual InspectorFrontendAPIDispatcher& frontendAPIDispatcher() = 0;
     116    WEBCORE_EXPORT virtual Page* frontendPage() = 0;
    114117
    115118    WEBCORE_EXPORT virtual bool isUnderTest() = 0;
  • trunk/Source/WebCore/inspector/InspectorFrontendClientLocal.h

    r269524 r269701  
    9696
    9797    InspectorFrontendAPIDispatcher& frontendAPIDispatcher() final { return m_frontendAPIDispatcher; }
    98 
     98    Page* frontendPage() final { return m_frontendPage; }
     99   
    99100    WEBCORE_EXPORT bool canAttachWindow();
    100101    WEBCORE_EXPORT void setDockingUnavailable(bool);
  • trunk/Source/WebInspectorUI/ChangeLog

    r269671 r269701  
     12020-11-11  Brian Burg  <bburg@apple.com>
     2
     3        [Cocoa] Inspector Extensions: Add _WKInspectorExtension and related plumbing
     4        https://bugs.webkit.org/show_bug.cgi?id=217783
     5        <rdar://problem/69968787>
     6
     7        Reviewed by Devin Rousso.
     8
     9        * UserInterface/Main.html: Add new files.
     10
     11        * UserInterface/Controllers/AppControllerBase.js:
     12        (WI.AppControllerBase):
     13        (WI.AppControllerBase.prototype.get extensionController):
     14        Hang the extension controller off of the global singleton, as there can only be one.
     15
     16        * UserInterface/Controllers/WebInspectorExtensionController.js:
     17        (WI.WebInspectorExtensionController):
     18        (WI.WebInspectorExtensionController.prototype.registerExtension):
     19        (WI.WebInspectorExtensionController.prototype.unregisterExtension):
     20        Added. For now, just keep the UUIDs in a map and log the result.
     21
     22        * UserInterface/Models/WebInspectorExtension.js:
     23        (WI.WebInspectorExtension):
     24        (WI.WebInspectorExtension.prototype.get extensionID):
     25        (WI.WebInspectorExtension.prototype.get displayName):
     26        Added. This is a data object for now.
     27
     28        * UserInterface/Protocol/InspectorFrontendAPI.js:
     29        (InspectorFrontendAPI.loadCompleted):
     30        (InspectorFrontendAPI.registerExtension):
     31        (InspectorFrontendAPI.unregisterExtension):
     32        Added. Forward invocations to the extension controller.
     33
    1342020-11-10  Commit Queue  <commit-queue@webkit.org>
    235
  • trunk/Source/WebInspectorUI/UserInterface/Controllers/AppControllerBase.js

    r269524 r269701  
    4242    {
    4343        this._initialized = false;
     44
     45        this._extensionController = new WI.WebInspectorExtensionController;
    4446    }
    4547
     
    4749
    4850    get debuggableType() { throw WI.NotImplementedError.subclassMustOverride(); }
     51    get extensionController() { return this._extensionController; }
    4952
    5053    // Since various members of the app controller depend on the global singleton to exist,
  • trunk/Source/WebInspectorUI/UserInterface/Controllers/WebInspectorExtensionController.js

    r269700 r269701  
    11/*
    2  * Copyright (C) 2017 Apple Inc. All rights reserved.
     2 * Copyright (C) 2020 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2424 */
    2525
    26 WI.NotImplementedError = class NotImplementedError extends Error
    27 {
    28     constructor(message = "This method is not implemented.")
    29     {
    30         super(message);
    31     }
    32 
    33     static subclassMustOverride()
    34     {
    35         return new WI.NotImplementedError("This method must be overridden by a subclass.");
    36     }
    37 };
    38 
    39 WI.AppControllerBase = class AppControllerBase
     26WI.WebInspectorExtensionController = class WebInspectorExtensionController extends WI.Object
    4027{
    4128    constructor()
    4229    {
    43         this._initialized = false;
     30        super();
     31
     32        this._extensionIDMap = new Map;
    4433    }
    4534
    4635    // Public
    4736
    48     get debuggableType() { throw WI.NotImplementedError.subclassMustOverride(); }
     37    registerExtension(extensionID, displayName)
     38    {
     39        if (this._extensionIDMap.has(extensionID)) {
     40            WI.reportInternalError("Unable to register extension, it's already registered: ", extensionID, displayName);
     41            return WI.WebInspectorExtension.ErrorCode.RegistrationFailed;
     42        }
    4943
    50     // Since various members of the app controller depend on the global singleton to exist,
    51     // some initialization needs to happen after the app controller has been constructed.
    52     initialize()
    53     {
    54         if (this._initialized)
    55             throw new Error("App controller is already initialized.");
     44        let extension = new WI.WebInspectorExtension(extensionID, displayName);
     45        this._extensionIDMap.set(extensionID, extension);
    5646
    57         this._initialized = true;
    58 
    59         // FIXME: eventually all code within WI.loaded should be distributed elsewhere.
    60         WI.loaded();
     47        this.dispatchEventToListeners(WI.WebInspectorExtensionController.Event.ExtensionAdded, {extension});
    6148    }
    6249
    63     isWebDebuggable()
     50    unregisterExtension(extensionID)
    6451    {
    65         return this.debuggableType === WI.DebuggableType.Page
    66             || this.debuggableType === WI.DebuggableType.WebPage;
     52        let extension = this._extensionIDMap.take(extensionID);
     53        if (!extension) {
     54            WI.reportInternalError("Unable to unregister extension with unknown ID: ", extensionID);
     55            return WI.WebInspectorExtension.ErrorCode.InvalidRequest;
     56        }
     57
     58        this.dispatchEventToListeners(WI.WebInspectorExtensionController.Event.ExtensionRemoved, {extension});
    6759    }
    6860};
     61
     62WI.WebInspectorExtensionController.Event = {
     63    ExtensionAdded: "extension-added",
     64    ExtensionRemoved: "extension-removed",
     65};
  • trunk/Source/WebInspectorUI/UserInterface/Main.html

    r269524 r269701  
    485485    <script src="Models/TypeSet.js"></script>
    486486    <script src="Models/URLBreakpoint.js"></script>
     487    <script src="Models/WebInspectorExtension.js"></script>
    487488    <script src="Models/WebSocketResource.js"></script>
    488489    <script src="Models/WrappedPromise.js"></script>
     
    899900    <script src="Controllers/TimelineManager.js"></script>
    900901    <script src="Controllers/TypeTokenAnnotator.js"></script>
     902    <script src="Controllers/WebInspectorExtensionController.js"></script>
    901903    <script src="Controllers/WorkerManager.js"></script>
    902904
  • trunk/Source/WebInspectorUI/UserInterface/Models/WebInspectorExtension.js

    r269700 r269701  
    11/*
    2  * Copyright (C) 2017 Apple Inc. All rights reserved.
     2 * Copyright (C) 2020 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2424 */
    2525
    26 WI.NotImplementedError = class NotImplementedError extends Error
     26WI.WebInspectorExtension = class WebInspectorExtension
    2727{
    28     constructor(message = "This method is not implemented.")
     28    constructor(extensionID, displayName)
    2929    {
    30         super(message);
    31     }
     30        console.assert(typeof extensionID === "string", extensionID);
     31        console.assert(typeof displayName === "string", displayName);
    3232
    33     static subclassMustOverride()
    34     {
    35         return new WI.NotImplementedError("This method must be overridden by a subclass.");
    36     }
    37 };
    38 
    39 WI.AppControllerBase = class AppControllerBase
    40 {
    41     constructor()
    42     {
    43         this._initialized = false;
     33        this._extensionID = extensionID;
     34        this._displayName = displayName;
    4435    }
    4536
    4637    // Public
    4738
    48     get debuggableType() { throw WI.NotImplementedError.subclassMustOverride(); }
     39    get extensionID() { return this._extensionID; }
     40    get displayName() { return this._displayName; }
     41};
    4942
    50     // Since various members of the app controller depend on the global singleton to exist,
    51     // some initialization needs to happen after the app controller has been constructed.
    52     initialize()
    53     {
    54         if (this._initialized)
    55             throw new Error("App controller is already initialized.");
    56 
    57         this._initialized = true;
    58 
    59         // FIXME: eventually all code within WI.loaded should be distributed elsewhere.
    60         WI.loaded();
    61     }
    62 
    63     isWebDebuggable()
    64     {
    65         return this.debuggableType === WI.DebuggableType.Page
    66             || this.debuggableType === WI.DebuggableType.WebPage;
    67     }
     43// Note: these values are synonymous with the values of enum class WebKit::InspectorExtensionError.
     44WI.WebInspectorExtension.ErrorCode = {
     45    ContextDestroyed: "ContextDestroyed",
     46    InternalError: "InternalError",
     47    InvalidRequest: "InvalidRequest",
     48    RegistrationFailed: "RegistrationFailed",
    6849};
  • trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorFrontendAPI.js

    r269524 r269701  
    197197
    198198        delete InspectorFrontendAPI._pendingCommands;
    199     }
     199    },
     200
     201    // Returns a WI.WebInspectorExtension.ErrorCode if an error occurred, otherwise nothing.
     202    registerExtension(extensionID, displayName)
     203    {
     204        return WI.sharedApp.extensionController.registerExtension(extensionID, displayName);
     205    },
     206
     207    // Returns a WI.WebInspectorExtension.ErrorCode if an error occurred, otherwise nothing.
     208    unregisterExtension(extensionID)
     209    {
     210        return WI.sharedApp.extensionController.unregisterExtension(extensionID);
     211    },
    200212};
  • trunk/Source/WebInspectorUI/UserInterface/Test.html

    r269524 r269701  
    221221    <script src="Models/TimelineRecording.js"></script>
    222222    <script src="Models/URLBreakpoint.js"></script>
     223    <script src="Models/WebInspectorExtension.js"></script>
    223224    <script src="Models/WebSocketResource.js"></script>
    224225    <script src="Models/WrappedPromise.js"></script>
     
    264265    <script src="Controllers/TargetManager.js"></script>
    265266    <script src="Controllers/TimelineManager.js"></script>
     267    <script src="Controllers/WebInspectorExtensionController.js"></script>
    266268    <script src="Controllers/WorkerManager.js"></script>
    267269
  • trunk/Source/WebKit/ChangeLog

    r269700 r269701  
     12020-11-11  Brian Burg  <bburg@apple.com>
     2
     3        [Cocoa] Inspector Extensions: Add _WKInspectorExtension and related plumbing
     4        https://bugs.webkit.org/show_bug.cgi?id=217783
     5        <rdar://problem/69968787>
     6
     7        Reviewed by Devin Rousso.
     8
     9        _WKInspectorExtension is new SPI that represents a Web Extension that uses the 'devtools'
     10        API to interact with Web Inspector. An extension is associated with its _WKInspectorExtensionHost.
     11        A WebKit client that supports Web Extensions can use this class to implement 'devtools' extension APIs.
     12
     13        Add _WKInspectorExtensionHost methods to register and unregister an extension.
     14        Add plumbing so that the extension in registered in the frontend with WI.InspectorExtensionController.
     15
     16        Later patches will flesh out the needed functionality to implement rest of the 'devtools' API.
     17
     18        * Sources.txt:
     19        * SourcesCocoa.txt:
     20        * DerivedSources-input.xcfilelist:
     21        * DerivedSources-output.xcfilelist:
     22        * DerivedSources.make:
     23        * WebKit.xcodeproj/project.pbxproj:
     24        Add new files.
     25
     26        * Scripts/webkit/messages.py: If a message includes InspectorExtensionError,
     27        then generate an include for InspectorExtensionTypes.h where it is declared.
     28
     29        * Shared/API/APIObject.h:
     30        * Shared/Cocoa/APIObject.mm:
     31        (API::Object::newObject):
     32        New API object type.
     33
     34        * Shared/InspectorExtensionTypes.h: Added error code enum and useful type aliases.
     35        * Shared/InspectorExtensionTypes.cpp:
     36        (WebKit::inspectorExtensionErrorToString):
     37
     38        * UIProcess/API/APIInspectorExtension.h:
     39        * UIProcess/API/APIInspectorExtension.cpp:
     40        (API::InspectorExtension::create):
     41        (API::InspectorExtension::InspectorExtension):
     42        (API::InspectorExtension::~InspectorExtension):
     43        Added. This is a placeholder object that's used for the wrapper system,
     44        since we don't have single C++ objects for each extension to back the API object.
     45
     46        * UIProcess/API/Cocoa/_WKInspector.h:
     47        * UIProcess/API/Cocoa/_WKInspector.mm:
     48        (-[_WKInspector registerExtensionWithID:displayName:completionHandler:]):
     49        (-[_WKInspector unregisterExtension:completionHandler:]):
     50        Implement new _WKInspectorExtensionHost methods. Send IPC to the Inspector web process.
     51
     52        * UIProcess/API/Cocoa/_WKInspectorExtension.h:
     53        * UIProcess/API/Cocoa/_WKInspectorExtension.mm:
     54        (-[_WKInspectorExtension initWithIdentifier:]):
     55        (-[_WKInspectorExtension dealloc]):
     56        (-[_WKInspectorExtension _apiObject]):
     57        (-[_WKInspectorExtension extensionID]):
     58        Added. This is a data object that's also used as a token to unregister the extension.
     59
     60        * UIProcess/API/Cocoa/_WKInspectorExtensionHost.h: Add new SPI.
     61        * UIProcess/API/Cocoa/_WKInspectorExtensionInternal.h:
     62
     63        * UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.h:
     64        * UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm:
     65        (-[_WKRemoteWebInspectorViewController registerExtensionWithID:displayName:completionHandler:]):
     66        (-[_WKRemoteWebInspectorViewController unregisterExtension:completionHandler:]):
     67        Implement new _WKInspectorExtensionHost methods. Send IPC to the Inspector web process.
     68
     69        * UIProcess/Inspector/RemoteWebInspectorProxy.h:
     70        * UIProcess/Inspector/RemoteWebInspectorProxy.messages.in: Add FrontendLoaded.
     71        (WebKit::RemoteWebInspectorProxy::extensionController const): Added.
     72        * UIProcess/Inspector/RemoteWebInspectorProxy.cpp:
     73        (WebKit::RemoteWebInspectorProxy::frontendLoaded):
     74        (WebKit::RemoteWebInspectorProxy::createFrontendPageAndWindow):
     75        Set up the extension controller object after the frontend has been created.
     76        Hook up the FrontendLoaded event sent from Inspector web process so that the
     77        extension controller can be notified of when it's safe to message the frontend.
     78
     79        * UIProcess/Inspector/WebInspectorProxy.cpp:
     80        (WebKit::WebInspectorProxy::createFrontendPage):
     81        (WebKit::WebInspectorProxy::closeFrontendPageAndWindow):
     82        (WebKit::WebInspectorProxy::frontendLoaded):
     83        Set up the extension controller object after the frontend has been created.
     84
     85        * UIProcess/Inspector/WebInspectorProxy.h:
     86        (WebKit::WebInspectorProxy::extensionController const): Added.
     87
     88        * UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.h:
     89        * UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.cpp: Added.
     90        (WebKit::WebInspectorUIExtensionControllerProxy::WebInspectorUIExtensionControllerProxy):
     91        (WebKit::WebInspectorUIExtensionControllerProxy::~WebInspectorUIExtensionControllerProxy):
     92        (WebKit::WebInspectorUIExtensionControllerProxy::whenFrontendHasLoaded):
     93        (WebKit::WebInspectorUIExtensionControllerProxy::inspectorFrontendLoaded):
     94        (WebKit::WebInspectorUIExtensionControllerProxy::registerExtension):
     95        (WebKit::WebInspectorUIExtensionControllerProxy::unregisterExtension):
     96        Added. Forward API requests to the Web Inspector's web process to be evaluated in the frontend.
     97
     98        * WebProcess/Inspector/WebInspectorFrontendAPIDispatcher.h:
     99        * WebProcess/Inspector/WebInspectorFrontendAPIDispatcher.cpp:
     100        (WebKit::WebInspectorFrontendAPIDispatcher::dispatchCommand):
     101        Add a more generic way to encode values to be passed as arguments to InspectorFrontendAPI.dispatch.
     102
     103        * WebProcess/Inspector/WebInspectorUI.cpp:
     104        (WebKit::WebInspectorUI::establishConnection):
     105        (WebKit::WebInspectorUI::closeWindow):
     106        * WebProcess/Inspector/WebInspectorUI.h:
     107        (WebKit::WebInspectorUI::frontendPage const): Added.
     108        (WebKit::WebInspectorUI::frontendAPIDispatcher): Added.
     109
     110        * WebProcess/Inspector/WebInspectorUIExtensionController.h:
     111        * WebProcess/Inspector/WebInspectorUIExtensionController.messages.in: Added.
     112        * WebProcess/Inspector/WebInspectorUIExtensionController.cpp: Added.
     113        (WebKit::WebInspectorUIExtensionController::WebInspectorUIExtensionController):
     114        (WebKit::WebInspectorUIExtensionController::~WebInspectorUIExtensionController):
     115        (WebKit::WebInspectorUIExtensionController::registerExtension):
     116        (WebKit::WebInspectorUIExtensionController::unregisterExtension):
     117        (WebKit::WebInspectorUIExtensionController::parseInspectorExtensionErrorFromResult):
     118        Handle incoming messages by forwarding the associated command to WI.WebExtensionController
     119        via InspectorFrontendAPI evaluations.
     120
     121        * UIProcess/API/Cocoa/_WKUserStyleSheet.h:
     122        * UIProcess/API/Cocoa/_WKUserStyleSheet.mm:
     123        Fallout from unified build chunking shifts.
     124
     125        * UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm:
     126        (WebKit::LocalAuthenticatorInternal::getExistingCredentials):
     127        (WebKit::LocalAuthenticator::continueMakeCredentialAfterUserVerification):
     128        Fallout from unified build chunking shifts, but more.
     129
    11302020-11-11  Alex Christensen  <achristensen@webkit.org>
    2131
  • trunk/Source/WebKit/DerivedSources-input.xcfilelist

    r269524 r269701  
    9696$(PROJECT_DIR)/UIProcess/GPU/GPUProcessProxy.messages.in
    9797$(PROJECT_DIR)/UIProcess/Inspector/RemoteWebInspectorProxy.messages.in
     98$(PROJECT_DIR)/UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.messages.in
    9899$(PROJECT_DIR)/UIProcess/Inspector/WebInspectorProxy.messages.in
    99100$(PROJECT_DIR)/UIProcess/Media/AudioSessionRoutingArbitratorProxy.messages.in
     
    143144$(PROJECT_DIR)/WebProcess/Inspector/RemoteWebInspectorUI.messages.in
    144145$(PROJECT_DIR)/WebProcess/Inspector/WebInspector.messages.in
     146$(PROJECT_DIR)/WebProcess/Inspector/WebInspectorUIExtensionController.messages.in
    145147$(PROJECT_DIR)/WebProcess/Inspector/WebInspectorInterruptDispatcher.messages.in
    146148$(PROJECT_DIR)/WebProcess/Inspector/WebInspectorUI.messages.in
  • trunk/Source/WebKit/DerivedSources-output.xcfilelist

    r269524 r269701  
    349349$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/WebIDBServerMessages.h
    350350$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/WebIDBServerMessagesReplies.h
     351$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/WebInspectorUIExtensionControllerMessageReceiver.cpp
     352$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/WebInspectorUIExtensionControllerMessages.h
     353$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/WebInspectorUIExtensionControllerMessagesReplies.h
    351354$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/WebInspectorInterruptDispatcherMessageReceiver.cpp
    352355$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/WebInspectorInterruptDispatcherMessages.h
  • trunk/Source/WebKit/DerivedSources.make

    r269524 r269701  
    185185        WebProcess/Inspector/WebInspectorInterruptDispatcher \
    186186        WebProcess/Inspector/WebInspectorUI \
     187        WebProcess/Inspector/WebInspectorUIExtensionController \
    187188        WebProcess/Inspector/WebInspector \
    188189        WebProcess/Inspector/RemoteWebInspectorUI \
  • trunk/Source/WebKit/Scripts/webkit/messages.py

    r269676 r269701  
    676676        'WebKit::GestureRecognizerState': ['"GestureTypes.h"'],
    677677        'WebKit::GestureType': ['"GestureTypes.h"'],
     678        'WebKit::InspectorExtensionError': ['"InspectorExtensionTypes.h"'],
    678679        'WebKit::LayerHostingContextID': ['"LayerHostingContext.h"'],
    679680        'WebKit::LayerHostingMode': ['"LayerTreeContext.h"'],
  • trunk/Source/WebKit/Shared/API/APIObject.h

    r269524 r269701  
    138138        Inspector,
    139139        InspectorConfiguration,
     140#if ENABLE(INSPECTOR_EXTENSIONS)
     141        InspectorExtension,
     142#endif
    140143        KeyValueStorageManager,
    141144        MediaCacheManager,
     
    383386        API::Object::Type::Inspector,
    384387        API::Object::Type::InspectorConfiguration,
     388#if ENABLE(INSPECTOR_EXTENSIONS)
     389        API::Object::Type::InspectorExtension,
     390#endif
    385391        API::Object::Type::KeyValueStorageManager,
    386392        API::Object::Type::MediaCacheManager,
  • trunk/Source/WebKit/Shared/Cocoa/APIObject.mm

    r269524 r269701  
    100100#endif
    101101
     102#if ENABLE(INSPECTOR_EXTENSIONS)
     103#import "_WKInspectorExtensionInternal.h"
     104#endif
     105
    102106static const size_t minimumObjectAlignment = alignof(std::aligned_storage<std::numeric_limits<size_t>::max()>::type);
    103107static_assert(minimumObjectAlignment >= alignof(void*), "Objects should always be at least pointer-aligned.");
     
    271275        break;
    272276
     277#if ENABLE(INSPECTOR_EXTENSIONS)
     278    case Type::InspectorExtension:
     279        wrapper = [_WKInspectorExtension alloc];
     280        break;
     281#endif
     282
    273283    case Type::Navigation:
    274284        wrapper = [WKNavigation alloc];
  • trunk/Source/WebKit/Shared/InspectorExtensionTypes.cpp

    r269700 r269701  
    11/*
    2  * Copyright (C) 2018-2020 Apple Inc. All rights reserved.
     2 * Copyright (C) 2020 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2424 */
    2525
    26 #import <Foundation/Foundation.h>
    27 #import <WebKit/WKFoundation.h>
     26#include "config.h"
     27#include "InspectorExtensionTypes.h"
    2828
    29 @class WKWebView;
    30 @class _WKFrameHandle;
    31 @protocol _WKInspectorDelegate;
     29#if ENABLE(INSPECTOR_EXTENSIONS)
    3230
    33 NS_ASSUME_NONNULL_BEGIN
     31#include <wtf/text/WTFString.h>
    3432
    35 @protocol _WKInspectorExtensionHost
    36 - (void)close;
    37 @end
     33namespace WebKit {
    3834
    39 WK_CLASS_AVAILABLE(macos(10.14.4), ios(12.2))
    40 @interface _WKInspector : NSObject <_WKInspectorExtensionHost>
     35WTF::String inspectorExtensionErrorToString(InspectorExtensionError error)
     36{
     37    switch (error) {
     38    case InspectorExtensionError::InternalError:
     39        return "InternalError"_s;
     40    case InspectorExtensionError::InvalidRequest:
     41        return "InvalidRequest"_s;
     42    case InspectorExtensionError::ContextDestroyed:
     43        return "ContextDestroyed"_s;
     44    case InspectorExtensionError::RegistrationFailed:
     45        return "RegistrationFailed"_s;
     46    }
    4147
    42 - (instancetype)init NS_UNAVAILABLE;
     48    ASSERT_NOT_REACHED();
     49    return "InternalError";
     50}
    4351
    44 @property (nonatomic, weak) id <_WKInspectorDelegate> delegate WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
     52} // namespace WebKit
    4553
    46 @property (nonatomic, readonly) WKWebView *webView;
    47 @property (nonatomic, readonly) BOOL isConnected;
    48 @property (nonatomic, readonly) BOOL isVisible;
    49 @property (nonatomic, readonly) BOOL isFront;
    50 @property (nonatomic, readonly) BOOL isProfilingPage;
    51 @property (nonatomic, readonly) BOOL isElementSelectionActive;
    52 
    53 - (void)connect;
    54 - (void)show;
    55 - (void)hide;
    56 - (void)showConsole;
    57 - (void)showResources;
    58 - (void)showMainResourceForFrame:(_WKFrameHandle *)frame;
    59 - (void)attach;
    60 - (void)detach;
    61 - (void)togglePageProfiling;
    62 - (void)toggleElementSelection;
    63 - (void)printErrorToConsole:(NSString *)error;
    64 
    65 @end
    66 
    67 NS_ASSUME_NONNULL_END
     54#endif // ENABLE(INSPECTOR_EXTENSIONS)
  • trunk/Source/WebKit/Shared/InspectorExtensionTypes.h

    r269700 r269701  
    11/*
    2  * Copyright (C) 2018-2020 Apple Inc. All rights reserved.
     2 * Copyright (C) 2020 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2424 */
    2525
    26 #import <Foundation/Foundation.h>
    27 #import <WebKit/WKFoundation.h>
     26#pragma once
    2827
    29 @class WKWebView;
    30 @class _WKFrameHandle;
    31 @protocol _WKInspectorDelegate;
     28#include <wtf/Forward.h>
    3229
    33 NS_ASSUME_NONNULL_BEGIN
     30#if ENABLE(INSPECTOR_EXTENSIONS)
    3431
    35 @protocol _WKInspectorExtensionHost
    36 - (void)close;
    37 @end
     32namespace WebKit {
    3833
    39 WK_CLASS_AVAILABLE(macos(10.14.4), ios(12.2))
    40 @interface _WKInspector : NSObject <_WKInspectorExtensionHost>
     34using InspectorExtensionTabID = WTF::String;
     35using InspectorExtensionID = WTF::String;
    4136
    42 - (instancetype)init NS_UNAVAILABLE;
     37enum class InspectorExtensionError : uint8_t {
     38    ContextDestroyed,
     39    InternalError,
     40    InvalidRequest,
     41    RegistrationFailed,
     42};
    4343
    44 @property (nonatomic, weak) id <_WKInspectorDelegate> delegate WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
     44WTF::String inspectorExtensionErrorToString(InspectorExtensionError);
    4545
    46 @property (nonatomic, readonly) WKWebView *webView;
    47 @property (nonatomic, readonly) BOOL isConnected;
    48 @property (nonatomic, readonly) BOOL isVisible;
    49 @property (nonatomic, readonly) BOOL isFront;
    50 @property (nonatomic, readonly) BOOL isProfilingPage;
    51 @property (nonatomic, readonly) BOOL isElementSelectionActive;
     46} // namespace WebKit
    5247
    53 - (void)connect;
    54 - (void)show;
    55 - (void)hide;
    56 - (void)showConsole;
    57 - (void)showResources;
    58 - (void)showMainResourceForFrame:(_WKFrameHandle *)frame;
    59 - (void)attach;
    60 - (void)detach;
    61 - (void)togglePageProfiling;
    62 - (void)toggleElementSelection;
    63 - (void)printErrorToConsole:(NSString *)error;
     48namespace WTF {
    6449
    65 @end
     50template<> struct EnumTraits<WebKit::InspectorExtensionError> {
     51    using values = EnumValues<
     52        WebKit::InspectorExtensionError,
     53        WebKit::InspectorExtensionError::InvalidRequest,
     54        WebKit::InspectorExtensionError::ContextDestroyed,
     55        WebKit::InspectorExtensionError::RegistrationFailed
     56    >;
     57};
    6658
    67 NS_ASSUME_NONNULL_END
     59}
     60
     61#endif // ENABLE(INSPECTOR_EXTENSIONS)
  • trunk/Source/WebKit/Sources.txt

    r269682 r269701  
    163163Shared/FontInfo.cpp
    164164Shared/FrameInfoData.cpp
     165Shared/InspectorExtensionTypes.cpp
    165166Shared/LayerTreeContext.cpp
    166167Shared/LoadParameters.cpp
     
    439440UIProcess/Inspector/RemoteWebInspectorProxy.cpp
    440441UIProcess/Inspector/WebInspectorProxy.cpp
     442UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.cpp
    441443UIProcess/Inspector/WebInspectorUtilities.cpp
    442444UIProcess/Inspector/WebPageDebuggable.cpp
     
    553555WebProcess/Inspector/WebInspectorInterruptDispatcher.cpp
    554556WebProcess/Inspector/WebInspectorUI.cpp
     557WebProcess/Inspector/WebInspectorUIExtensionController.cpp
    555558WebProcess/Inspector/WebPageInspectorTarget.cpp
    556559WebProcess/Inspector/WebPageInspectorTargetController.cpp
  • trunk/Source/WebKit/SourcesCocoa.txt

    r269524 r269701  
    260260UIProcess/API/Cocoa/_WKInspectorTesting.mm
    261261UIProcess/API/Cocoa/_WKInspectorDebuggableInfo.mm
     262UIProcess/API/Cocoa/_WKInspectorExtension.mm
    262263UIProcess/API/Cocoa/_WKInspectorWindow.mm
    263264UIProcess/API/Cocoa/_WKInternalDebugFeature.mm
  • trunk/Source/WebKit/UIProcess/API/APIInspectorExtension.h

    r269700 r269701  
    11/*
    2  * Copyright (C) 2017 Apple Inc. All rights reserved.
     2 * Copyright (C) 2020 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2424 */
    2525
    26 WI.NotImplementedError = class NotImplementedError extends Error
    27 {
    28     constructor(message = "This method is not implemented.")
     26#pragma once
     27
     28#if ENABLE(INSPECTOR_EXTENSIONS)
     29
     30#include "APIObject.h"
     31#include <wtf/Forward.h>
     32
     33namespace API {
     34
     35class InspectorExtension final : public API::ObjectImpl<Object::Type::InspectorExtension> {
     36public:
     37    static Ref<InspectorExtension> create(const WTF::String& identifier)
    2938    {
    30         super(message);
     39        return adoptRef(*new InspectorExtension(identifier));
    3140    }
    3241
    33     static subclassMustOverride()
     42    explicit InspectorExtension(const WTF::String& identifier)
     43        : m_identifier(identifier)
    3444    {
    35         return new WI.NotImplementedError("This method must be overridden by a subclass.");
    3645    }
     46
     47    const WTF::String& identifier() const { return m_identifier; }
     48
     49private:
     50    WTF::String m_identifier;
    3751};
    3852
    39 WI.AppControllerBase = class AppControllerBase
    40 {
    41     constructor()
    42     {
    43         this._initialized = false;
    44     }
     53} // namespace API
    4554
    46     // Public
    47 
    48     get debuggableType() { throw WI.NotImplementedError.subclassMustOverride(); }
    49 
    50     // Since various members of the app controller depend on the global singleton to exist,
    51     // some initialization needs to happen after the app controller has been constructed.
    52     initialize()
    53     {
    54         if (this._initialized)
    55             throw new Error("App controller is already initialized.");
    56 
    57         this._initialized = true;
    58 
    59         // FIXME: eventually all code within WI.loaded should be distributed elsewhere.
    60         WI.loaded();
    61     }
    62 
    63     isWebDebuggable()
    64     {
    65         return this.debuggableType === WI.DebuggableType.Page
    66             || this.debuggableType === WI.DebuggableType.WebPage;
    67     }
    68 };
     55#endif // ENABLE(INSPECTOR_EXTENSIONS)
  • trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspector.h

    r269524 r269701  
    2626#import <Foundation/Foundation.h>
    2727#import <WebKit/WKFoundation.h>
     28#import <WebKit/_WKInspectorExtensionHost.h>
     29
     30NS_ASSUME_NONNULL_BEGIN
    2831
    2932@class WKWebView;
    3033@class _WKFrameHandle;
     34@class _WKInspectorExtension;
    3135@protocol _WKInspectorDelegate;
    32 
    33 NS_ASSUME_NONNULL_BEGIN
    34 
    35 @protocol _WKInspectorExtensionHost
    36 - (void)close;
    37 @end
    3836
    3937WK_CLASS_AVAILABLE(macos(10.14.4), ios(12.2))
     
    5351- (void)connect;
    5452- (void)show;
     53- (void)close;
    5554- (void)hide;
    5655- (void)showConsole;
  • trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspector.mm

    r269529 r269701  
    2828
    2929#import "InspectorDelegate.h"
     30#import "WKError.h"
    3031#import "WKWebViewInternal.h"
    3132#import "WebPageProxy.h"
     
    3940#import <wtf/text/WTFString.h>
    4041
     42#if ENABLE(INSPECTOR_EXTENSIONS)
     43#import "APIInspectorExtension.h"
     44#import "WebInspectorUIExtensionControllerProxy.h"
     45#import "_WKInspectorExtensionInternal.h"
     46#import <wtf/BlockPtr.h>
     47#endif
     48
    4149@implementation _WKInspector
    4250
     
    189197}
    190198
     199// MARK: _WKInspectorExtensionHost methods
     200
     201- (void)registerExtensionWithID:(NSString *)extensionID displayName:(NSString *)displayName completionHandler:(void(^)(NSError *, _WKInspectorExtension *))completionHandler
     202{
     203#if ENABLE(INSPECTOR_EXTENSIONS)
     204    _inspector->extensionController().registerExtension(extensionID, displayName, [protectedExtensionID = retainPtr(extensionID), protectedSelf = retainPtr(self), capturedBlock = makeBlockPtr(completionHandler)] (Expected<bool, WebKit::InspectorExtensionError> result) mutable {
     205        if (!result) {
     206            capturedBlock([NSError errorWithDomain:WKErrorDomain code:WKErrorUnknown userInfo:@{ NSLocalizedFailureReasonErrorKey: inspectorExtensionErrorToString(result.error())}], nil);
     207            return;
     208        }
     209
     210        capturedBlock(nil, [[wrapper(API::InspectorExtension::create(protectedExtensionID.get())) retain] autorelease]);
     211    });
     212#else
     213    completionHandler([NSError errorWithDomain:WKErrorDomain code:WKErrorUnknown userInfo:nil], nil);
     214#endif
     215}
     216
     217- (void)unregisterExtension:(_WKInspectorExtension *)extension completionHandler:(void(^)(NSError *))completionHandler
     218{
     219#if ENABLE(INSPECTOR_EXTENSIONS)
     220    _inspector->extensionController().unregisterExtension(extension.extensionID, [protectedSelf = retainPtr(self), capturedBlock = makeBlockPtr(completionHandler)] (Expected<bool, WebKit::InspectorExtensionError> result) mutable {
     221        if (!result) {
     222            capturedBlock([NSError errorWithDomain:WKErrorDomain code:WKErrorUnknown userInfo:@{ NSLocalizedFailureReasonErrorKey: inspectorExtensionErrorToString(result.error())}]);
     223            return;
     224        }
     225
     226        capturedBlock(nil);
     227    });
     228#else
     229    completionHandler([NSError errorWithDomain:WKErrorDomain code:WKErrorUnknown userInfo:nil]);
     230#endif
     231}
     232
    191233@end
  • trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorExtension.h

    r269700 r269701  
    11/*
    2  * Copyright (C) 2018-2020 Apple Inc. All rights reserved.
     2 * Copyright (C) 2020 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2727#import <WebKit/WKFoundation.h>
    2828
    29 @class WKWebView;
    30 @class _WKFrameHandle;
    31 @protocol _WKInspectorDelegate;
    32 
    3329NS_ASSUME_NONNULL_BEGIN
    3430
    35 @protocol _WKInspectorExtensionHost
    36 - (void)close;
    37 @end
    38 
    39 WK_CLASS_AVAILABLE(macos(10.14.4), ios(12.2))
    40 @interface _WKInspector : NSObject <_WKInspectorExtensionHost>
     31WK_CLASS_AVAILABLE(macos(WK_MAC_TBA))
     32@interface _WKInspectorExtension : NSObject
    4133
    4234- (instancetype)init NS_UNAVAILABLE;
    4335
    44 @property (nonatomic, weak) id <_WKInspectorDelegate> delegate WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
    45 
    46 @property (nonatomic, readonly) WKWebView *webView;
    47 @property (nonatomic, readonly) BOOL isConnected;
    48 @property (nonatomic, readonly) BOOL isVisible;
    49 @property (nonatomic, readonly) BOOL isFront;
    50 @property (nonatomic, readonly) BOOL isProfilingPage;
    51 @property (nonatomic, readonly) BOOL isElementSelectionActive;
    52 
    53 - (void)connect;
    54 - (void)show;
    55 - (void)hide;
    56 - (void)showConsole;
    57 - (void)showResources;
    58 - (void)showMainResourceForFrame:(_WKFrameHandle *)frame;
    59 - (void)attach;
    60 - (void)detach;
    61 - (void)togglePageProfiling;
    62 - (void)toggleElementSelection;
    63 - (void)printErrorToConsole:(NSString *)error;
     36@property (readonly, nonatomic) NSString *extensionID;
    6437
    6538@end
  • trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorExtension.mm

    r269700 r269701  
    11/*
    2  * Copyright (C) 2018-2020 Apple Inc. All rights reserved.
     2 * Copyright (C) 2020 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2424 */
    2525
    26 #import <Foundation/Foundation.h>
    27 #import <WebKit/WKFoundation.h>
    28 
    29 @class WKWebView;
    30 @class _WKFrameHandle;
    31 @protocol _WKInspectorDelegate;
     26#import "config.h"
     27#import "_WKInspectorExtensionInternal.h"
    3228
    3329NS_ASSUME_NONNULL_BEGIN
    3430
    35 @protocol _WKInspectorExtensionHost
    36 - (void)close;
    37 @end
     31@implementation _WKInspectorExtension
    3832
    39 WK_CLASS_AVAILABLE(macos(10.14.4), ios(12.2))
    40 @interface _WKInspector : NSObject <_WKInspectorExtensionHost>
     33#if ENABLE(INSPECTOR_EXTENSIONS)
    4134
    42 - (instancetype)init NS_UNAVAILABLE;
     35- (instancetype)initWithIdentifier:(NSString *)extensionID
     36{
     37    if (!(self = [super init]))
     38        return nil;
    4339
    44 @property (nonatomic, weak) id <_WKInspectorDelegate> delegate WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
     40    API::Object::constructInWrapper<API::InspectorExtension>(self, extensionID);
     41   
     42    return self;
     43}
    4544
    46 @property (nonatomic, readonly) WKWebView *webView;
    47 @property (nonatomic, readonly) BOOL isConnected;
    48 @property (nonatomic, readonly) BOOL isVisible;
    49 @property (nonatomic, readonly) BOOL isFront;
    50 @property (nonatomic, readonly) BOOL isProfilingPage;
    51 @property (nonatomic, readonly) BOOL isElementSelectionActive;
     45- (void)dealloc
     46{
     47    _extension->API::InspectorExtension::~InspectorExtension();
    5248
    53 - (void)connect;
    54 - (void)show;
    55 - (void)hide;
    56 - (void)showConsole;
    57 - (void)showResources;
    58 - (void)showMainResourceForFrame:(_WKFrameHandle *)frame;
    59 - (void)attach;
    60 - (void)detach;
    61 - (void)togglePageProfiling;
    62 - (void)toggleElementSelection;
    63 - (void)printErrorToConsole:(NSString *)error;
     49    [super dealloc];
     50}
     51
     52
     53- (API::Object&)_apiObject
     54{
     55    return *_extension;
     56}
     57
     58// MARK: Properties.
     59
     60- (NSString *)extensionID
     61{
     62    return _extension->identifier();
     63}
     64
     65#endif // ENABLE(INSPECTOR_EXTENSIONS)
    6466
    6567@end
  • trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorExtensionHost.h

    r269700 r269701  
    11/*
    2  * Copyright (C) 2018-2020 Apple Inc. All rights reserved.
     2 * Copyright (C) 2020 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2727#import <WebKit/WKFoundation.h>
    2828
    29 @class WKWebView;
    30 @class _WKFrameHandle;
    31 @protocol _WKInspectorDelegate;
    32 
    3329NS_ASSUME_NONNULL_BEGIN
    3430
     31@class _WKInspectorExtension;
     32
    3533@protocol _WKInspectorExtensionHost
     34@optional
     35
     36/**
     37 * @abstract Registers a Web Extension with the associated Web Inspector.
     38 * @param extensionID A unique identifier for the extension.
     39 * @param displayName A localized display name for the extension.
     40 * @param completionHandler The completion handler to be called when registration succeeds or fails.
     41 *
     42 * Web Extensions in Web Inspector are active as soon as they are registered.
     43 */
     44- (void)registerExtensionWithID:(NSString *)extensionID displayName:(NSString *)displayName completionHandler:(void(^)(NSError * _Nullable, _WKInspectorExtension * _Nullable))completionHandler;
     45
     46/**
     47 * @abstract Unregisters a Web Extension with the associated Web Inspector.
     48 * @param extensionID A unique identifier for the extension.
     49 * @param completionHandler The completion handler to be called when unregistering succeeds or fails.
     50 *
     51 * Unregistering an extension will automatically close any associated sidebars/tabs.
     52 */
     53- (void)unregisterExtension:(_WKInspectorExtension *)extension completionHandler:(void(^)(NSError * _Nullable))completionHandler;
     54
     55/**
     56 * @abstract Closes the associated Web Inspector instance. This will cause all
     57 * registered _WKInspectorExtensions to be unregistered and invalidated.
     58 */
    3659- (void)close;
    3760@end
    3861
    39 WK_CLASS_AVAILABLE(macos(10.14.4), ios(12.2))
    40 @interface _WKInspector : NSObject <_WKInspectorExtensionHost>
    41 
    42 - (instancetype)init NS_UNAVAILABLE;
    43 
    44 @property (nonatomic, weak) id <_WKInspectorDelegate> delegate WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
    45 
    46 @property (nonatomic, readonly) WKWebView *webView;
    47 @property (nonatomic, readonly) BOOL isConnected;
    48 @property (nonatomic, readonly) BOOL isVisible;
    49 @property (nonatomic, readonly) BOOL isFront;
    50 @property (nonatomic, readonly) BOOL isProfilingPage;
    51 @property (nonatomic, readonly) BOOL isElementSelectionActive;
    52 
    53 - (void)connect;
    54 - (void)show;
    55 - (void)hide;
    56 - (void)showConsole;
    57 - (void)showResources;
    58 - (void)showMainResourceForFrame:(_WKFrameHandle *)frame;
    59 - (void)attach;
    60 - (void)detach;
    61 - (void)togglePageProfiling;
    62 - (void)toggleElementSelection;
    63 - (void)printErrorToConsole:(NSString *)error;
    64 
    65 @end
    66 
    6762NS_ASSUME_NONNULL_END
  • trunk/Source/WebKit/UIProcess/API/Cocoa/_WKInspectorExtensionInternal.h

    r269700 r269701  
    11/*
    2  * Copyright (C) 2018-2020 Apple Inc. All rights reserved.
     2 * Copyright (C) 2020 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2424 */
    2525
    26 #import <Foundation/Foundation.h>
    27 #import <WebKit/WKFoundation.h>
     26#import "_WKInspectorExtension.h"
    2827
    29 @class WKWebView;
    30 @class _WKFrameHandle;
    31 @protocol _WKInspectorDelegate;
     28#if ENABLE(INSPECTOR_EXTENSIONS)
     29
     30#import "APIInspectorExtension.h"
     31#import "WKObject.h"
     32
     33namespace WebKit {
     34
     35template<> struct WrapperTraits<API::InspectorExtension> {
     36    using WrapperClass = _WKInspectorExtension;
     37};
     38
     39} // namespace WebKit
    3240
    3341NS_ASSUME_NONNULL_BEGIN
    3442
    35 @protocol _WKInspectorExtensionHost
    36 - (void)close;
    37 @end
     43@interface _WKInspectorExtension () <WKObject> {
     44@package
     45    API::ObjectStorage<API::InspectorExtension> _extension;
     46}
    3847
    39 WK_CLASS_AVAILABLE(macos(10.14.4), ios(12.2))
    40 @interface _WKInspector : NSObject <_WKInspectorExtensionHost>
    41 
    42 - (instancetype)init NS_UNAVAILABLE;
    43 
    44 @property (nonatomic, weak) id <_WKInspectorDelegate> delegate WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
    45 
    46 @property (nonatomic, readonly) WKWebView *webView;
    47 @property (nonatomic, readonly) BOOL isConnected;
    48 @property (nonatomic, readonly) BOOL isVisible;
    49 @property (nonatomic, readonly) BOOL isFront;
    50 @property (nonatomic, readonly) BOOL isProfilingPage;
    51 @property (nonatomic, readonly) BOOL isElementSelectionActive;
    52 
    53 - (void)connect;
    54 - (void)show;
    55 - (void)hide;
    56 - (void)showConsole;
    57 - (void)showResources;
    58 - (void)showMainResourceForFrame:(_WKFrameHandle *)frame;
    59 - (void)attach;
    60 - (void)detach;
    61 - (void)togglePageProfiling;
    62 - (void)toggleElementSelection;
    63 - (void)printErrorToConsole:(NSString *)error;
     48- (instancetype)initWithIdentifier:(NSString *)extensionIdentifier;
    6449
    6550@end
    6651
    6752NS_ASSUME_NONNULL_END
     53
     54#endif // ENABLE(INSPECTOR_EXTENSIONS)
  • trunk/Source/WebKit/UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.h

    r269524 r269701  
    2525
    2626#import <WebKit/WKFoundation.h>
     27#import <WebKit/_WKInspectorExtensionHost.h>
    2728
    2829#if !TARGET_OS_IPHONE
     
    4546
    4647WK_CLASS_AVAILABLE(macos(10.12.3), ios(10.3))
    47 @interface _WKRemoteWebInspectorViewController : NSObject
     48@interface _WKRemoteWebInspectorViewController : NSObject <_WKInspectorExtensionHost>
    4849
    4950@property (nonatomic, assign) id <_WKRemoteWebInspectorViewControllerDelegate> delegate;
  • trunk/Source/WebKit/UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm

    r269524 r269701  
    3737#import "_WKInspectorDebuggableInfoInternal.h"
    3838
     39#if ENABLE(INSPECTOR_EXTENSIONS)
     40#import "APIInspectorExtension.h"
     41#import "WKError.h"
     42#import "WebInspectorUIExtensionControllerProxy.h"
     43#import "_WKInspectorExtensionInternal.h"
     44#import <wtf/BlockPtr.h>
     45#endif
     46
    3947NS_ASSUME_NONNULL_BEGIN
    4048
     
    183191}
    184192
     193// MARK: _WKInspectorExtensionHost methods
     194
     195- (void)registerExtensionWithID:(NSString *)extensionID displayName:(NSString *)displayName completionHandler:(void(^)(NSError *, _WKInspectorExtension *))completionHandler
     196{
     197#if ENABLE(INSPECTOR_EXTENSIONS)
     198    m_remoteInspectorProxy->extensionController().registerExtension(extensionID, displayName, [protectedExtensionID = retainPtr(extensionID), protectedSelf = retainPtr(self), capturedBlock = makeBlockPtr(completionHandler)] (Expected<bool, WebKit::InspectorExtensionError> result) mutable {
     199        if (!result) {
     200            capturedBlock([NSError errorWithDomain:WKErrorDomain code:WKErrorUnknown userInfo:@{ NSLocalizedFailureReasonErrorKey: inspectorExtensionErrorToString(result.error())}], nil);
     201            return;
     202        }
     203
     204        capturedBlock(nil, [[wrapper(API::InspectorExtension::create(protectedExtensionID.get())) retain] autorelease]);
     205    });
     206#else
     207    completionHandler([NSError errorWithDomain:WKErrorDomain code:WKErrorUnknown userInfo:nil], nil);
     208#endif
     209}
     210
     211- (void)unregisterExtension:(_WKInspectorExtension *)extension completionHandler:(void(^)(NSError *))completionHandler
     212{
     213#if ENABLE(INSPECTOR_EXTENSIONS)
     214    m_remoteInspectorProxy->extensionController().unregisterExtension(extension.extensionID, [protectedSelf = retainPtr(self), capturedBlock = makeBlockPtr(completionHandler)] (Expected<bool, WebKit::InspectorExtensionError> result) mutable {
     215        if (!result) {
     216            capturedBlock([NSError errorWithDomain:WKErrorDomain code:WKErrorUnknown userInfo:@{ NSLocalizedFailureReasonErrorKey: inspectorExtensionErrorToString(result.error())}]);
     217            return;
     218        }
     219
     220        capturedBlock(nil);
     221    });
     222#else
     223    completionHandler([NSError errorWithDomain:WKErrorDomain code:WKErrorUnknown userInfo:nil]);
     224#endif
     225}
     226
    185227@end
    186228
  • trunk/Source/WebKit/UIProcess/Inspector/RemoteWebInspectorProxy.cpp

    r269524 r269701  
    3737#include <WebCore/NotImplemented.h>
    3838
     39#if ENABLE(INSPECTOR_EXTENSIONS)
     40#include "WebInspectorUIExtensionControllerProxy.h"
     41#endif
     42
    3943namespace WebKit {
    4044using namespace WebCore;
     
    96100}
    97101
     102void RemoteWebInspectorProxy::frontendLoaded()
     103{
     104#if ENABLE(INSPECTOR_EXTENSIONS)
     105    m_extensionController->inspectorFrontendLoaded();
     106#endif
     107}
     108
    98109void RemoteWebInspectorProxy::frontendDidClose()
    99110{
     
    176187    m_inspectorPage->process().addMessageReceiver(Messages::RemoteWebInspectorProxy::messageReceiverName(), m_inspectorPage->webPageID(), *this);
    177188    m_inspectorPage->process().assumeReadAccessToBaseURL(*m_inspectorPage, WebInspectorProxy::inspectorBaseURL());
     189
     190#if ENABLE(INSPECTOR_EXTENSIONS)
     191    m_extensionController = makeUnique<WebInspectorUIExtensionControllerProxy>(*m_inspectorPage);
     192#endif
    178193}
    179194
  • trunk/Source/WebKit/UIProcess/Inspector/RemoteWebInspectorProxy.h

    r269524 r269701  
    5757class WebPageProxy;
    5858class WebView;
     59#if ENABLE(INSPECTOR_EXTENSIONS)
     60class WebInspectorUIExtensionControllerProxy;
     61#endif
    5962
    6063class RemoteWebInspectorProxyClient {
     
    8992    void sendMessageToFrontend(const String& message);
    9093
     94#if ENABLE(INSPECTOR_EXTENSIONS)
     95    WebInspectorUIExtensionControllerProxy& extensionController() const { return *m_extensionController; }
     96#endif
     97   
    9198#if PLATFORM(MAC)
    9299    NSWindow *window() const { return m_window.get(); }
     
    118125
    119126    // RemoteWebInspectorProxy messages.
     127    void frontendLoaded();
    120128    void frontendDidClose();
    121129    void reopen();
     
    150158    WebPageProxy* m_inspectorPage { nullptr };
    151159
     160#if ENABLE(INSPECTOR_EXTENSIONS)
     161    std::unique_ptr<WebInspectorUIExtensionControllerProxy> m_extensionController;
     162#endif
     163   
    152164    Ref<API::DebuggableInfo> m_debuggableInfo;
    153165    String m_backendCommandsURL;
  • trunk/Source/WebKit/UIProcess/Inspector/RemoteWebInspectorProxy.messages.in

    r269524 r269701  
    2222
    2323messages -> RemoteWebInspectorProxy {
     24    FrontendLoaded()
    2425    FrontendDidClose()
    2526    Reopen()
  • trunk/Source/WebKit/UIProcess/Inspector/WebInspectorProxy.cpp

    r269671 r269701  
    3838#include "WebInspectorMessages.h"
    3939#include "WebInspectorProxyMessages.h"
     40#include "WebInspectorUIExtensionControllerProxy.h"
    4041#include "WebInspectorUIMessages.h"
    4142#include "WebPageGroup.h"
     
    422423    m_inspectorPage->process().addMessageReceiver(Messages::WebInspectorProxy::messageReceiverName(), m_inspectedPage->identifier(), *this);
    423424    m_inspectorPage->process().assumeReadAccessToBaseURL(*m_inspectorPage, WebInspectorProxy::inspectorBaseURL());
     425
     426#if ENABLE(INSPECTOR_EXTENSIONS)
     427    m_extensionController = makeUnique<WebInspectorUIExtensionControllerProxy>(*m_inspectorPage);
     428#endif
    424429}
    425430
     
    547552        platformDetach();
    548553
     554#if ENABLE(INSPECTOR_EXTENSIONS)
     555    m_extensionController = nullptr;
     556#endif
     557   
    549558    // Null out m_inspectorPage after platformDetach(), so the views can be cleaned up correctly.
    550559    m_inspectorPage = nullptr;
     
    572581    if (auto* automationSession = m_inspectedPage->process().processPool().automationSession())
    573582        automationSession->inspectorFrontendLoaded(*m_inspectedPage);
     583   
     584#if ENABLE(INSPECTOR_EXTENSIONS)
     585    m_extensionController->inspectorFrontendLoaded();
     586#endif
    574587}
    575588
  • trunk/Source/WebKit/UIProcess/Inspector/WebInspectorProxy.h

    r269524 r269701  
    3838#include <wtf/Forward.h>
    3939#include <wtf/RefPtr.h>
     40#include <wtf/WeakPtr.h>
    4041#include <wtf/text/WTFString.h>
    4142
     
    7071class WebPageProxy;
    7172class WebPreferences;
     73#if ENABLE(INSPECTOR_EXTENSIONS)
     74class WebInspectorUIExtensionControllerProxy;
     75#endif
    7276
    7377enum class AttachmentSide {
     
    8185    , public IPC::MessageReceiver
    8286    , public Inspector::FrontendChannel
     87    , public CanMakeWeakPtr<WebInspectorProxy>
    8388#if PLATFORM(WIN)
    8489    , public WebCore::WindowMessageListener
     
    102107    WebPageProxy* inspectedPage() const { return m_inspectedPage; }
    103108    WebPageProxy* inspectorPage() const { return m_inspectorPage; }
     109
     110#if ENABLE(INSPECTOR_EXTENSIONS)
     111    WebInspectorUIExtensionControllerProxy& extensionController() const { return *m_extensionController; }
     112#endif
    104113
    105114    bool isConnected() const { return !!m_inspectorPage; }
     
    287296    std::unique_ptr<API::InspectorClient> m_inspectorClient;
    288297
     298#if ENABLE(INSPECTOR_EXTENSIONS)
     299    std::unique_ptr<WebInspectorUIExtensionControllerProxy> m_extensionController;
     300#endif
     301   
    289302    bool m_underTest { false };
    290303    bool m_isVisible { false };
  • trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm

    r269534 r269701  
    150150        auto& responseMap = decodedResponse->getMap();
    151151
    152         auto it = responseMap.find(CBOR(kEntityIdMapKey));
     152        auto it = responseMap.find(CBOR(fido::kEntityIdMapKey));
    153153        if (it == responseMap.end() || !it->second.isByteString()) {
    154154            ASSERT_NOT_REACHED();
     
    157157        auto& userHandle = it->second.getByteString();
    158158
    159         it = responseMap.find(CBOR(kEntityNameMapKey));
     159        it = responseMap.find(CBOR(fido::kEntityNameMapKey));
    160160        if (it == responseMap.end() || !it->second.isString()) {
    161161            ASSERT_NOT_REACHED();
     
    301301
    302302    cbor::CBORValue::MapValue userEntityMap;
    303     userEntityMap[cbor::CBORValue(kEntityIdMapKey)] = cbor::CBORValue(creationOptions.user.idVector);
    304     userEntityMap[cbor::CBORValue(kEntityNameMapKey)] = cbor::CBORValue(creationOptions.user.name);
     303    userEntityMap[cbor::CBORValue(fido::kEntityIdMapKey)] = cbor::CBORValue(creationOptions.user.idVector);
     304    userEntityMap[cbor::CBORValue(fido::kEntityNameMapKey)] = cbor::CBORValue(creationOptions.user.name);
    305305    auto userEntity = cbor::CBORWriter::write(cbor::CBORValue(WTFMove(userEntityMap)));
    306306    ASSERT(userEntity);
  • trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj

    r269682 r269701  
    14391439                9955A6F71C7986E500EB6A93 /* AutomationProtocolObjects.h in Headers */ = {isa = PBXBuildFile; fileRef = 9955A6F31C79866400EB6A93 /* AutomationProtocolObjects.h */; };
    14401440                99788ACB1F421DDA00C08000 /* _WKAutomationSessionConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = 99788AC91F421DCA00C08000 /* _WKAutomationSessionConfiguration.h */; settings = {ATTRIBUTES = (Private, ); }; };
     1441                9979659E25310A4900B31AE3 /* WebInspectorUIExtensionControllerMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 9979659A25310A4800B31AE3 /* WebInspectorUIExtensionControllerMessages.h */; };
     1442                9979659F25310A4900B31AE3 /* WebInspectorUIExtensionControllerMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9979659B25310A4800B31AE3 /* WebInspectorUIExtensionControllerMessageReceiver.cpp */; };
     1443                997965A3253128C700B31AE3 /* _WKInspectorExtensionHost.h in Headers */ = {isa = PBXBuildFile; fileRef = 997965A2253128C700B31AE3 /* _WKInspectorExtensionHost.h */; settings = {ATTRIBUTES = (Private, ); }; };
    14411444                9979CA58237F49F10039EC05 /* _WKInspectorPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 9979CA57237F49F00039EC05 /* _WKInspectorPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
    14421445                99996A9F25004BCC004F7559 /* _WKInspectorPrivateForTesting.h in Headers */ = {isa = PBXBuildFile; fileRef = 99996A9D25004BCB004F7559 /* _WKInspectorPrivateForTesting.h */; settings = {ATTRIBUTES = (Private, ); }; };
     1446                99B16757252BB7E10073140E /* _WKInspectorExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = 99B16754252BB7E00073140E /* _WKInspectorExtension.h */; settings = {ATTRIBUTES = (Private, ); }; };
     1447                99B16758252BB7E10073140E /* _WKInspectorExtensionInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 99B16755252BB7E10073140E /* _WKInspectorExtensionInternal.h */; };
     1448                99B1675B252BBADD0073140E /* WebInspectorUIExtensionControllerProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 99B1675A252BBADD0073140E /* WebInspectorUIExtensionControllerProxy.h */; };
     1449                99B16764252BBE620073140E /* WebInspectorUIExtensionController.h in Headers */ = {isa = PBXBuildFile; fileRef = 99B16761252BBE610073140E /* WebInspectorUIExtensionController.h */; };
    14431450                99C3AE2D1DADA6AD00AF5C16 /* WebAutomationSessionMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 99C3AE2C1DADA6A700AF5C16 /* WebAutomationSessionMacros.h */; };
    14441451                99C81D5A1C20E7E2005C4C82 /* AutomationClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 99C81D551C20DFBE005C4C82 /* AutomationClient.h */; };
     
    45824589                99788AC91F421DCA00C08000 /* _WKAutomationSessionConfiguration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKAutomationSessionConfiguration.h; sourceTree = "<group>"; };
    45834590                99788ACA1F421DCA00C08000 /* _WKAutomationSessionConfiguration.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = _WKAutomationSessionConfiguration.mm; sourceTree = "<group>"; };
     4591                9979659A25310A4800B31AE3 /* WebInspectorUIExtensionControllerMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebInspectorUIExtensionControllerMessages.h; path = DerivedSources/WebKit2/WebInspectorUIExtensionControllerMessages.h; sourceTree = BUILT_PRODUCTS_DIR; };
     4592                9979659B25310A4800B31AE3 /* WebInspectorUIExtensionControllerMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebInspectorUIExtensionControllerMessageReceiver.cpp; path = DerivedSources/WebKit2/WebInspectorUIExtensionControllerMessageReceiver.cpp; sourceTree = BUILT_PRODUCTS_DIR; };
     4593                997965A2253128C700B31AE3 /* _WKInspectorExtensionHost.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKInspectorExtensionHost.h; sourceTree = "<group>"; };
    45844594                9979CA57237F49F00039EC05 /* _WKInspectorPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKInspectorPrivate.h; sourceTree = "<group>"; };
    45854595                99996A9D25004BCB004F7559 /* _WKInspectorPrivateForTesting.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKInspectorPrivateForTesting.h; sourceTree = "<group>"; };
    45864596                99996A9E25004BCB004F7559 /* _WKInspectorTesting.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = _WKInspectorTesting.mm; sourceTree = "<group>"; };
     4597                999B7ED82550E4A800F450A4 /* InspectorExtensionTypes.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorExtensionTypes.cpp; sourceTree = "<group>"; };
     4598                99B16754252BB7E00073140E /* _WKInspectorExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKInspectorExtension.h; sourceTree = "<group>"; };
     4599                99B16755252BB7E10073140E /* _WKInspectorExtensionInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKInspectorExtensionInternal.h; sourceTree = "<group>"; };
     4600                99B16756252BB7E10073140E /* _WKInspectorExtension.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = _WKInspectorExtension.mm; sourceTree = "<group>"; };
     4601                99B1675A252BBADD0073140E /* WebInspectorUIExtensionControllerProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebInspectorUIExtensionControllerProxy.h; sourceTree = "<group>"; };
     4602                99B1675D252BBE0A0073140E /* WebInspectorUIExtensionControllerProxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebInspectorUIExtensionControllerProxy.cpp; sourceTree = "<group>"; };
     4603                99B16760252BBE610073140E /* WebInspectorUIExtensionController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebInspectorUIExtensionController.cpp; sourceTree = "<group>"; };
     4604                99B16761252BBE610073140E /* WebInspectorUIExtensionController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebInspectorUIExtensionController.h; sourceTree = "<group>"; };
     4605                99B16762252BBE610073140E /* WebInspectorUIExtensionController.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebInspectorUIExtensionController.messages.in; sourceTree = "<group>"; };
     4606                99BE3B1225422F4100C6551C /* APIInspectorExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIInspectorExtension.h; sourceTree = "<group>"; };
     4607                99BE3B1625433B9400C6551C /* InspectorExtensionTypes.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = InspectorExtensionTypes.h; sourceTree = "<group>"; };
    45874608                99C3AE231DAD8E3400AF5C16 /* WebAutomationSessionMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebAutomationSessionMac.mm; sourceTree = "<group>"; };
    45884609                99C3AE261DAD948500AF5C16 /* WebAutomationSessionCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebAutomationSessionCocoa.mm; sourceTree = "<group>"; };
     
    61656186                                1AC75A1A1B3368270056745B /* HangDetectionDisabler.h */,
    61666187                                BCCF6B2312C93E7A008F9C35 /* ImageOptions.h */,
     6188                                999B7ED82550E4A800F450A4 /* InspectorExtensionTypes.cpp */,
     6189                                99BE3B1625433B9400C6551C /* InspectorExtensionTypes.h */,
    61676190                                1A92DC1212F8BAB90017AF65 /* LayerTreeContext.cpp */,
    61686191                                1A92DC1012F8BA460017AF65 /* LayerTreeContext.h */,
     
    73847407                                99036AE123A949CE0000B06A /* _WKInspectorDebuggableInfoInternal.h */,
    73857408                                9197940B23DBC50300257892 /* _WKInspectorDelegate.h */,
     7409                                99B16754252BB7E00073140E /* _WKInspectorExtension.h */,
     7410                                99B16756252BB7E10073140E /* _WKInspectorExtension.mm */,
     7411                                997965A2253128C700B31AE3 /* _WKInspectorExtensionHost.h */,
     7412                                99B16755252BB7E10073140E /* _WKInspectorExtensionInternal.h */,
    73867413                                5CAFDE442130843600B1F7E1 /* _WKInspectorInternal.h */,
    73877414                                9979CA57237F49F00039EC05 /* _WKInspectorPrivate.h */,
     
    86968723                                1C8E28321275D73800BC7BD0 /* WebInspectorProxy.h */,
    86978724                                1C77C1951288A872006A742F /* WebInspectorProxy.messages.in */,
     8725                                99B1675D252BBE0A0073140E /* WebInspectorUIExtensionControllerProxy.cpp */,
     8726                                99B1675A252BBADD0073140E /* WebInspectorUIExtensionControllerProxy.h */,
    86988727                                A55BA8271BA38E1E007CD33D /* WebInspectorUtilities.cpp */,
    86998728                                A55BA8281BA38E1E007CD33D /* WebInspectorUtilities.h */,
     
    87588787                                1C891D6319B124FF00BA79DD /* WebInspectorUI.h */,
    87598788                                1C891D6419B124FF00BA79DD /* WebInspectorUI.messages.in */,
     8789                                99B16760252BBE610073140E /* WebInspectorUIExtensionController.cpp */,
     8790                                99B16761252BBE610073140E /* WebInspectorUIExtensionController.h */,
     8791                                99B16762252BBE610073140E /* WebInspectorUIExtensionController.messages.in */,
    87608792                                A543E30A215C8A8400279CD9 /* WebPageInspectorTarget.cpp */,
    87618793                                A543E308215C8A8300279CD9 /* WebPageInspectorTarget.h */,
     
    93869418                                994C6048253F820200BDF060 /* APIInspectorConfiguration.cpp */,
    93879419                                994C6046253CACB800BDF060 /* APIInspectorConfiguration.h */,
     9420                                99BE3B1225422F4100C6551C /* APIInspectorExtension.h */,
    93889421                                31B362902141EABC007BFA53 /* APIInternalDebugFeature.cpp */,
    93899422                                31B3628E2141EA4D007BFA53 /* APIInternalDebugFeature.h */,
     
    1041610449                                1CA8B943127C882A00576C2B /* WebInspectorProxyMessageReceiver.cpp */,
    1041710450                                1CA8B944127C882A00576C2B /* WebInspectorProxyMessages.h */,
     10451                                9979659B25310A4800B31AE3 /* WebInspectorUIExtensionControllerMessageReceiver.cpp */,
     10452                                9979659A25310A4800B31AE3 /* WebInspectorUIExtensionControllerMessages.h */,
    1041810453                                1CBBE49E19B66C53006B7D81 /* WebInspectorUIMessageReceiver.cpp */,
    1041910454                                1CBBE49F19B66C53006B7D81 /* WebInspectorUIMessages.h */,
     
    1083110866                                99036AE223A949CF0000B06A /* _WKInspectorDebuggableInfoInternal.h in Headers */,
    1083210867                                9197940C23DBC50300257892 /* _WKInspectorDelegate.h in Headers */,
     10868                                99B16757252BB7E10073140E /* _WKInspectorExtension.h in Headers */,
     10869                                997965A3253128C700B31AE3 /* _WKInspectorExtensionHost.h in Headers */,
     10870                                99B16758252BB7E10073140E /* _WKInspectorExtensionInternal.h in Headers */,
    1083310871                                5CAFDE472130846A00B1F7E1 /* _WKInspectorInternal.h in Headers */,
    1083410872                                9979CA58237F49F10039EC05 /* _WKInspectorPrivate.h in Headers */,
     
    1157111609                                1CA8B946127C882A00576C2B /* WebInspectorProxyMessages.h in Headers */,
    1157211610                                1C891D6619B124FF00BA79DD /* WebInspectorUI.h in Headers */,
     11611                                99B16764252BBE620073140E /* WebInspectorUIExtensionController.h in Headers */,
     11612                                9979659E25310A4900B31AE3 /* WebInspectorUIExtensionControllerMessages.h in Headers */,
     11613                                99B1675B252BBADD0073140E /* WebInspectorUIExtensionControllerProxy.h in Headers */,
    1157311614                                1CBBE4A119B66C53006B7D81 /* WebInspectorUIMessages.h in Headers */,
    1157411615                                A55BA82B1BA38E61007CD33D /* WebInspectorUtilities.h in Headers */,
     
    1339113432                                1C8E2A351277852400BC7BD0 /* WebInspectorMessageReceiver.cpp in Sources */,
    1339213433                                1CA8B945127C882A00576C2B /* WebInspectorProxyMessageReceiver.cpp in Sources */,
     13434                                9979659F25310A4900B31AE3 /* WebInspectorUIExtensionControllerMessageReceiver.cpp in Sources */,
    1339313435                                1CBBE4A019B66C53006B7D81 /* WebInspectorUIMessageReceiver.cpp in Sources */,
    1339413436                                2D92A78A212B6AB100F493FD /* WebKeyboardEvent.cpp in Sources */,
  • trunk/Source/WebKit/WebProcess/Inspector/RemoteWebInspectorUI.cpp

    r269524 r269701  
    4040#include <WebCore/Settings.h>
    4141
     42#if ENABLE(INSPECTOR_EXTENSIONS)
     43#include "WebInspectorUIExtensionController.h"
     44#endif
     45
    4246#if !PLATFORM(MAC) && !PLATFORM(GTK) && !PLATFORM(WIN)
    4347#include <WebCore/NotImplemented.h>
     
    5963}
    6064
     65RemoteWebInspectorUI::~RemoteWebInspectorUI() = default;
     66
    6167void RemoteWebInspectorUI::initialize(DebuggableInfoData&& debuggableInfo, const String& backendCommandsURL)
    6268{
     69#if ENABLE(INSPECTOR_EXTENSIONS)
     70    m_extensionController = makeUnique<WebInspectorUIExtensionController>(*this);
     71#endif
     72
    6373    m_debuggableInfo = WTFMove(debuggableInfo);
    6474    m_backendCommandsURL = backendCommandsURL;
     
    109119
    110120    m_frontendAPIDispatcher->dispatchCommandWithResultAsync("setIsVisible"_s, { JSON::Value::create(true) });
     121
     122    WebProcess::singleton().parentProcessConnection()->send(Messages::RemoteWebInspectorProxy::FrontendLoaded(), m_page.identifier());
    111123
    112124    bringToFront();
     
    175187    m_page.corePage()->inspectorController().setInspectorFrontendClient(nullptr);
    176188
     189#if ENABLE(INSPECTOR_EXTENSIONS)
     190    m_extensionController = nullptr;
     191#endif
     192   
    177193    WebProcess::singleton().parentProcessConnection()->send(Messages::RemoteWebInspectorProxy::FrontendDidClose(), m_page.identifier());
    178194}
     
    259275#endif
    260276
     277WebCore::Page* RemoteWebInspectorUI::frontendPage()
     278{
     279    return m_page.corePage();
     280}
     281
     282
    261283#if !PLATFORM(MAC) && !PLATFORM(GTK) && !PLATFORM(WIN)
    262284String RemoteWebInspectorUI::localizedStringsURL() const
  • trunk/Source/WebKit/WebProcess/Inspector/RemoteWebInspectorUI.h

    r269524 r269701  
    4040namespace WebKit {
    4141
     42class WebInspectorUIExtensionController;
    4243class WebPage;
    4344
    44 class RemoteWebInspectorUI final : public RefCounted<RemoteWebInspectorUI>, public IPC::MessageReceiver, public WebCore::InspectorFrontendClient {
     45class RemoteWebInspectorUI final
     46    : public RefCounted<RemoteWebInspectorUI>
     47    , public IPC::MessageReceiver
     48    , public WebCore::InspectorFrontendClient {
    4549public:
    4650    static Ref<RemoteWebInspectorUI> create(WebPage&);
     51    ~RemoteWebInspectorUI();
    4752
    4853    // Implemented in generated RemoteWebInspectorUIMessageReceiver.cpp
     
    98103    void sendMessageToBackend(const String&) override;
    99104    WebCore::InspectorFrontendAPIDispatcher& frontendAPIDispatcher() override { return m_frontendAPIDispatcher; }
     105    WebCore::Page* frontendPage() final;
    100106
    101107#if ENABLE(INSPECTOR_TELEMETRY)
     
    118124    Ref<WebCore::InspectorFrontendAPIDispatcher> m_frontendAPIDispatcher;
    119125    RefPtr<WebCore::InspectorFrontendHost> m_frontendHost;
     126#if ENABLE(INSPECTOR_EXTENSIONS)
     127    std::unique_ptr<WebInspectorUIExtensionController> m_extensionController;
     128#endif
     129
    120130    DebuggableInfoData m_debuggableInfo;
    121131    String m_backendCommandsURL;
  • trunk/Source/WebKit/WebProcess/Inspector/WebInspectorUI.cpp

    r269524 r269701  
    3737#include <WebCore/FloatRect.h>
    3838#include <WebCore/InspectorController.h>
     39#include <WebCore/InspectorFrontendHost.h>
    3940#include <WebCore/NotImplemented.h>
    4041#include <WebCore/RuntimeEnabledFeatures.h>
    4142#include <WebCore/Settings.h>
     43
     44#if ENABLE(INSPECTOR_EXTENSIONS)
     45#include "WebInspectorUIExtensionController.h"
     46#endif
    4247
    4348namespace WebKit {
     
    6671}
    6772
     73WebInspectorUI::~WebInspectorUI() = default;
     74
    6875void WebInspectorUI::establishConnection(WebPageProxyIdentifier inspectedPageIdentifier, const DebuggableInfoData& debuggableInfo, bool underTest, unsigned inspectionLevel)
    6976{
     
    7380    m_inspectionLevel = inspectionLevel;
    7481
     82#if ENABLE(INSPECTOR_EXTENSIONS)
     83    if (!m_extensionController)
     84        m_extensionController = makeUnique<WebInspectorUIExtensionController>(*this);
     85#endif
     86
    7587    m_frontendAPIDispatcher->reset();
    76 
    7788    m_frontendController = &m_page.corePage()->inspectorController();
    7889    m_frontendController->setInspectorFrontendClient(this);
     
    166177    m_inspectedPageIdentifier = { };
    167178    m_underTest = false;
     179   
     180#if ENABLE(INSPECTOR_EXTENSIONS)
     181    m_extensionController = nullptr;
     182#endif
    168183}
    169184
     
    413428}
    414429
     430WebCore::Page* WebInspectorUI::frontendPage()
     431{
     432    return m_page.corePage();
     433}
     434
     435
    415436#if !PLATFORM(MAC) && !PLATFORM(GTK) && !PLATFORM(WIN)
    416437bool WebInspectorUI::canSave()
  • trunk/Source/WebKit/WebProcess/Inspector/WebInspectorUI.h

    r269524 r269701  
    3232#include <WebCore/InspectorFrontendAPIDispatcher.h>
    3333#include <WebCore/InspectorFrontendClient.h>
    34 #include <WebCore/InspectorFrontendHost.h>
    3534
    3635namespace WebCore {
    3736class InspectorController;
     37class InspectorFrontendHost;
    3838class CertificateInfo;
    3939class FloatRect;
     
    4343
    4444class WebPage;
     45#if ENABLE(INSPECTOR_EXTENSIONS)
     46class WebInspectorUIExtensionController;
     47#endif
    4548
    46 class WebInspectorUI : public RefCounted<WebInspectorUI>, private IPC::Connection::Client, public WebCore::InspectorFrontendClient {
     49class WebInspectorUI final
     50    : public RefCounted<WebInspectorUI>
     51    , private IPC::Connection::Client
     52    , public WebCore::InspectorFrontendClient {
    4753public:
    4854    static Ref<WebInspectorUI> create(WebPage&);
     55    virtual ~WebInspectorUI();
    4956
    5057    static void enableFrontendFeatures();
     
    144151    void sendMessageToBackend(const String&) override;
    145152    WebCore::InspectorFrontendAPIDispatcher& frontendAPIDispatcher() final { return m_frontendAPIDispatcher; }
    146 
     153    WebCore::Page* frontendPage() final;
     154       
    147155    void pagePaused() override;
    148156    void pageUnpaused() override;
     
    161169    WebCore::InspectorController* m_frontendController { nullptr };
    162170
     171#if ENABLE(INSPECTOR_EXTENSIONS)
     172    std::unique_ptr<WebInspectorUIExtensionController> m_extensionController;
     173#endif
     174
    163175    WebPageProxyIdentifier m_inspectedPageIdentifier;
    164176    bool m_underTest { false };
  • trunk/Source/WebKit/WebProcess/Inspector/WebInspectorUIExtensionController.messages.in

    r269700 r269701  
    1 # Copyright (C) 2016-2020 Apple Inc. All rights reserved.
     1# Copyright (C) 2020 Apple Inc. All rights reserved.
    22#
    33# Redistribution and use in source and binary forms, with or without
     
    2121# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2222
    23 messages -> RemoteWebInspectorProxy {
    24     FrontendDidClose()
    25     Reopen()
    26     ResetState()
    27     BringToFront()
     23#if ENABLE(INSPECTOR_EXTENSIONS)
    2824
    29     Save(String filename, String content, bool base64Encoded, bool forceSaveAs)
    30     Append(String filename, String content)
     25messages -> WebInspectorUIExtensionController NotRefCounted {
     26    RegisterExtension(String extensionID, String displayName) -> (Expected<bool, WebKit::InspectorExtensionError> result) Async
     27    UnregisterExtension(String extensionID) -> (Expected<bool, WebKit::InspectorExtensionError> result) Async
     28}
    3129
    32     SetForcedAppearance(WebCore::InspectorFrontendClient::Appearance appearance)
    33 
    34     SetSheetRect(WebCore::FloatRect rect)
    35 
    36     StartWindowDrag()
    37 
    38     OpenURLExternally(String url)
    39     ShowCertificate(WebCore::CertificateInfo certificateInfo)
    40 
    41     SendMessageToBackend(String message)
    42 }
     30#endif // ENABLE(INSPECTOR_EXTENSIONS)
  • trunk/Tools/ChangeLog

    r269699 r269701  
     12020-11-11  Brian Burg  <bburg@apple.com>
     2
     3        [Cocoa] Inspector Extensions: Add _WKInspectorExtension and related plumbing
     4        https://bugs.webkit.org/show_bug.cgi?id=217783
     5        <rdar://problem/69968787>
     6
     7        Reviewed by Devin Rousso.
     8
     9        Add API tests to exercise new methods of the _WKInspectorExtensionHost protocol.
     10
     11        * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: New test file.
     12        * TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtensionHost.mm: Added.
     13        (resetGlobalState):
     14        (-[UIDelegateForTestingInspectorExtensionHost _webView:didAttachLocalInspector:]):
     15        (TEST):
     16
    1172020-11-11  Aakash Jain  <aakash_jain@apple.com>
    218
  • trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj

    r269671 r269701  
    839839                9984FACE1CFFB090008D198C /* editable-body.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 9984FACD1CFFB038008D198C /* editable-body.html */; };
    840840                9999108B1F393C96008AD455 /* Copying.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9999108A1F393C8B008AD455 /* Copying.mm */; };
     841                999B7EE32551C63B00F450A4 /* WKInspectorExtensionHost.mm in Sources */ = {isa = PBXBuildFile; fileRef = 999B7EE22551C63B00F450A4 /* WKInspectorExtensionHost.mm */; };
    841842                99B4F9C624EDED9700022B82 /* WKInspectorDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 99B4F9C524EDED9600022B82 /* WKInspectorDelegate.mm */; };
    842843                9B02E0D6235FA47D004044B2 /* TextManipulation.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9B02E0D5235FA47D004044B2 /* TextManipulation.mm */; };
     
    24572458                9984FACD1CFFB038008D198C /* editable-body.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "editable-body.html"; sourceTree = "<group>"; };
    24582459                9999108A1F393C8B008AD455 /* Copying.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = Copying.mm; sourceTree = "<group>"; };
     2460                999B7EE22551C63B00F450A4 /* WKInspectorExtensionHost.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKInspectorExtensionHost.mm; sourceTree = "<group>"; };
    24592461                99B4F9C524EDED9600022B82 /* WKInspectorDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKInspectorDelegate.mm; sourceTree = "<group>"; };
    24602462                9B02E0D5235FA47D004044B2 /* TextManipulation.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = TextManipulation.mm; sourceTree = "<group>"; };
     
    34273429                                51D124971E763AF8002B2820 /* WKHTTPCookieStore.mm */,
    34283430                                99B4F9C524EDED9600022B82 /* WKInspectorDelegate.mm */,
     3431                                999B7EE22551C63B00F450A4 /* WKInspectorExtensionHost.mm */,
    34293432                                A5A729F01F622A9A00DE5A28 /* WKNavigationResponse.mm */,
    34303433                                DF4B273821A47727009BD1CA /* WKNSDictionaryEmptyDictionaryCrash.mm */,
     
    55675570                                7CCE7F1D1A411AE600447C4C /* WKImageCreateCGImageCrash.cpp in Sources */,
    55685571                                99B4F9C624EDED9700022B82 /* WKInspectorDelegate.mm in Sources */,
     5572                                999B7EE32551C63B00F450A4 /* WKInspectorExtensionHost.mm in Sources */,
    55695573                                A5A729F11F622AA700DE5A28 /* WKNavigationResponse.mm in Sources */,
    55705574                                DF4B273921A47728009BD1CA /* WKNSDictionaryEmptyDictionaryCrash.mm in Sources */,
Note: See TracChangeset for help on using the changeset viewer.