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/extensions/extension_devtools_manager.h" | 5 #include "chrome/browser/extensions/extension_devtools_manager.h" |
6 | 6 |
7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "base/task.h" | |
10 #include "chrome/browser/extensions/extension_devtools_bridge.h" | 9 #include "chrome/browser/extensions/extension_devtools_bridge.h" |
11 #include "chrome/browser/extensions/extension_devtools_events.h" | 10 #include "chrome/browser/extensions/extension_devtools_events.h" |
12 | 11 |
13 ExtensionDevToolsManager::ExtensionDevToolsManager(Profile* profile) | 12 ExtensionDevToolsManager::ExtensionDevToolsManager(Profile* profile) |
14 : profile_(profile), | 13 : profile_(profile), |
15 ui_loop_(NULL) { | 14 ui_loop_(NULL) { |
16 DCHECK_EQ(MessageLoop::current()->type(), MessageLoop::TYPE_UI); | 15 DCHECK_EQ(MessageLoop::current()->type(), MessageLoop::TYPE_UI); |
17 ui_loop_ = MessageLoop::current(); | 16 ui_loop_ = MessageLoop::current(); |
18 } | 17 } |
19 | 18 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 } | 61 } |
63 | 62 |
64 void ExtensionDevToolsManager::BridgeClosingForTab(int tab_id) { | 63 void ExtensionDevToolsManager::BridgeClosingForTab(int tab_id) { |
65 if (tab_id_to_bridge_.count(tab_id) != 0) { | 64 if (tab_id_to_bridge_.count(tab_id) != 0) { |
66 linked_ptr<ExtensionDevToolsBridge> bridge(tab_id_to_bridge_[tab_id]); | 65 linked_ptr<ExtensionDevToolsBridge> bridge(tab_id_to_bridge_[tab_id]); |
67 bridge->UnregisterAsDevToolsClientHost(); | 66 bridge->UnregisterAsDevToolsClientHost(); |
68 tab_id_to_bridge_.erase(tab_id); | 67 tab_id_to_bridge_.erase(tab_id); |
69 } | 68 } |
70 tab_id_to_render_process_ids_.erase(tab_id); | 69 tab_id_to_render_process_ids_.erase(tab_id); |
71 } | 70 } |
72 | |
OLD | NEW |