diff options
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/glue/glue.vcproj | 4 | ||||
-rw-r--r-- | webkit/glue/tools_proxy.h | 75 | ||||
-rw-r--r-- | webkit/glue/webview.h | 5 | ||||
-rw-r--r-- | webkit/glue/webview_impl.cc | 5 | ||||
-rw-r--r-- | webkit/glue/webview_impl.h | 2 |
5 files changed, 91 insertions, 0 deletions
diff --git a/webkit/glue/glue.vcproj b/webkit/glue/glue.vcproj index acaad6f..1f7e9d7 100644 --- a/webkit/glue/glue.vcproj +++ b/webkit/glue/glue.vcproj @@ -173,6 +173,10 @@ > </File> <File + RelativePath=".\tools_proxy.h" + > + </File> + <File RelativePath=".\webdatasource.h" > </File> diff --git a/webkit/glue/tools_proxy.h b/webkit/glue/tools_proxy.h new file mode 100644 index 0000000..d4d70b5 --- /dev/null +++ b/webkit/glue/tools_proxy.h @@ -0,0 +1,75 @@ +// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Developer tools consist of following parts:
+//
+// ToolsAgent lives in the renderer of an inspected page and provides access to
+// the pages resources, DOM, v8 etc. by means of IPC messages.
+//
+// ToolsClient is a thin delegate that lives in the tools front-end renderer and
+// converts IPC messages to frontend methods calls and allows the frontend to
+// send messages to the ToolsAgent.
+//
+// All the messages are routed through browser process.
+//
+// Chain of communication between the components may be described by the
+// following diagram:
+// --------------------------
+// | (tools frontend |
+// | renderer process) |
+// | | --------------------
+// |tools <--> ToolsClient+<-- IPC -->+ (browser process) |
+// |frontend | | |
+// -------------------------- -----------+--------
+// ^
+// |
+// IPC
+// |
+// v
+// --------------------------+-------
+// | inspected page <--> ToolsAgent |
+// | |
+// | (inspected page renderer process)|
+// ----------------------------------
+//
+// This file describes interface between tools frontend and ToolsClient in the
+// above diagram.
+
+#ifndef WEBKIT_GLUE_TOOLS_PROXY_H_
+#define WEBKIT_GLUE_TOOLS_PROXY_H_
+
+#include "base/basictypes.h"
+
+class ToolsUI;
+
+// Interface for sending messages to remote ToolsAgent.
+class ToolsProxy {
+ public:
+ ToolsProxy() {}
+ virtual ~ToolsProxy() {}
+
+ virtual void SetToolsUI(ToolsUI* tools_ui) = 0;
+
+ virtual void DebugAttach() = 0;
+ virtual void DebugDetach() = 0;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ToolsProxy);
+};
+
+
+// Interface for accessing tools frontend.
+class ToolsUI {
+ public:
+ ToolsUI() {}
+ virtual ~ToolsUI() {}
+
+ virtual void OnDidDebugAttach() = 0;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ToolsUI);
+};
+
+#endif // WEBKIT_GLUE_TOOLS_PROXY_H_
+
diff --git a/webkit/glue/webview.h b/webkit/glue/webview.h index 39d608c..f0f3e26 100644 --- a/webkit/glue/webview.h +++ b/webkit/glue/webview.h @@ -12,6 +12,7 @@ #include "base/ref_counted.h" #include "webkit/glue/webwidget.h" +class ToolsProxy; struct WebDropData; struct WebPreferences; class GURL; @@ -165,6 +166,10 @@ class WebView : public WebWidget { // Show the JavaScript console. virtual void ShowJavaScriptConsole() = 0; + // Set up developer tools UI bindings. It is guaranteed that tools_proxy will + // overlive this webview. + virtual void SetUpToolsProxy(ToolsProxy* tools_proxy) = 0; + // Notifies the webview that a drag has terminated. virtual void DragSourceEndedAt( int client_x, int client_y, int screen_x, int screen_y) = 0; diff --git a/webkit/glue/webview_impl.cc b/webkit/glue/webview_impl.cc index 7959b6f..496aa7d 100644 --- a/webkit/glue/webview_impl.cc +++ b/webkit/glue/webview_impl.cc @@ -1429,6 +1429,11 @@ void WebViewImpl::ShowJavaScriptConsole() { page_->inspectorController()->showPanel(InspectorController::ConsolePanel); } +void WebViewImpl::SetUpToolsProxy(ToolsProxy* tools_proxy) { + DCHECK(page_ != NULL); + // TODO(yurys): implement +} + void WebViewImpl::DragSourceEndedAt( int client_x, int client_y, int screen_x, int screen_y) { PlatformMouseEvent pme(IntPoint(client_x, client_y), diff --git a/webkit/glue/webview_impl.h b/webkit/glue/webview_impl.h index c511e7b..ed0dbce 100644 --- a/webkit/glue/webview_impl.h +++ b/webkit/glue/webview_impl.h @@ -37,6 +37,7 @@ class Widget; class AutocompletePopupMenuClient; class ImageResourceFetcher; class SearchableFormData; +class ToolsProxy; struct WebDropData; class WebHistoryItemImpl; class WebKeyboardEvent; @@ -89,6 +90,7 @@ class WebViewImpl : public WebView, public base::RefCounted<WebViewImpl> { virtual void CopyImageAt(int x, int y); virtual void InspectElement(int x, int y); virtual void ShowJavaScriptConsole(); + virtual void SetUpToolsProxy(ToolsProxy* tools_proxy); virtual void DragSourceEndedAt( int client_x, int client_y, int screen_x, int screen_y); virtual void DragSourceMovedTo( |