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" |
11 #include "chrome/browser/browser_process.h" | 11 #include "chrome/browser/browser_process.h" |
12 #include "chrome/browser/browsing_instance.h" | 12 #include "chrome/browser/browsing_instance.h" |
13 #include "chrome/browser/child_process_security_policy.h" | 13 #include "chrome/browser/child_process_security_policy.h" |
14 #include "chrome/browser/debugger/devtools_client_host.h" | 14 #include "chrome/browser/debugger/devtools_client_host.h" |
15 #include "chrome/browser/debugger/devtools_netlog_observer.h" | 15 #include "chrome/browser/debugger/devtools_netlog_observer.h" |
16 #include "chrome/browser/debugger/devtools_window.h" | 16 #include "chrome/browser/debugger/devtools_window.h" |
17 #include "chrome/browser/io_thread.h" | 17 #include "chrome/browser/io_thread.h" |
18 #include "chrome/browser/prefs/pref_service.h" | 18 #include "chrome/browser/prefs/pref_service.h" |
19 #include "chrome/browser/profiles/profile.h" | 19 #include "chrome/browser/profiles/profile.h" |
20 #include "chrome/browser/renderer_host/render_view_host.h" | 20 #include "chrome/browser/renderer_host/render_view_host.h" |
21 #include "chrome/browser/renderer_host/site_instance.h" | 21 #include "chrome/browser/renderer_host/site_instance.h" |
| 22 #include "chrome/common/notification_service.h" |
22 #include "chrome/common/pref_names.h" | 23 #include "chrome/common/pref_names.h" |
23 #include "googleurl/src/gurl.h" | 24 #include "googleurl/src/gurl.h" |
24 | 25 |
25 // static | 26 // static |
26 DevToolsManager* DevToolsManager::GetInstance() { | 27 DevToolsManager* DevToolsManager::GetInstance() { |
27 // http://crbug.com/47806 this method may be called when BrowserProcess | 28 // http://crbug.com/47806 this method may be called when BrowserProcess |
28 // has already been destroyed. | 29 // has already been destroyed. |
29 if (!g_browser_process) | 30 if (!g_browser_process) |
30 return NULL; | 31 return NULL; |
31 return g_browser_process->devtools_manager(); | 32 return g_browser_process->devtools_manager(); |
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
420 for (InspectedRvhToClientHostMap::iterator it = | 421 for (InspectedRvhToClientHostMap::iterator it = |
421 inspected_rvh_to_client_host_.begin(); | 422 inspected_rvh_to_client_host_.begin(); |
422 it != inspected_rvh_to_client_host_.end(); ++it) { | 423 it != inspected_rvh_to_client_host_.end(); ++it) { |
423 rhvs.push_back(it->first); | 424 rhvs.push_back(it->first); |
424 } | 425 } |
425 for (std::vector<RenderViewHost*>::iterator it = rhvs.begin(); | 426 for (std::vector<RenderViewHost*>::iterator it = rhvs.begin(); |
426 it != rhvs.end(); ++it) { | 427 it != rhvs.end(); ++it) { |
427 UnregisterDevToolsClientHostFor(*it); | 428 UnregisterDevToolsClientHostFor(*it); |
428 } | 429 } |
429 } | 430 } |
OLD | NEW |