diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-20 17:00:42 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-20 17:00:42 +0000 |
commit | aa3c4f8994228ab5b134b42c50e152f69d036d90 (patch) | |
tree | 31885515d19e6cc69041a515e77949979b46d9f9 | |
parent | b3e3a7c25563c04221141be853d91af264c8c440 (diff) | |
download | chromium_src-aa3c4f8994228ab5b134b42c50e152f69d036d90.zip chromium_src-aa3c4f8994228ab5b134b42c50e152f69d036d90.tar.gz chromium_src-aa3c4f8994228ab5b134b42c50e152f69d036d90.tar.bz2 |
Revert r10090, which was committed without proper review.
TBR=brettw
Review URL: http://codereview.chromium.org/20539
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10101 0039d316-1c4b-4281-b951-d872f2087c98
20 files changed, 2 insertions, 507 deletions
diff --git a/chrome/browser/debugger/debugger.scons b/chrome/browser/debugger/debugger.scons index f34a8f1..30d1a65 100644 --- a/chrome/browser/debugger/debugger.scons +++ b/chrome/browser/debugger/debugger.scons @@ -54,12 +54,6 @@ input_files = ChromeFileList([ 'debugger_window.h', 'debugger_wrapper.cc', 'debugger_wrapper.h', - 'tools_contents.cc', - 'tools_contents.h', - 'tools_view.cc', - 'tools_view.h', - 'tools_window.cc', - 'tools_window.h', ]) if env.Bit('linux'): @@ -68,9 +62,6 @@ if env.Bit('linux'): 'debugger_contents.cc', 'debugger_view.cc', 'debugger_window.cc', - 'tools_contents.cc', - 'tools_view.cc', - 'tools_window.cc', ) if env.Bit('mac'): @@ -81,9 +72,6 @@ if env.Bit('mac'): 'debugger_node.cc', 'debugger_view.cc', 'debugger_window.cc', - 'tools_contents.cc', - 'tools_view.cc', - 'tools_window.cc', ) if not env.Bit('mac'): diff --git a/chrome/browser/debugger/debugger.vcproj b/chrome/browser/debugger/debugger.vcproj index e02dd18..d72b86a 100644 --- a/chrome/browser/debugger/debugger.vcproj +++ b/chrome/browser/debugger/debugger.vcproj @@ -213,30 +213,6 @@ RelativePath=".\debugger_wrapper.h" > </File> - <File - RelativePath=".\tools_contents.cc" - > - </File> - <File - RelativePath=".\tools_contents.h" - > - </File> - <File - RelativePath=".\tools_view.cc" - > - </File> - <File - RelativePath=".\tools_view.h" - > - </File> - <File - RelativePath=".\tools_window.cc" - > - </File> - <File - RelativePath=".\tools_window.h" - > - </File> </Files> <Globals> </Globals> diff --git a/chrome/browser/debugger/tools_contents.cc b/chrome/browser/debugger/tools_contents.cc deleted file mode 100644 index 19d9d59..0000000 --- a/chrome/browser/debugger/tools_contents.cc +++ /dev/null @@ -1,43 +0,0 @@ -// 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. - -#include "chrome/browser/debugger/tools_contents.h" - -#include "base/singleton.h" - -ToolsContents::ToolsContents(Profile* profile, SiteInstance* instance) - : WebContents(profile, - instance, - NULL, - MSG_ROUTING_NONE, - NULL) { - set_type(TAB_CONTENTS_TOOLS); -} - -void ToolsContents::RendererCreated(RenderViewHost* render_view_host) { - RenderViewID* render_view_id = - ToolsContents::GetInspectedViewInfoAccessor()->GetProperty( - property_bag()); - DCHECK(render_view_id); - if (!render_view_id) - return; - - render_view_host->SetupToolsClient(render_view_id->process_id, - render_view_id->view_id); - ToolsContents::GetInspectedViewInfoAccessor()->DeleteProperty(property_bag()); -} - -// static -bool ToolsContents::IsToolsUrl(const GURL& url) { - // TODO(yurys): implement - return (url.SchemeIs("chrome-ui") && url.host() == "inspector" && - url.path() == "/debugger-oop.html"); -} - -// static -PropertyAccessor<ToolsContents::RenderViewID>* - ToolsContents::GetInspectedViewInfoAccessor() { - return Singleton<PropertyAccessor<ToolsContents::RenderViewID> >().get(); -} - diff --git a/chrome/browser/debugger/tools_contents.h b/chrome/browser/debugger/tools_contents.h deleted file mode 100644 index ceee9fc..0000000 --- a/chrome/browser/debugger/tools_contents.h +++ /dev/null @@ -1,45 +0,0 @@ -// 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. - -#ifndef CHROME_BROWSER_DEBUGGER_TOOLS_CONTENTS_H_ -#define CHROME_BROWSER_DEBUGGER_TOOLS_CONTENTS_H_ - -#include <utility> - -#include "chrome/browser/tab_contents/web_contents.h" -#include "chrome/common/property_bag.h" - -// TODO(yurys): it may be made into DOMUI if the latter supports RendererCreated -// notification. -class ToolsContents : public WebContents { - public: - ToolsContents(Profile* profile, SiteInstance* instance); - - static bool IsToolsUrl(const GURL& url); - - struct RenderViewID { - RenderViewID(int pid, int vid) : process_id(pid), view_id(vid) {} - int process_id; - int view_id; - }; - // (render process id, render view id) - static PropertyAccessor<RenderViewID>* GetInspectedViewInfoAccessor(); - - protected: - // WebContents overrides: - // We override updating history with a no-op so these pages - // are not saved to history. - virtual void UpdateHistoryForNavigation( - const GURL& url, - const ViewHostMsg_FrameNavigate_Params& params) { } - - // Will notify just created renderer that it's going to host developer - // tools UI. - virtual void RendererCreated(RenderViewHost* render_view_host); - - DISALLOW_COPY_AND_ASSIGN(ToolsContents); -}; - -#endif // CHROME_BROWSER_DEBUGGER_TOOLS_CONTENTS_H_ - diff --git a/chrome/browser/debugger/tools_view.cc b/chrome/browser/debugger/tools_view.cc deleted file mode 100644 index c99720b..0000000 --- a/chrome/browser/debugger/tools_view.cc +++ /dev/null @@ -1,92 +0,0 @@ -// 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. - -#include "chrome/browser/debugger/tools_view.h" - -#include "chrome/browser/browser_list.h" -#include "chrome/browser/debugger/tools_contents.h" -#include "chrome/browser/profile.h" -#include "chrome/browser/tab_contents/web_contents.h" -#include "chrome/browser/views/tab_contents_container_view.h" -#include "chrome/common/property_bag.h" -#include "chrome/common/render_messages.h" - -ToolsView::ToolsView(int inspected_process_id, int inspected_view_id) - : inspected_process_id_(inspected_process_id), - inspected_view_id_(inspected_view_id), - web_contents_(NULL) { - web_container_ = new TabContentsContainerView(); - AddChildView(web_container_); -} - -ToolsView::~ToolsView() { -} - -void ToolsView::SendToolsClientMessage(int tools_message_type, - const std::wstring& body) { - if (!web_contents_) { - NOTREACHED(); - return; - } - int routing_id = web_contents_->render_view_host()->routing_id(); - web_contents_->render_view_host()->Send( - new ViewMsg_ToolsClientMsg(routing_id, tools_message_type, body)); -} - -std::string ToolsView::GetClassName() const { - return "ToolsView"; -} - -gfx::Size ToolsView::GetPreferredSize() { - return gfx::Size(700, 400); -} - -void ToolsView::Layout() { - web_container_->SetBounds(0, 0, width(), height()); -} - -void ToolsView::ViewHierarchyChanged(bool is_add, - views::View* parent, - views::View* child) { - if (is_add && child == this) { - DCHECK(GetWidget()); - Init(); - } -} - -void ToolsView::Init() { - // We can't create the WebContents until we've actually been put into a real - // view hierarchy somewhere. - Profile* profile = BrowserList::GetLastActive()->profile(); - - TabContents* tc = TabContents::CreateWithType(TAB_CONTENTS_TOOLS, profile, - NULL); - web_contents_ = tc->AsWebContents(); - web_contents_->SetupController(profile); - web_contents_->set_delegate(this); - web_container_->SetTabContents(web_contents_); - web_contents_->render_view_host()->AllowDOMUIBindings(); - - ToolsContents::GetInspectedViewInfoAccessor()->SetProperty( - web_contents_->property_bag(), - ToolsContents::RenderViewID(inspected_process_id_, inspected_view_id_)); - - GURL contents("chrome-ui://inspector/debugger-oop.html"); - // this will call CreateRenderView to create renderer process - web_contents_->controller()->LoadURL(contents, GURL(), - PageTransition::START_PAGE); -} - -void ToolsView::OnWindowClosing() { - web_container_->SetTabContents(NULL); // detach last (and only) tab - web_contents_->CloseContents(); // destroy the tab and navigation controller -} - -void ToolsView::OpenURLFromTab(TabContents* source, - const GURL& url, const GURL& referrer, - WindowOpenDisposition disposition, - PageTransition::Type transition) { - NOTREACHED(); -} - diff --git a/chrome/browser/debugger/tools_view.h b/chrome/browser/debugger/tools_view.h deleted file mode 100644 index 8835f27..0000000 --- a/chrome/browser/debugger/tools_view.h +++ /dev/null @@ -1,75 +0,0 @@ -// 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. - -#ifndef CHROME_BROWSER_DEBUGGER_TOOLS_VIEW_H_ -#define CHROME_BROWSER_DEBUGGER_TOOLS_VIEW_H_ - -#include <string> - -#include "base/basictypes.h" -#include "base/gfx/size.h" -#include "chrome/browser/tab_contents/tab_contents_delegate.h" -#include "chrome/views/view.h" - -class TabContentsContainerView; -class WebContents; - -class ToolsView : public views::View, - public TabContentsDelegate { - public: - explicit ToolsView(int inspected_process_id, int inspected_view_id); - virtual ~ToolsView(); - - void SendToolsClientMessage(int tools_message_type, const std::wstring& body); - - // Destroy content views when the window is closing. - void OnWindowClosing(); - - private: - // Overridden from TabContentsDelegate: - virtual void NavigationStateChanged(const TabContents* source, - unsigned changed_flags) {} - virtual void ReplaceContents(TabContents* source, - TabContents* new_contents) {} - virtual void AddNewContents(TabContents* source, - TabContents* new_contents, - WindowOpenDisposition disposition, - const gfx::Rect& initial_pos, - bool user_gesture) {} - virtual void ActivateContents(TabContents* contents) {} - virtual void LoadingStateChanged(TabContents* source) {} - virtual void CloseContents(TabContents* source) {} - virtual void MoveContents(TabContents* source, const gfx::Rect& pos) {} - virtual bool IsPopup(TabContents* source) { return false; } - virtual void ToolbarSizeChanged(TabContents* source, bool is_animating) {} - virtual void URLStarredChanged(TabContents* source, bool) {} - virtual void UpdateTargetURL(TabContents* source, const GURL& url) {} - virtual bool CanBlur() const { return false; } - // Opens a new URL inside the passed in TabContents, if source is 0 open - // in the current front-most tab. - virtual void OpenURLFromTab(TabContents* source, - const GURL& url, const GURL& referrer, - WindowOpenDisposition disposition, - PageTransition::Type transition); - - // Overridden from views::View: - virtual std::string GetClassName() const; - virtual gfx::Size GetPreferredSize(); - virtual void Layout(); - virtual void ViewHierarchyChanged(bool is_add, - views::View* parent, - views::View* child); - - void Init(); - - const int inspected_process_id_; - const int inspected_view_id_; - WebContents* web_contents_; - TabContentsContainerView* web_container_; - - DISALLOW_COPY_AND_ASSIGN(ToolsView); -}; - -#endif // CHROME_BROWSER_DEBUGGER_TOOLS_VIEW_H_ - diff --git a/chrome/browser/debugger/tools_window.cc b/chrome/browser/debugger/tools_window.cc deleted file mode 100644 index e87578e..0000000 --- a/chrome/browser/debugger/tools_window.cc +++ /dev/null @@ -1,54 +0,0 @@ -// 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. - -#include "chrome/browser/debugger/tools_window.h" - -#include "chrome/browser/debugger/tools_view.h" -#include "chrome/views/window.h" - -ToolsWindow::ToolsWindow() : window_(NULL), tools_view_(NULL) { -} - -ToolsWindow::~ToolsWindow() { -} - -void ToolsWindow::Show(int inspected_process_id, - int inspected_view_id) { - if (window_) { - window_->Show(); - return; - } - - tools_view_ = new ToolsView(inspected_process_id, inspected_view_id); - window_ = views::Window::CreateChromeWindow(NULL, gfx::Rect(), this); - window_->Show(); -} - -void ToolsWindow::SendToolsClientMessage(int tools_message_type, - const std::wstring& body) { - if (!tools_view_) - return; - tools_view_->SendToolsClientMessage(tools_message_type, body); -} - -std::wstring ToolsWindow::GetWindowTitle() const { - return L"Developer Tools"; -} - -void ToolsWindow::WindowClosing() { - if (tools_view_) { - tools_view_->OnWindowClosing(); - tools_view_ = NULL; - window_ = NULL; - } -} - -bool ToolsWindow::CanResize() const { - return true; -} - -views::View* ToolsWindow::GetContentsView() { - return tools_view_; -} - diff --git a/chrome/browser/debugger/tools_window.h b/chrome/browser/debugger/tools_window.h deleted file mode 100644 index 8b70710..0000000 --- a/chrome/browser/debugger/tools_window.h +++ /dev/null @@ -1,44 +0,0 @@ -// 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. - -#ifndef CHROME_BROWSER_DEBUGGER_TOOLS_WINDOW_H_ -#define CHROME_BROWSER_DEBUGGER_TOOLS_WINDOW_H_ - -#include "base/basictypes.h" - -#include "chrome/views/window_delegate.h" - -namespace views { -class Window; -} -class ToolsView; -class TabContents; - -class ToolsWindow : public views::WindowDelegate { - public: - ToolsWindow(); - virtual ~ToolsWindow(); - - // Show inspector window for the tab - void Show(int inspected_process_id, - int inspected_view_id); - - void SendToolsClientMessage(int tools_message_type, - const std::wstring& body); - - private: - // views::WindowDelegate methods: - virtual std::wstring GetWindowTitle() const; - virtual void WindowClosing(); - virtual bool CanResize() const; - virtual views::View* GetContentsView(); - - views::Window* window_; - ToolsView* tools_view_; - - DISALLOW_COPY_AND_ASSIGN(ToolsWindow); -}; - -#endif // CHROME_BROWSER_DEBUGGER_TOOLS_WINDOW_H_ - diff --git a/chrome/browser/renderer_host/render_view_host.cc b/chrome/browser/renderer_host/render_view_host.cc index 62a305f..ae84b8f 100644 --- a/chrome/browser/renderer_host/render_view_host.cc +++ b/chrome/browser/renderer_host/render_view_host.cc @@ -96,9 +96,7 @@ RenderViewHost::RenderViewHost(SiteInstance* instance, run_modal_reply_msg_(NULL), has_unload_listener_(false), is_waiting_for_unload_ack_(false), - are_javascript_messages_suppressed_(false), - inspected_process_id_(0), - inspected_view_id_(0) { + are_javascript_messages_suppressed_(false) { DCHECK(instance_); DCHECK(delegate_); if (modal_dialog_event == NULL) @@ -584,16 +582,6 @@ void RenderViewHost::AllowDOMUIBindings() { process()->host_id()); } -void RenderViewHost::SetupToolsClient(int inspected_process_id, - int inspected_view_id) { - RendererSecurityPolicy::GetInstance()->GrantDOMUIBindings( - process()->host_id()); - Send(new ViewMsg_SetUpToolsClient(routing_id())); - - inspected_process_id_ = inspected_process_id; - inspected_view_id_ = inspected_view_id; -} - void RenderViewHost::AllowExternalHostBindings() { enable_external_host_bindings_ = true; } @@ -744,8 +732,6 @@ void RenderViewHost::OnMessageReceived(const IPC::Message& msg) { IPC_MESSAGE_HANDLER(ViewHostMsg_AddMessageToConsole, OnAddMessageToConsole) IPC_MESSAGE_HANDLER(ViewHostMsg_DebuggerOutput, OnDebuggerOutput); IPC_MESSAGE_HANDLER(ViewHostMsg_DidDebugAttach, DidDebugAttach); - IPC_MESSAGE_HANDLER(ViewHostMsg_ToolsAgentMsg, OnToolsAgentMsg); - IPC_MESSAGE_HANDLER(ViewHostMsg_ToolsClientMsg, OnToolsClientMsg); IPC_MESSAGE_HANDLER(ViewHostMsg_UserMetricsRecordAction, OnUserMetricsRecordAction) IPC_MESSAGE_HANDLER(ViewHostMsg_MissingPluginStatus, OnMissingPluginStatus); @@ -1185,23 +1171,6 @@ void RenderViewHost::DidDebugAttach() { } } -void RenderViewHost::OnToolsAgentMsg(int tools_message_type, - const std::wstring& body) { - RenderViewHost* host = RenderViewHost::FromID(inspected_process_id_, - inspected_view_id_); - if (host) { - host->Send(new ViewMsg_ToolsAgentMsg( - inspected_view_id_, tools_message_type, body)); - } -} - -void RenderViewHost::OnToolsClientMsg(int tools_message_type, - const std::wstring& body) { - RenderViewHostDelegate::View* view = delegate_->GetViewDelegate(); - if (view) - view->ForwardMessageToToolsClient(tools_message_type, body); -} - void RenderViewHost::OnUserMetricsRecordAction(const std::wstring& action) { UserMetrics::RecordComputedAction(action.c_str(), process()->profile()); } diff --git a/chrome/browser/renderer_host/render_view_host.h b/chrome/browser/renderer_host/render_view_host.h index c6bab37..15d0c6f 100644 --- a/chrome/browser/renderer_host/render_view_host.h +++ b/chrome/browser/renderer_host/render_view_host.h @@ -26,7 +26,6 @@ class NavigationEntry; class RenderViewHostDelegate; class SiteInstance; class SkBitmap; -class ToolsWindow; class ViewMsg_Navigate; struct ContextMenuParams; struct ViewHostMsg_DidPrintPage_Params; @@ -321,11 +320,6 @@ class RenderViewHost : public RenderWidgetHost { // Must be called before CreateRenderView(). void AllowDOMUIBindings(); - // Tell the render view to connect as a tools client to the specified - // renderer. Must be called when RenderView is created but before any - // navigation. - void SetupToolsClient(int inspected_process_id, int inspected_view_id); - // Sets a property with the given name and value on the DOM UI binding object. // Must call AllowDOMUIBindings() on this renderer first. void SetDOMUIProperty(const std::string& name, const std::string& value); @@ -512,8 +506,6 @@ class RenderViewHost : public RenderWidgetHost { const std::wstring& source_id); void OnDebuggerOutput(const std::wstring& output); void DidDebugAttach(); - void OnToolsAgentMsg(int tools_message_type, const std::wstring& body); - void OnToolsClientMsg(int tools_message_type, const std::wstring& body); void OnUserMetricsRecordAction(const std::wstring& action); void OnMissingPluginStatus(int status); void OnMessageReceived(IPC::Message* msg) { } @@ -569,7 +561,7 @@ class RenderViewHost : public RenderWidgetHost { // information. bool waiting_for_drag_context_response_; - // If the debugger attached to us or not. + // is the debugger attached to us or not bool debugger_attached_; // True if we've been told to set up the the Javascript bindings for @@ -618,10 +610,6 @@ class RenderViewHost : public RenderWidgetHost { bool are_javascript_messages_suppressed_; - int inspected_process_id_; - - int inspected_view_id_; - DISALLOW_EVIL_CONSTRUCTORS(RenderViewHost); }; diff --git a/chrome/browser/renderer_host/render_view_host_delegate.h b/chrome/browser/renderer_host/render_view_host_delegate.h index 5623b57..7cfe6f9 100644 --- a/chrome/browser/renderer_host/render_view_host_delegate.h +++ b/chrome/browser/renderer_host/render_view_host_delegate.h @@ -119,11 +119,6 @@ class RenderViewHostDelegate { const gfx::Rect& selection_rect, int active_match_ordinal, bool final_update) = 0; - - // Forwards message to ToolsClient in developer tools window open for this - // page. - virtual void ForwardMessageToToolsClient(int tools_message_type, - const std::wstring& body) = 0; }; // Interface for saving web pages. diff --git a/chrome/browser/tab_contents/tab_contents_factory.cc b/chrome/browser/tab_contents/tab_contents_factory.cc index 50031b1..e6aa1a2 100644 --- a/chrome/browser/tab_contents/tab_contents_factory.cc +++ b/chrome/browser/tab_contents/tab_contents_factory.cc @@ -10,7 +10,6 @@ #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/tab_contents_factory.h" #include "chrome/browser/tab_contents/view_source_contents.h" #include "chrome/browser/tab_contents/web_contents.h" @@ -71,9 +70,6 @@ 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; @@ -124,9 +120,6 @@ 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 6a8afd9..87cd6452 100644 --- a/chrome/browser/tab_contents/tab_contents_type.h +++ b/chrome/browser/tab_contents/tab_contents_type.h @@ -21,7 +21,6 @@ enum TabContentsType { TAB_CONTENTS_ABOUT_UI, TAB_CONTENTS_DEBUGGER, TAB_CONTENTS_DOM_UI, - TAB_CONTENTS_TOOLS, TAB_CONTENTS_NUM_TYPES }; diff --git a/chrome/browser/tab_contents/web_contents_view.h b/chrome/browser/tab_contents/web_contents_view.h index f286776..4bf8dca 100644 --- a/chrome/browser/tab_contents/web_contents_view.h +++ b/chrome/browser/tab_contents/web_contents_view.h @@ -108,14 +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 ToolsClient in developer tools window open for this - // page. - virtual void ForwardMessageToToolsClient(int tools_message_type, - const std::wstring& body) = 0; - // Find in page -------------------------------------------------------------- // Opens the find in page window if it isn't already open. It will advance to diff --git a/chrome/browser/tab_contents/web_contents_view_gtk.cc b/chrome/browser/tab_contents/web_contents_view_gtk.cc index 41d5033..22b450f 100644 --- a/chrome/browser/tab_contents/web_contents_view_gtk.cc +++ b/chrome/browser/tab_contents/web_contents_view_gtk.cc @@ -77,15 +77,6 @@ void WebContentsViewGtk::SizeContents(const gfx::Size& size) { NOTIMPLEMENTED(); } -void WebContentsViewGtk::OpenDeveloperTools() { - NOTIMPLEMENTED(); -} - -void WebContentsViewGtk::ForwardMessageToToolsClient(int tools_message_type, - const std::wstring& body) { - 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 2bd347e..a4273f5 100644 --- a/chrome/browser/tab_contents/web_contents_view_gtk.h +++ b/chrome/browser/tab_contents/web_contents_view_gtk.h @@ -30,9 +30,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 ForwardMessageToToolsClient(int tools_message_type, - const std::wstring& body); 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 26d59f3..d576605 100644 --- a/chrome/browser/tab_contents/web_contents_view_mac.h +++ b/chrome/browser/tab_contents/web_contents_view_mac.h @@ -46,9 +46,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 ForwardMessageToToolsClient(int tools_message_type, - const std::wstring& body); 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 5275993..ba80b54 100644 --- a/chrome/browser/tab_contents/web_contents_view_mac.mm +++ b/chrome/browser/tab_contents/web_contents_view_mac.mm @@ -99,15 +99,6 @@ void WebContentsViewMac::SizeContents(const gfx::Size& size) { NOTIMPLEMENTED(); // Leaving the hack unimplemented. } -void WebContentsViewMac::OpenDeveloperTools() { - NOTIMPLEMENTED(); -} - -void WebContentsViewMac::ForwardMessageToToolsClient(int tools_message_type, - const std::wstring& body) { - 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 be41930..9728ec8 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/tools_window.h" #include "chrome/browser/download/download_request_manager.h" #include "chrome/browser/renderer_host/render_process_host.h" #include "chrome/browser/renderer_host/render_view_host.h" @@ -217,26 +216,6 @@ void WebContentsViewWin::SizeContents(const gfx::Size& size) { WasSized(size); } -void WebContentsViewWin::OpenDeveloperTools() { - if (!tools_window_.get()) - tools_window_.reset(new ToolsWindow); - - RenderViewHost* host = web_contents_->render_view_host(); - if (!host) - return; - - tools_window_->Show(host->process()->host_id(), host->routing_id()); -} - -void WebContentsViewWin::ForwardMessageToToolsClient(int tools_message_type, - const std::wstring& body) { - if (!tools_window_.get()) { - NOTREACHED() << "Developer tools window is not open."; - return; - } - tools_window_->SendToolsClientMessage(tools_message_type, body); -} - void WebContentsViewWin::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.h b/chrome/browser/tab_contents/web_contents_view_win.h index 2c80eaf..a8649d7 100644 --- a/chrome/browser/tab_contents/web_contents_view_win.h +++ b/chrome/browser/tab_contents/web_contents_view_win.h @@ -12,7 +12,6 @@ class FindBarWin; class SadTabView; -class ToolsWindow; struct WebDropData; class WebDropTarget; @@ -41,9 +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 ForwardMessageToToolsClient(int tools_message_type, - const std::wstring& body); virtual void FindInPage(const Browser& browser, bool find_next, bool forward_direction); virtual void HideFindBar(bool end_session); @@ -112,9 +108,6 @@ class WebContentsViewWin : public WebContentsView, WebContents* web_contents_; - // Allows to show exactly one developer tools window for this page. - scoped_ptr<ToolsWindow> tools_window_; - // For find in page. This may be NULL if there is no find bar, and if it is // non-NULL, it may or may not be visible. scoped_ptr<FindBarWin> find_bar_; |