OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 ReopenWindow(client_rvh, false); | 135 ReopenWindow(client_rvh, false); |
136 } | 136 } |
137 | 137 |
138 void DevToolsManager::OpenDevToolsWindow(RenderViewHost* inspected_rvh) { | 138 void DevToolsManager::OpenDevToolsWindow(RenderViewHost* inspected_rvh) { |
139 ToggleDevToolsWindow( | 139 ToggleDevToolsWindow( |
140 inspected_rvh, | 140 inspected_rvh, |
141 true, | 141 true, |
142 DEVTOOLS_TOGGLE_ACTION_NONE); | 142 DEVTOOLS_TOGGLE_ACTION_NONE); |
143 } | 143 } |
144 | 144 |
145 void DevToolsManager::ToggleDevToolsWindow( | |
146 RenderViewHost* inspected_rvh, | |
147 DevToolsToggleAction action) { | |
148 ToggleDevToolsWindow(inspected_rvh, false, action); | |
149 } | |
150 | |
151 void DevToolsManager::RuntimePropertyChanged(RenderViewHost* inspected_rvh, | 145 void DevToolsManager::RuntimePropertyChanged(RenderViewHost* inspected_rvh, |
152 const std::string& name, | 146 const std::string& name, |
153 const std::string& value) { | 147 const std::string& value) { |
154 RuntimePropertiesMap::iterator it = | 148 RuntimePropertiesMap::iterator it = |
155 runtime_properties_map_.find(inspected_rvh); | 149 runtime_properties_map_.find(inspected_rvh); |
156 if (it == runtime_properties_map_.end()) { | 150 if (it == runtime_properties_map_.end()) { |
157 std::pair<RenderViewHost*, DevToolsRuntimeProperties> value( | 151 std::pair<RenderViewHost*, DevToolsRuntimeProperties> value( |
158 inspected_rvh, | 152 inspected_rvh, |
159 DevToolsRuntimeProperties()); | 153 DevToolsRuntimeProperties()); |
160 it = runtime_properties_map_.insert(value).first; | 154 it = runtime_properties_map_.insert(value).first; |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
455 for (InspectedRvhToClientHostMap::iterator it = | 449 for (InspectedRvhToClientHostMap::iterator it = |
456 inspected_rvh_to_client_host_.begin(); | 450 inspected_rvh_to_client_host_.begin(); |
457 it != inspected_rvh_to_client_host_.end(); ++it) { | 451 it != inspected_rvh_to_client_host_.end(); ++it) { |
458 rhvs.push_back(it->first); | 452 rhvs.push_back(it->first); |
459 } | 453 } |
460 for (std::vector<RenderViewHost*>::iterator it = rhvs.begin(); | 454 for (std::vector<RenderViewHost*>::iterator it = rhvs.begin(); |
461 it != rhvs.end(); ++it) { | 455 it != rhvs.end(); ++it) { |
462 UnregisterDevToolsClientHostFor(*it); | 456 UnregisterDevToolsClientHostFor(*it); |
463 } | 457 } |
464 } | 458 } |
OLD | NEW |