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