Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1296)

Unified Diff: content/browser/debugger/devtools_handler.cc

Issue 7322004: DevTools: devtools manager should know nothing about DevToolsWindow (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments addressed Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/debugger/devtools_client_host.cc ('k') | content/browser/debugger/devtools_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/debugger/devtools_handler.cc
diff --git a/content/browser/debugger/devtools_handler.cc b/content/browser/debugger/devtools_handler.cc
index 59eef70da3c1175b63d2a30c639c79af00b364b7..396ef1abc5233f43b97c5ef4dbbf48798da32356 100644
--- a/content/browser/debugger/devtools_handler.cc
+++ b/content/browser/debugger/devtools_handler.cc
@@ -6,6 +6,7 @@
#include "content/browser/debugger/devtools_file_util.h"
#include "content/browser/debugger/devtools_manager.h"
+#include "content/browser/debugger/devtools_window.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/common/devtools_messages.h"
@@ -37,8 +38,11 @@ bool DevToolsHandler::OnMessageReceived(const IPC::Message& message) {
}
void DevToolsHandler::OnForwardToAgent(const IPC::Message& message) {
- DevToolsManager::GetInstance()->ForwardToDevToolsAgent(
- render_view_host(), message);
+ DevToolsWindow* window = DevToolsWindow::FindDevToolsWindow(
+ render_view_host());
+ if (!window)
+ return;
+ DevToolsManager::GetInstance()->ForwardToDevToolsAgent(window, message);
}
void DevToolsHandler::OnForwardToClient(const IPC::Message& message) {
@@ -47,19 +51,31 @@ void DevToolsHandler::OnForwardToClient(const IPC::Message& message) {
}
void DevToolsHandler::OnActivateWindow() {
- DevToolsManager::GetInstance()->ActivateWindow(render_view_host());
+ DevToolsWindow* window = DevToolsWindow::FindDevToolsWindow(
+ render_view_host());
+ if (window)
+ window->Activate();
}
void DevToolsHandler::OnCloseWindow() {
- DevToolsManager::GetInstance()->CloseWindow(render_view_host());
+ DevToolsWindow* window = DevToolsWindow::FindDevToolsWindow(
+ render_view_host());
+ if (window)
+ window->Close();
}
void DevToolsHandler::OnRequestDockWindow() {
- DevToolsManager::GetInstance()->RequestDockWindow(render_view_host());
+ DevToolsWindow* window = DevToolsWindow::FindDevToolsWindow(
+ render_view_host());
+ if (window)
+ window->SetDocked(true);
}
void DevToolsHandler::OnRequestUndockWindow() {
- DevToolsManager::GetInstance()->RequestUndockWindow(render_view_host());
+ DevToolsWindow* window = DevToolsWindow::FindDevToolsWindow(
+ render_view_host());
+ if (window)
+ window->SetDocked(false);
}
void DevToolsHandler::OnSaveAs(const std::string& file_name,
« no previous file with comments | « content/browser/debugger/devtools_client_host.cc ('k') | content/browser/debugger/devtools_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698