diff options
author | pfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-12 09:20:33 +0000 |
---|---|---|
committer | pfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-12 09:20:33 +0000 |
commit | cc2734044c6c94e19f853715cbd5b6abb9098fd8 (patch) | |
tree | aa23efbabb24de5592842b5f707a917baa10bf24 /chrome/browser/debugger/devtools_manager.cc | |
parent | ce8b154d8c8f0e9b9c1c18b0c714c98cacbf5b97 (diff) | |
download | chromium_src-cc2734044c6c94e19f853715cbd5b6abb9098fd8.zip chromium_src-cc2734044c6c94e19f853715cbd5b6abb9098fd8.tar.gz chromium_src-cc2734044c6c94e19f853715cbd5b6abb9098fd8.tar.bz2 |
DevTools: Sanity ui test.
BUG=11533
Review URL: http://codereview.chromium.org/115127
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15845 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/debugger/devtools_manager.cc')
-rw-r--r-- | chrome/browser/debugger/devtools_manager.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/chrome/browser/debugger/devtools_manager.cc b/chrome/browser/debugger/devtools_manager.cc index d1a1da3..94d2868 100644 --- a/chrome/browser/debugger/devtools_manager.cc +++ b/chrome/browser/debugger/devtools_manager.cc @@ -7,6 +7,9 @@ #include "chrome/browser/debugger/devtools_window.h" #include "chrome/browser/debugger/devtools_client_host.h" #include "chrome/browser/renderer_host/render_view_host.h" +#include "chrome/browser/tab_contents/navigation_controller.h" +#include "chrome/browser/tab_contents/navigation_entry.h" +#include "chrome/browser/tab_contents/tab_contents.h" #include "chrome/common/devtools_messages.h" #include "googleurl/src/gurl.h" @@ -51,7 +54,7 @@ void DevToolsManager::ForwardToDevToolsAgent( if (!win) { continue; } - if (win->HasRenderViewHost(*client_rvh)) { + if (client_rvh == win->GetRenderViewHost()) { ForwardToDevToolsAgent(win, message); return; } @@ -89,6 +92,13 @@ void DevToolsManager::OpenDevToolsWindow(RenderViewHost* inspected_rvh) { host = DevToolsWindow::Create(); RegisterDevToolsClientHostFor(inspected_rvh, host); } + TabContents* tab_contents = inspected_rvh->delegate()->GetAsTabContents(); + if (tab_contents) { + NavigationEntry* entry = tab_contents->controller().GetActiveEntry(); + if (entry) { + host->SetInspectedTabUrl(entry->url().possibly_invalid_spec()); + } + } DevToolsWindow* window = host->AsDevToolsWindow(); if (window) window->Show(); |