| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/debugger/devtools_manager.h" | 5 #include "chrome/browser/debugger/devtools_manager.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 DCHECK(window); | 108 DCHECK(window); |
| 109 window->Activate(); | 109 window->Activate(); |
| 110 } | 110 } |
| 111 | 111 |
| 112 void DevToolsManager::CloseWindow(RenderViewHost* client_rvh) { | 112 void DevToolsManager::CloseWindow(RenderViewHost* client_rvh) { |
| 113 DevToolsClientHost* client_host = FindOnwerDevToolsClientHost(client_rvh); | 113 DevToolsClientHost* client_host = FindOnwerDevToolsClientHost(client_rvh); |
| 114 if (client_host) | 114 if (client_host) |
| 115 CloseWindow(client_host); | 115 CloseWindow(client_host); |
| 116 } | 116 } |
| 117 | 117 |
| 118 void DevToolsManager::DockWindow(RenderViewHost* client_rvh) { | 118 void DevToolsManager::RequestDockWindow(RenderViewHost* client_rvh) { |
| 119 ReopenWindow(client_rvh, true); | 119 ReopenWindow(client_rvh, true); |
| 120 } | 120 } |
| 121 | 121 |
| 122 void DevToolsManager::UndockWindow(RenderViewHost* client_rvh) { | 122 void DevToolsManager::RequestUndockWindow(RenderViewHost* client_rvh) { |
| 123 ReopenWindow(client_rvh, false); | 123 ReopenWindow(client_rvh, false); |
| 124 } | 124 } |
| 125 | 125 |
| 126 void DevToolsManager::OpenDevToolsWindow(RenderViewHost* inspected_rvh) { | 126 void DevToolsManager::OpenDevToolsWindow(RenderViewHost* inspected_rvh) { |
| 127 ToggleDevToolsWindow(inspected_rvh, true, false); | 127 ToggleDevToolsWindow(inspected_rvh, true, false); |
| 128 } | 128 } |
| 129 | 129 |
| 130 void DevToolsManager::ToggleDevToolsWindow(RenderViewHost* inspected_rvh, | 130 void DevToolsManager::ToggleDevToolsWindow(RenderViewHost* inspected_rvh, |
| 131 bool open_console) { | 131 bool open_console) { |
| 132 ToggleDevToolsWindow(inspected_rvh, false, open_console); | 132 ToggleDevToolsWindow(inspected_rvh, false, open_console); |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 DevToolsClientHost* client_host) { | 392 DevToolsClientHost* client_host) { |
| 393 DCHECK(inspected_rvh_to_client_host_.find(inspected_rvh)->second == | 393 DCHECK(inspected_rvh_to_client_host_.find(inspected_rvh)->second == |
| 394 client_host); | 394 client_host); |
| 395 DCHECK(client_host_to_inspected_rvh_.find(client_host)->second == | 395 DCHECK(client_host_to_inspected_rvh_.find(client_host)->second == |
| 396 inspected_rvh); | 396 inspected_rvh); |
| 397 | 397 |
| 398 inspected_rvh_to_client_host_.erase(inspected_rvh); | 398 inspected_rvh_to_client_host_.erase(inspected_rvh); |
| 399 client_host_to_inspected_rvh_.erase(client_host); | 399 client_host_to_inspected_rvh_.erase(client_host); |
| 400 runtime_features_map_.erase(inspected_rvh); | 400 runtime_features_map_.erase(inspected_rvh); |
| 401 } | 401 } |
| OLD | NEW |