diff options
author | mnissler@chromium.org <mnissler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-19 10:51:29 +0000 |
---|---|---|
committer | mnissler@chromium.org <mnissler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-19 10:51:29 +0000 |
commit | 53ae3ced739a432c20b70c7bee1ae5527ba786ce (patch) | |
tree | e6ee3b1b638d86a26ac466c0fbe17f67415178b2 /content/browser/devtools/devtools_frontend_host.cc | |
parent | 92b43f98d619fcc8d03e2bb90217f44a0b4cd76e (diff) | |
download | chromium_src-53ae3ced739a432c20b70c7bee1ae5527ba786ce.zip chromium_src-53ae3ced739a432c20b70c7bee1ae5527ba786ce.tar.gz chromium_src-53ae3ced739a432c20b70c7bee1ae5527ba786ce.tar.bz2 |
Revert r173891 - "DevTools: rename debugger/ to devtools/, move DevTools files into content/renderer/devtools."
DevToolsManagerTest.ForwardMessageToClient:
http://build.chromium.org/p/chromium.linux/buildstatus?builder=Linux%20Tests%20x64&number=29428
http://build.chromium.org/p/chromium.linux/buildstatus?builder=Linux%20Aura&number=304
http://build.chromium.org/p/chromium.linux/buildstatus?builder=Linux%20Clang%20%28dbg%29&number=37637
http://build.chromium.org/p/chromium.chromiumos/buildstatus?builder=Linux%20ChromiumOS%20Tests%20%281%29&number=17804
http://build.chromium.org/p/chromium.memory/buildstatus?builder=Linux%20Chromium%20OS%20ASAN%20Tests%20%283%29&number=1107
BUG=None
TEST=Tree becomes greener.
TBR=pfeldman@chromium.org
Review URL: https://codereview.chromium.org/11645015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173893 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/devtools/devtools_frontend_host.cc')
-rw-r--r-- | content/browser/devtools/devtools_frontend_host.cc | 125 |
1 files changed, 0 insertions, 125 deletions
diff --git a/content/browser/devtools/devtools_frontend_host.cc b/content/browser/devtools/devtools_frontend_host.cc deleted file mode 100644 index fe7e82d..0000000 --- a/content/browser/devtools/devtools_frontend_host.cc +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) 2012 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 "content/browser/devtools/devtools_frontend_host.h" - -#include "content/browser/devtools/devtools_manager_impl.h" -#include "content/browser/renderer_host/render_view_host_impl.h" -#include "content/browser/web_contents/web_contents_impl.h" -#include "content/common/devtools_messages.h" -#include "content/public/browser/devtools_client_host.h" -#include "content/public/browser/devtools_frontend_host_delegate.h" - -namespace content { - -// static -DevToolsClientHost* DevToolsClientHost::CreateDevToolsFrontendHost( - WebContents* client_web_contents, - DevToolsFrontendHostDelegate* delegate) { - return new DevToolsFrontendHost( - static_cast<WebContentsImpl*>(client_web_contents), delegate); -} - -// static -void DevToolsClientHost::SetupDevToolsFrontendClient( - RenderViewHost* frontend_rvh) { - frontend_rvh->Send(new DevToolsMsg_SetupDevToolsClient( - frontend_rvh->GetRoutingID())); -} - -DevToolsFrontendHost::DevToolsFrontendHost( - WebContentsImpl* web_contents, - DevToolsFrontendHostDelegate* delegate) - : RenderViewHostObserver(web_contents->GetRenderViewHost()), - web_contents_(web_contents), - delegate_(delegate) { -} - -DevToolsFrontendHost::~DevToolsFrontendHost() { - DevToolsManager::GetInstance()->ClientHostClosing(this); -} - -void DevToolsFrontendHost::DispatchOnInspectorFrontend( - const std::string& message) { - RenderViewHostImpl* target_host = - static_cast<RenderViewHostImpl*>(web_contents_->GetRenderViewHost()); - target_host->Send(new DevToolsClientMsg_DispatchOnInspectorFrontend( - target_host->GetRoutingID(), - message)); -} - -void DevToolsFrontendHost::InspectedContentsClosing() { - delegate_->InspectedContentsClosing(); -} - -void DevToolsFrontendHost::FrameNavigating(const std::string& url) { - delegate_->FrameNavigating(url); -} - -void DevToolsFrontendHost::ContentsReplaced(WebContents* new_contents) { - delegate_->ContentsReplaced(new_contents); -} - -void DevToolsFrontendHost::ReplacedWithAnotherClient() { -} - -bool DevToolsFrontendHost::OnMessageReceived( - const IPC::Message& message) { - bool handled = true; - IPC_BEGIN_MESSAGE_MAP(DevToolsFrontendHost, message) - IPC_MESSAGE_HANDLER(DevToolsAgentMsg_DispatchOnInspectorBackend, - OnDispatchOnInspectorBackend) - IPC_MESSAGE_HANDLER(DevToolsHostMsg_ActivateWindow, OnActivateWindow) - IPC_MESSAGE_HANDLER(DevToolsHostMsg_CloseWindow, OnCloseWindow) - IPC_MESSAGE_HANDLER(DevToolsHostMsg_MoveWindow, OnMoveWindow) - IPC_MESSAGE_HANDLER(DevToolsHostMsg_RequestSetDockSide, - OnRequestSetDockSide) - IPC_MESSAGE_HANDLER(DevToolsHostMsg_OpenInNewTab, OnOpenInNewTab) - IPC_MESSAGE_HANDLER(DevToolsHostMsg_Save, OnSave) - IPC_MESSAGE_HANDLER(DevToolsHostMsg_Append, OnAppend) - IPC_MESSAGE_UNHANDLED(handled = false) - IPC_END_MESSAGE_MAP() - return handled; -} - -void DevToolsFrontendHost::OnDispatchOnInspectorBackend( - const std::string& message) { - DevToolsManagerImpl::GetInstance()->DispatchOnInspectorBackend(this, message); -// delegate_->DispatchOnInspectorBackend(message); -} - -void DevToolsFrontendHost::OnActivateWindow() { - delegate_->ActivateWindow(); -} - -void DevToolsFrontendHost::OnCloseWindow() { - delegate_->CloseWindow(); -} - -void DevToolsFrontendHost::OnMoveWindow(int x, int y) { - delegate_->MoveWindow(x, y); -} - -void DevToolsFrontendHost::OnOpenInNewTab(const std::string& url) { - delegate_->OpenInNewTab(url); -} - -void DevToolsFrontendHost::OnSave( - const std::string& url, - const std::string& content, - bool save_as) { - delegate_->SaveToFile(url, content, save_as); -} - -void DevToolsFrontendHost::OnAppend( - const std::string& url, - const std::string& content) { - delegate_->AppendToFile(url, content); -} - -void DevToolsFrontendHost::OnRequestSetDockSide(const std::string& side) { - delegate_->SetDockSide(side); -} - -} // namespace content |