- Revision
- 161994
- Author
- [email protected]
- Date
- 2014-01-14 12:23:41 -0800 (Tue, 14 Jan 2014)
Log 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 <[email protected]> on 2014-01-14
Reviewed by Timothy Hatcher.
Source/_javascript_Core:
* 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.
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (161993 => 161994)
--- trunk/Source/_javascript_Core/ChangeLog 2014-01-14 20:17:13 UTC (rev 161993)
+++ trunk/Source/_javascript_Core/ChangeLog 2014-01-14 20:23:41 UTC (rev 161994)
@@ -1,3 +1,27 @@
+2014-01-14 Joseph Pecoraro <[email protected]>
+
+ Web Inspector: For Remote Inspection link WebProcess's to their parent UIProcess
+ https://bugs.webkit.org/show_bug.cgi?id=126995
+
+ Reviewed by Timothy Hatcher.
+
+ * 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.
+
2014-01-14 Brian J. Burg <[email protected]>
Add ENABLE(WEB_REPLAY) feature flag to the build system
Modified: trunk/Source/_javascript_Core/inspector/remote/RemoteInspector.mm (161993 => 161994)
--- trunk/Source/_javascript_Core/inspector/remote/RemoteInspector.mm 2014-01-14 20:17:13 UTC (rev 161993)
+++ trunk/Source/_javascript_Core/inspector/remote/RemoteInspector.mm 2014-01-14 20:23:41 UTC (rev 161994)
@@ -297,6 +297,11 @@
if (debuggableInfo.hasLocalDebugger)
[debuggableDetails setObject:@YES forKey:WIRHasLocalDebuggerKey];
+ if (debuggableInfo.hasParentProcess()) {
+ NSString *parentApplicationIdentifier = [NSString stringWithFormat:@"PID:%lu", (unsigned long)debuggableInfo.parentProcessIdentifier];
+ [debuggableDetails setObject:parentApplicationIdentifier forKey:WIRHostApplicationIdentifierKey];
+ }
+
return debuggableDetails;
}
Modified: trunk/Source/_javascript_Core/inspector/remote/RemoteInspectorConstants.h (161993 => 161994)
--- trunk/Source/_javascript_Core/inspector/remote/RemoteInspectorConstants.h 2014-01-14 20:17:13 UTC (rev 161993)
+++ trunk/Source/_javascript_Core/inspector/remote/RemoteInspectorConstants.h 2014-01-14 20:23:41 UTC (rev 161994)
@@ -40,6 +40,7 @@
#define WIRApplicationIdentifierKey @"WIRApplicationIdentifierKey"
+#define WIRApplicationBundleIdentifierKey @"WIRApplicationBundleIdentifierKey"
#define WIRApplicationNameKey @"WIRApplicationNameKey"
#define WIRIsApplicationProxyKey @"WIRIsApplicationProxyKey"
#define WIRHostApplicationIdentifierKey @"WIRHostApplicationIdentifierKey"
Modified: trunk/Source/_javascript_Core/inspector/remote/RemoteInspectorDebuggable.cpp (161993 => 161994)
--- trunk/Source/_javascript_Core/inspector/remote/RemoteInspectorDebuggable.cpp 2014-01-14 20:17:13 UTC (rev 161993)
+++ trunk/Source/_javascript_Core/inspector/remote/RemoteInspectorDebuggable.cpp 2014-01-14 20:23:41 UTC (rev 161994)
@@ -73,6 +73,7 @@
info.url = ""
info.hasLocalDebugger = hasLocalDebugger();
info.remoteDebuggingAllowed = remoteDebuggingAllowed();
+ info.parentProcessIdentifier = parentProcessIdentifier();
return info;
}
Modified: trunk/Source/_javascript_Core/inspector/remote/RemoteInspectorDebuggable.h (161993 => 161994)
--- trunk/Source/_javascript_Core/inspector/remote/RemoteInspectorDebuggable.h 2014-01-14 20:17:13 UTC (rev 161993)
+++ trunk/Source/_javascript_Core/inspector/remote/RemoteInspectorDebuggable.h 2014-01-14 20:23:41 UTC (rev 161994)
@@ -56,6 +56,7 @@
virtual String name() const { return String(); } // _javascript_ and Web
virtual String url() const { return String(); } // Web
virtual bool hasLocalDebugger() const = 0;
+ virtual pid_t parentProcessIdentifier() const { return 0; }
virtual void connect(InspectorFrontendChannel*) = 0;
virtual void disconnect() = 0;
@@ -73,15 +74,19 @@
, type(RemoteInspectorDebuggable::_javascript_)
, hasLocalDebugger(false)
, remoteDebuggingAllowed(false)
+ , parentProcessIdentifier(0)
{
}
+ bool hasParentProcess() const { return !!parentProcessIdentifier; }
+
unsigned identifier;
RemoteInspectorDebuggable::DebuggableType type;
String name;
String url;
bool hasLocalDebugger;
bool remoteDebuggingAllowed;
+ pid_t parentProcessIdentifier;
};
} // namespace Inspector
Modified: trunk/Source/WebCore/ChangeLog (161993 => 161994)
--- trunk/Source/WebCore/ChangeLog 2014-01-14 20:17:13 UTC (rev 161993)
+++ trunk/Source/WebCore/ChangeLog 2014-01-14 20:23:41 UTC (rev 161994)
@@ -1,3 +1,19 @@
+2014-01-14 Joseph Pecoraro <[email protected]>
+
+ Web Inspector: For Remote Inspection link WebProcess's to their parent UIProcess
+ https://bugs.webkit.org/show_bug.cgi?id=126995
+
+ Reviewed by Timothy Hatcher.
+
+ * 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.
+
2014-01-14 Tim Horton <[email protected]>
iOS WebKit2 build fixes, part 2
Modified: trunk/Source/WebCore/inspector/InspectorClient.h (161993 => 161994)
--- trunk/Source/WebCore/inspector/InspectorClient.h 2014-01-14 20:17:13 UTC (rev 161993)
+++ trunk/Source/WebCore/inspector/InspectorClient.h 2014-01-14 20:23:41 UTC (rev 161994)
@@ -49,6 +49,10 @@
virtual void bringFrontendToFront() = 0;
virtual void didResizeMainFrame(Frame*) { }
+#if ENABLE(REMOTE_INSPECTOR)
+ virtual pid_t parentProcessIdentifier() const { return 0; }
+#endif
+
virtual void highlight() = 0;
virtual void hideHighlight() = 0;
Modified: trunk/Source/WebCore/page/PageDebuggable.cpp (161993 => 161994)
--- trunk/Source/WebCore/page/PageDebuggable.cpp 2014-01-14 20:17:13 UTC (rev 161993)
+++ trunk/Source/WebCore/page/PageDebuggable.cpp 2014-01-14 20:23:41 UTC (rev 161994)
@@ -29,6 +29,7 @@
#if ENABLE(REMOTE_INSPECTOR)
#include "Document.h"
+#include "InspectorClient.h"
#include "InspectorController.h"
#include "InspectorForwarding.h"
#include "MainFrame.h"
@@ -65,6 +66,14 @@
return m_page.inspectorController()->hasLocalFrontend();
}
+pid_t PageDebuggable::parentProcessIdentifier() const
+{
+ if (InspectorClient* inspectorClient = m_page.inspectorController()->inspectorClient())
+ return inspectorClient->parentProcessIdentifier();
+
+ return 0;
+}
+
void PageDebuggable::connect(Inspector::InspectorFrontendChannel* channel)
{
InspectorController* inspectorController = m_page.inspectorController();
Modified: trunk/Source/WebCore/page/PageDebuggable.h (161993 => 161994)
--- trunk/Source/WebCore/page/PageDebuggable.h 2014-01-14 20:17:13 UTC (rev 161993)
+++ trunk/Source/WebCore/page/PageDebuggable.h 2014-01-14 20:23:41 UTC (rev 161994)
@@ -46,6 +46,7 @@
virtual String name() const OVERRIDE;
virtual String url() const OVERRIDE;
virtual bool hasLocalDebugger() const OVERRIDE;
+ virtual pid_t parentProcessIdentifier() const OVERRIDE;
virtual void connect(Inspector::InspectorFrontendChannel*) OVERRIDE;
virtual void disconnect() OVERRIDE;
Modified: trunk/Source/WebKit2/ChangeLog (161993 => 161994)
--- trunk/Source/WebKit2/ChangeLog 2014-01-14 20:17:13 UTC (rev 161993)
+++ trunk/Source/WebKit2/ChangeLog 2014-01-14 20:23:41 UTC (rev 161994)
@@ -1,3 +1,15 @@
+2014-01-14 Joseph Pecoraro <[email protected]>
+
+ Web Inspector: For Remote Inspection link WebProcess's to their parent UIProcess
+ https://bugs.webkit.org/show_bug.cgi?id=126995
+
+ Reviewed by Timothy Hatcher.
+
+ * WebProcess/WebCoreSupport/WebInspectorClient.h:
+ * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
+ (WebKit::WebInspectorClient::parentProcessIdentifier):
+ WebProcesses are proxies for a parent UIProcess.
+
2014-01-14 Tim Horton <[email protected]>
iOS WebKit2 build fixes, part 3
Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.cpp (161993 => 161994)
--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.cpp 2014-01-14 20:17:13 UTC (rev 161993)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.cpp 2014-01-14 20:23:41 UTC (rev 161994)
@@ -33,6 +33,10 @@
#include <WebCore/InspectorController.h>
#include <WebCore/Page.h>
+#if ENABLE(REMOTE_INSPECTOR)
+#include "WebProcess.h"
+#endif
+
using namespace WebCore;
namespace WebKit {
@@ -67,6 +71,13 @@
m_page->inspector()->updateDockingAvailability();
}
+#if ENABLE(REMOTE_INSPECTOR)
+pid_t WebInspectorClient::parentProcessIdentifier() const
+{
+ return WebProcess::shared().presenterApplicationPid();
+}
+#endif
+
void WebInspectorClient::highlight()
{
if (!m_highlightOverlay) {
Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.h (161993 => 161994)
--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.h 2014-01-14 20:17:13 UTC (rev 161993)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.h 2014-01-14 20:23:41 UTC (rev 161994)
@@ -58,6 +58,10 @@
virtual void bringFrontendToFront() OVERRIDE;
virtual void didResizeMainFrame(WebCore::Frame*) OVERRIDE;
+#if ENABLE(REMOTE_INSPECTOR)
+ virtual pid_t parentProcessIdentifier() const OVERRIDE;
+#endif
+
virtual void highlight() OVERRIDE;
virtual void hideHighlight() OVERRIDE;