Changeset 161994 in webkit


Ignore:
Timestamp:
Jan 14, 2014 12:23:41 PM (10 years ago)
Author:
commit-queue@webkit.org
Message:

Web Inspector: For Remote Inspection link WebProcess's to their parent UIProcess
https://bugs.webkit.org/show_bug.cgi?id=126995

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2014-01-14
Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

  • inspector/remote/RemoteInspector.mm:

(Inspector::RemoteInspector::listingForDebuggable):
For each WebView, list the parent process. Listing the parent per WebView
is already supported back when we supported processes that could host WebViews
for multiple applications.

  • inspector/remote/RemoteInspectorConstants.h:

Add a separate key for the bundle identifier, separate from application identifier.

  • inspector/remote/RemoteInspectorDebuggable.cpp:

(Inspector::RemoteInspectorDebuggable::info):

  • inspector/remote/RemoteInspectorDebuggable.h:

(Inspector::RemoteInspectorDebuggableInfo::RemoteInspectorDebuggableInfo):
(Inspector::RemoteInspectorDebuggableInfo::hasParentProcess):
If a RemoteInspectorDebuggable has a non-zero parent process identifier
it is a proxy for the parent process.

Source/WebCore:

  • inspector/InspectorClient.h:

(WebCore::InspectorClient::parentProcessIdentifier):
Client method intended for WebKit2 so a WebProcess can link to its UIProcess.

  • page/PageDebuggable.h:
  • page/PageDebuggable.cpp:

(WebCore::PageDebuggable::parentProcessIdentifier):
Provide parent process identifier if there is one.

Source/WebKit2:

  • WebProcess/WebCoreSupport/WebInspectorClient.h:
  • WebProcess/WebCoreSupport/WebInspectorClient.cpp:

(WebKit::WebInspectorClient::parentProcessIdentifier):
WebProcesses are proxies for a parent UIProcess.

Location:
trunk/Source
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r161988 r161994  
     12014-01-14  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Web Inspector: For Remote Inspection link WebProcess's to their parent UIProcess
     4        https://bugs.webkit.org/show_bug.cgi?id=126995
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        * inspector/remote/RemoteInspector.mm:
     9        (Inspector::RemoteInspector::listingForDebuggable):
     10        For each WebView, list the parent process. Listing the parent per WebView
     11        is already supported back when we supported processes that could host WebViews
     12        for multiple applications.
     13
     14        * inspector/remote/RemoteInspectorConstants.h:
     15        Add a separate key for the bundle identifier, separate from application identifier.
     16
     17        * inspector/remote/RemoteInspectorDebuggable.cpp:
     18        (Inspector::RemoteInspectorDebuggable::info):
     19        * inspector/remote/RemoteInspectorDebuggable.h:
     20        (Inspector::RemoteInspectorDebuggableInfo::RemoteInspectorDebuggableInfo):
     21        (Inspector::RemoteInspectorDebuggableInfo::hasParentProcess):
     22        If a RemoteInspectorDebuggable has a non-zero parent process identifier
     23        it is a proxy for the parent process.
     24
    1252014-01-14  Brian J. Burg  <burg@cs.washington.edu>
    226
  • trunk/Source/JavaScriptCore/inspector/remote/RemoteInspector.mm

    r161953 r161994  
    298298        [debuggableDetails setObject:@YES forKey:WIRHasLocalDebuggerKey];
    299299
     300    if (debuggableInfo.hasParentProcess()) {
     301        NSString *parentApplicationIdentifier = [NSString stringWithFormat:@"PID:%lu", (unsigned long)debuggableInfo.parentProcessIdentifier];
     302        [debuggableDetails setObject:parentApplicationIdentifier forKey:WIRHostApplicationIdentifierKey];
     303    }
     304
    300305    return debuggableDetails;
    301306}
  • trunk/Source/JavaScriptCore/inspector/remote/RemoteInspectorConstants.h

    r160887 r161994  
    4141
    4242#define WIRApplicationIdentifierKey             @"WIRApplicationIdentifierKey"
     43#define WIRApplicationBundleIdentifierKey       @"WIRApplicationBundleIdentifierKey"
    4344#define WIRApplicationNameKey                   @"WIRApplicationNameKey"
    4445#define WIRIsApplicationProxyKey                @"WIRIsApplicationProxyKey"
  • trunk/Source/JavaScriptCore/inspector/remote/RemoteInspectorDebuggable.cpp

    r160099 r161994  
    7474    info.hasLocalDebugger = hasLocalDebugger();
    7575    info.remoteDebuggingAllowed = remoteDebuggingAllowed();
     76    info.parentProcessIdentifier = parentProcessIdentifier();
    7677    return info;
    7778}
  • trunk/Source/JavaScriptCore/inspector/remote/RemoteInspectorDebuggable.h

    r160099 r161994  
    5757    virtual String url() const { return String(); } // Web
    5858    virtual bool hasLocalDebugger() const = 0;
     59    virtual pid_t parentProcessIdentifier() const { return 0; }
    5960
    6061    virtual void connect(InspectorFrontendChannel*) = 0;
     
    7475        , hasLocalDebugger(false)
    7576        , remoteDebuggingAllowed(false)
     77        , parentProcessIdentifier(0)
    7678    {
    7779    }
     80
     81    bool hasParentProcess() const { return !!parentProcessIdentifier; }
    7882
    7983    unsigned identifier;
     
    8387    bool hasLocalDebugger;
    8488    bool remoteDebuggingAllowed;
     89    pid_t parentProcessIdentifier;
    8590};
    8691
  • trunk/Source/WebCore/ChangeLog

    r161991 r161994  
     12014-01-14  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Web Inspector: For Remote Inspection link WebProcess's to their parent UIProcess
     4        https://bugs.webkit.org/show_bug.cgi?id=126995
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        * inspector/InspectorClient.h:
     9        (WebCore::InspectorClient::parentProcessIdentifier):
     10        Client method intended for WebKit2 so a WebProcess can link to its UIProcess.
     11
     12        * page/PageDebuggable.h:
     13        * page/PageDebuggable.cpp:
     14        (WebCore::PageDebuggable::parentProcessIdentifier):
     15        Provide parent process identifier if there is one.
     16
    1172014-01-14  Tim Horton  <timothy_horton@apple.com>
    218
  • trunk/Source/WebCore/inspector/InspectorClient.h

    r161534 r161994  
    5050    virtual void didResizeMainFrame(Frame*) { }
    5151
     52#if ENABLE(REMOTE_INSPECTOR)
     53    virtual pid_t parentProcessIdentifier() const { return 0; }
     54#endif
     55
    5256    virtual void highlight() = 0;
    5357    virtual void hideHighlight() = 0;
  • trunk/Source/WebCore/page/PageDebuggable.cpp

    r160099 r161994  
    3030
    3131#include "Document.h"
     32#include "InspectorClient.h"
    3233#include "InspectorController.h"
    3334#include "InspectorForwarding.h"
     
    6667}
    6768
     69pid_t PageDebuggable::parentProcessIdentifier() const
     70{
     71    if (InspectorClient* inspectorClient = m_page.inspectorController()->inspectorClient())
     72        return inspectorClient->parentProcessIdentifier();
     73
     74    return 0;
     75}
     76
    6877void PageDebuggable::connect(Inspector::InspectorFrontendChannel* channel)
    6978{
  • trunk/Source/WebCore/page/PageDebuggable.h

    r160099 r161994  
    4747    virtual String url() const OVERRIDE;
    4848    virtual bool hasLocalDebugger() const OVERRIDE;
     49    virtual pid_t parentProcessIdentifier() const OVERRIDE;
    4950
    5051    virtual void connect(Inspector::InspectorFrontendChannel*) OVERRIDE;
  • trunk/Source/WebKit2/ChangeLog

    r161992 r161994  
     12014-01-14  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Web Inspector: For Remote Inspection link WebProcess's to their parent UIProcess
     4        https://bugs.webkit.org/show_bug.cgi?id=126995
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        * WebProcess/WebCoreSupport/WebInspectorClient.h:
     9        * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
     10        (WebKit::WebInspectorClient::parentProcessIdentifier):
     11        WebProcesses are proxies for a parent UIProcess.
     12
    1132014-01-14  Tim Horton  <timothy_horton@apple.com>
    214
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.cpp

    r150578 r161994  
    3434#include <WebCore/Page.h>
    3535
     36#if ENABLE(REMOTE_INSPECTOR)
     37#include "WebProcess.h"
     38#endif
     39
    3640using namespace WebCore;
    3741
     
    6771        m_page->inspector()->updateDockingAvailability();
    6872}
     73
     74#if ENABLE(REMOTE_INSPECTOR)
     75pid_t WebInspectorClient::parentProcessIdentifier() const
     76{
     77    return WebProcess::shared().presenterApplicationPid();
     78}
     79#endif
    6980
    7081void WebInspectorClient::highlight()
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.h

    r160099 r161994  
    5959    virtual void didResizeMainFrame(WebCore::Frame*) OVERRIDE;
    6060
     61#if ENABLE(REMOTE_INSPECTOR)
     62    virtual pid_t parentProcessIdentifier() const OVERRIDE;
     63#endif
     64
    6165    virtual void highlight() OVERRIDE;
    6266    virtual void hideHighlight() OVERRIDE;
Note: See TracChangeset for help on using the changeset viewer.