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/inspectable_tab_proxy.h" | 5 #include "chrome/browser/debugger/inspectable_tab_proxy.h" |
6 | 6 |
7 #include "base/string_number_conversions.h" | 7 #include "base/string_number_conversions.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "chrome/browser/debugger/debugger_remote_service.h" | 9 #include "chrome/browser/debugger/debugger_remote_service.h" |
10 #include "chrome/browser/sessions/restore_tab_helper.h" | 10 #include "chrome/browser/sessions/restore_tab_helper.h" |
11 #include "chrome/browser/sessions/session_id.h" | 11 #include "chrome/browser/sessions/session_id.h" |
12 #include "chrome/browser/tabs/tab_strip_model.h" | 12 #include "chrome/browser/tabs/tab_strip_model.h" |
13 #include "chrome/browser/ui/browser_list.h" | 13 #include "chrome/browser/ui/browser_list.h" |
14 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 14 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
15 #include "content/browser/debugger/devtools_client_host.h" | |
16 #include "content/browser/tab_contents/tab_contents.h" | 15 #include "content/browser/tab_contents/tab_contents.h" |
17 #include "content/common/devtools_messages.h" | 16 #include "content/common/devtools_messages.h" |
| 17 #include "content/public/browser/devtools/devtools_client_host.h" |
| 18 |
| 19 using content::DevToolsClientHost; |
18 | 20 |
19 DevToolsClientHostImpl::DevToolsClientHostImpl( | 21 DevToolsClientHostImpl::DevToolsClientHostImpl( |
20 int32 id, | 22 int32 id, |
21 DebuggerRemoteService* service, | 23 DebuggerRemoteService* service, |
22 InspectableTabProxy::IdToClientHostMap* map) | 24 InspectableTabProxy::IdToClientHostMap* map) |
23 : id_(id), | 25 : id_(id), |
24 service_(service), | 26 service_(service), |
25 map_(map) {} | 27 map_(map) {} |
26 | 28 |
27 DevToolsClientHostImpl::~DevToolsClientHostImpl() { | 29 DevToolsClientHostImpl::~DevToolsClientHostImpl() { |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 return client_host; | 110 return client_host; |
109 } | 111 } |
110 | 112 |
111 void InspectableTabProxy::OnRemoteDebuggerDetached() { | 113 void InspectableTabProxy::OnRemoteDebuggerDetached() { |
112 while (!id_to_client_host_map_.empty()) { | 114 while (!id_to_client_host_map_.empty()) { |
113 IdToClientHostMap::iterator it = id_to_client_host_map_.begin(); | 115 IdToClientHostMap::iterator it = id_to_client_host_map_.begin(); |
114 it->second->debugger_remote_service()->DetachFromTab( | 116 it->second->debugger_remote_service()->DetachFromTab( |
115 base::IntToString(it->first), NULL); | 117 base::IntToString(it->first), NULL); |
116 } | 118 } |
117 } | 119 } |
OLD | NEW |