summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents
diff options
context:
space:
mode:
authoryurys@google.com <yurys@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-18 16:17:21 +0000
committeryurys@google.com <yurys@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-18 16:17:21 +0000
commit68b4d89935563f7009074cef5b7be8e0d8148bd4 (patch)
treef987689e2cc300230538482e7fa7b61b8dabd4bf /chrome/browser/tab_contents
parentdaeb1b6db0ddff328b2ed4bc839a9f15936c3496 (diff)
downloadchromium_src-68b4d89935563f7009074cef5b7be8e0d8148bd4.zip
chromium_src-68b4d89935563f7009074cef5b7be8e0d8148bd4.tar.gz
chromium_src-68b4d89935563f7009074cef5b7be8e0d8148bd4.tar.bz2
Create communication channel between developer tools UI implemented in JS and residing in a process different from inspected page renderer process. There is no direct IPC channel between the two processes so all messages are routed through browser process.
On the side of inspected page there is ToolsAgent existing in all renderers so that we can start inspecting the page at any moment by talking to this object. On the side of developer tools renderer there is ToolsClient which is created only for RenderView that host developer tools UI. This change is a slightly modified version of http://codereview.chromium.org/20221/show Review URL: http://codereview.chromium.org/20430 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9944 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r--chrome/browser/tab_contents/tab_contents_factory.cc7
-rw-r--r--chrome/browser/tab_contents/tab_contents_type.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/tab_contents/tab_contents_factory.cc b/chrome/browser/tab_contents/tab_contents_factory.cc
index 18f3569..64f0605 100644
--- a/chrome/browser/tab_contents/tab_contents_factory.cc
+++ b/chrome/browser/tab_contents/tab_contents_factory.cc
@@ -11,6 +11,7 @@
#include "chrome/browser/profile.h"
#include "chrome/browser/renderer_host/render_process_host.h"
#include "chrome/browser/debugger/debugger_contents.h"
+#include "chrome/browser/debugger/tools_contents.h"
#include "chrome/browser/tab_contents/native_ui_contents.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/browser/tab_contents/tab_contents_factory.h"
@@ -61,6 +62,9 @@ TabContents* TabContents::CreateWithType(TabContentsType type,
case TAB_CONTENTS_DEBUGGER:
contents = new DebuggerContents(profile, instance);
break;
+ case TAB_CONTENTS_TOOLS:
+ contents = new ToolsContents(profile, instance);
+ break;
case TAB_CONTENTS_DOM_UI:
contents = new DOMUIContents(profile, instance, NULL);
break;
@@ -108,6 +112,9 @@ TabContentsType TabContents::TypeForURL(GURL* url) {
if (DebuggerContents::IsDebuggerUrl(*url))
return TAB_CONTENTS_DEBUGGER;
+ if (ToolsContents::IsToolsUrl(*url))
+ return TAB_CONTENTS_TOOLS;
+
if (url->SchemeIs(DOMUIContents::GetScheme().c_str()))
return TAB_CONTENTS_DOM_UI;
diff --git a/chrome/browser/tab_contents/tab_contents_type.h b/chrome/browser/tab_contents/tab_contents_type.h
index 87cd6452..6a8afd9 100644
--- a/chrome/browser/tab_contents/tab_contents_type.h
+++ b/chrome/browser/tab_contents/tab_contents_type.h
@@ -21,6 +21,7 @@ enum TabContentsType {
TAB_CONTENTS_ABOUT_UI,
TAB_CONTENTS_DEBUGGER,
TAB_CONTENTS_DOM_UI,
+ TAB_CONTENTS_TOOLS,
TAB_CONTENTS_NUM_TYPES
};