diff options
author | yurys@google.com <yurys@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-16 13:42:47 +0000 |
---|---|---|
committer | yurys@google.com <yurys@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-16 13:42:47 +0000 |
commit | 40ecc904994be903e4a24d26650739275e5f0f4b (patch) | |
tree | 643f495251032ba20b9d66cc151e03d21017593c /chrome/browser/tab_contents | |
parent | b92626f5fba89d0996abfa8955e49e8d88587869 (diff) | |
download | chromium_src-40ecc904994be903e4a24d26650739275e5f0f4b.zip chromium_src-40ecc904994be903e4a24d26650739275e5f0f4b.tar.gz chromium_src-40ecc904994be903e4a24d26650739275e5f0f4b.tar.bz2 |
DevToolsManager is a service in the browser process that manages all open developer tools windows. It's supposed to route devtoools messages. Also it will notify DevToolsClient when inspected renderer crashes or when it's changes due to cross-site navigation. Currently when inspected tab is closed it will close devtools window as well.
Devtools state moved from RenderViewHost and WebContentsView to the manager.
Please look at devtools_manager.{h,cc} in the first place.
Review URL: http://codereview.chromium.org/42076
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11727 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents')
8 files changed, 0 insertions, 62 deletions
diff --git a/chrome/browser/tab_contents/interstitial_page.cc b/chrome/browser/tab_contents/interstitial_page.cc index a4e4f5b..2a63a41 100644 --- a/chrome/browser/tab_contents/interstitial_page.cc +++ b/chrome/browser/tab_contents/interstitial_page.cc @@ -84,7 +84,6 @@ class InterstitialPage::InterstitialPageRVHViewDelegate virtual void UpdateDragCursor(bool is_drop_target); virtual void TakeFocus(bool reverse); virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event); - virtual void ForwardMessageToDevToolsClient(const IPC::Message& message); virtual void OnFindReply(int request_id, int number_of_matches, const gfx::Rect& selection_rect, @@ -486,11 +485,6 @@ void InterstitialPage::InterstitialPageRVHViewDelegate::HandleKeyboardEvent( interstitial_page_->tab()->GetViewDelegate()->HandleKeyboardEvent(event); } -void InterstitialPage::InterstitialPageRVHViewDelegate:: - ForwardMessageToDevToolsClient(const IPC::Message& message) { - NOTREACHED() << "InterstitialPage does not support developer tools content."; -} - void InterstitialPage::InterstitialPageRVHViewDelegate::OnFindReply( int request_id, int number_of_matches, const gfx::Rect& selection_rect, int active_match_ordinal, bool final_update) { diff --git a/chrome/browser/tab_contents/web_contents_view.h b/chrome/browser/tab_contents/web_contents_view.h index 52fceba..f63a3ee 100644 --- a/chrome/browser/tab_contents/web_contents_view.h +++ b/chrome/browser/tab_contents/web_contents_view.h @@ -108,13 +108,6 @@ class WebContentsView : public RenderViewHostDelegate::View { // RenderWidgetHost is deleted. Removes |host| from internal maps. void RenderWidgetHostDestroyed(RenderWidgetHost* host); - // Opens developer tools window for the page. - virtual void OpenDeveloperTools() = 0; - - // Forwards message to DevToolsClient in developer tools window open for this - // page. - virtual void ForwardMessageToDevToolsClient(const IPC::Message& message) = 0; - // Sets focus to the appropriate element when the tab contents is shown the // first time. virtual void SetInitialFocus() = 0; diff --git a/chrome/browser/tab_contents/web_contents_view_gtk.cc b/chrome/browser/tab_contents/web_contents_view_gtk.cc index e550174..7b6cf18 100644 --- a/chrome/browser/tab_contents/web_contents_view_gtk.cc +++ b/chrome/browser/tab_contents/web_contents_view_gtk.cc @@ -121,15 +121,6 @@ void WebContentsViewGtk::SizeContents(const gfx::Size& size) { NOTIMPLEMENTED(); } -void WebContentsViewGtk::OpenDeveloperTools() { - NOTIMPLEMENTED(); -} - -void WebContentsViewGtk::ForwardMessageToDevToolsClient( - const IPC::Message& message) { - NOTIMPLEMENTED(); -} - void WebContentsViewGtk::FindInPage(const Browser& browser, bool find_next, bool forward_direction) { NOTIMPLEMENTED(); diff --git a/chrome/browser/tab_contents/web_contents_view_gtk.h b/chrome/browser/tab_contents/web_contents_view_gtk.h index ec71c49..f218fee 100644 --- a/chrome/browser/tab_contents/web_contents_view_gtk.h +++ b/chrome/browser/tab_contents/web_contents_view_gtk.h @@ -33,8 +33,6 @@ class WebContentsViewGtk : public WebContentsView { virtual void SetPageTitle(const std::wstring& title); virtual void Invalidate(); virtual void SizeContents(const gfx::Size& size); - virtual void OpenDeveloperTools(); - virtual void ForwardMessageToDevToolsClient(const IPC::Message& message); virtual void FindInPage(const Browser& browser, bool find_next, bool forward_direction); virtual void HideFindBar(bool end_session); diff --git a/chrome/browser/tab_contents/web_contents_view_mac.h b/chrome/browser/tab_contents/web_contents_view_mac.h index e7bffac..352f5bc 100644 --- a/chrome/browser/tab_contents/web_contents_view_mac.h +++ b/chrome/browser/tab_contents/web_contents_view_mac.h @@ -50,8 +50,6 @@ class WebContentsViewMac : public WebContentsView, virtual void SetPageTitle(const std::wstring& title); virtual void Invalidate(); virtual void SizeContents(const gfx::Size& size); - virtual void OpenDeveloperTools(); - virtual void ForwardMessageToDevToolsClient(const IPC::Message& message); virtual void FindInPage(const Browser& browser, bool find_next, bool forward_direction); virtual void HideFindBar(bool end_session); diff --git a/chrome/browser/tab_contents/web_contents_view_mac.mm b/chrome/browser/tab_contents/web_contents_view_mac.mm index b607697..efde5a5 100644 --- a/chrome/browser/tab_contents/web_contents_view_mac.mm +++ b/chrome/browser/tab_contents/web_contents_view_mac.mm @@ -104,15 +104,6 @@ void WebContentsViewMac::SizeContents(const gfx::Size& size) { NOTIMPLEMENTED(); // Leaving the hack unimplemented. } -void WebContentsViewMac::OpenDeveloperTools() { - NOTIMPLEMENTED(); -} - -void WebContentsViewMac::ForwardMessageToDevToolsClient( - const IPC::Message& message) { - NOTIMPLEMENTED(); -} - void WebContentsViewMac::FindInPage(const Browser& browser, bool find_next, bool forward_direction) { if (!find_bar_.get()) { diff --git a/chrome/browser/tab_contents/web_contents_view_win.cc b/chrome/browser/tab_contents/web_contents_view_win.cc index 927f612..f087a2c 100644 --- a/chrome/browser/tab_contents/web_contents_view_win.cc +++ b/chrome/browser/tab_contents/web_contents_view_win.cc @@ -9,7 +9,6 @@ #include "chrome/browser/bookmarks/bookmark_drag_data.h" #include "chrome/browser/browser.h" // TODO(beng): this dependency is awful. #include "chrome/browser/browser_process.h" -#include "chrome/browser/debugger/dev_tools_window.h" #include "chrome/browser/dom_ui/dom_ui_host.h" #include "chrome/browser/download/download_request_manager.h" #include "chrome/browser/renderer_host/render_process_host.h" @@ -224,26 +223,6 @@ void WebContentsViewWin::SizeContents(const gfx::Size& size) { WasSized(size); } -void WebContentsViewWin::OpenDeveloperTools() { - if (!dev_tools_window_.get()) - dev_tools_window_.reset(new DevToolsWindow); - - RenderViewHost* host = web_contents_->render_view_host(); - if (!host) - return; - - dev_tools_window_->Show(host->process()->pid(), host->routing_id()); -} - -void WebContentsViewWin::ForwardMessageToDevToolsClient( - const IPC::Message& message) { - if (!dev_tools_window_.get()) { - NOTREACHED() << "Developer tools window is not open."; - return; - } - dev_tools_window_->SendDevToolsClientMessage(message); -} - void WebContentsViewWin::SetInitialFocus() { if (web_contents_->AsDOMUIContents()) web_contents_->AsDOMUIContents()->SetInitialFocus(); diff --git a/chrome/browser/tab_contents/web_contents_view_win.h b/chrome/browser/tab_contents/web_contents_view_win.h index cd26bb7..e4f9e45 100644 --- a/chrome/browser/tab_contents/web_contents_view_win.h +++ b/chrome/browser/tab_contents/web_contents_view_win.h @@ -10,7 +10,6 @@ #include "chrome/browser/tab_contents/web_contents_view.h" #include "chrome/views/widget_win.h" -class DevToolsWindow; class SadTabView; struct WebDropData; class WebDropTarget; @@ -41,8 +40,6 @@ class WebContentsViewWin : public WebContentsView, virtual void SetPageTitle(const std::wstring& title); virtual void Invalidate(); virtual void SizeContents(const gfx::Size& size); - virtual void OpenDeveloperTools(); - virtual void ForwardMessageToDevToolsClient(const IPC::Message& message); virtual void SetInitialFocus(); virtual void StoreFocus(); virtual void RestoreFocus(); @@ -103,9 +100,6 @@ class WebContentsViewWin : public WebContentsView, WebContents* web_contents_; - // Allows to show exactly one developer tools window for this page. - scoped_ptr<DevToolsWindow> dev_tools_window_; - // A drop target object that handles drags over this WebContents. scoped_refptr<WebDropTarget> drop_target_; |