OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef CHROME_BROWSER_DEVTOOLS_DEVICE_DEVTOOLS_ANDROID_BRIDGE_H_ | 5 #ifndef CHROME_BROWSER_DEVTOOLS_DEVICE_DEVTOOLS_ANDROID_BRIDGE_H_ |
6 #define CHROME_BROWSER_DEVTOOLS_DEVICE_DEVTOOLS_ANDROID_BRIDGE_H_ | 6 #define CHROME_BROWSER_DEVTOOLS_DEVICE_DEVTOOLS_ANDROID_BRIDGE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/prefs/pref_change_registrar.h" | 14 #include "base/prefs/pref_change_registrar.h" |
15 #include "chrome/browser/devtools/device/android_device_manager.h" | 15 #include "chrome/browser/devtools/device/android_device_manager.h" |
16 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" | 16 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" |
17 #include "components/keyed_service/core/keyed_service.h" | 17 #include "components/keyed_service/core/keyed_service.h" |
| 18 #include "content/public/browser/devtools_agent_host.h" |
18 #include "ui/gfx/size.h" | 19 #include "ui/gfx/size.h" |
19 | 20 |
20 template<typename T> struct DefaultSingletonTraits; | 21 template<typename T> struct DefaultSingletonTraits; |
21 | 22 |
22 namespace base { | 23 namespace base { |
23 class MessageLoop; | 24 class MessageLoop; |
24 class DictionaryValue; | 25 class DictionaryValue; |
25 class ListValue; | 26 class ListValue; |
26 class Thread; | 27 class Thread; |
27 } | 28 } |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 void SendJsonRequest(const std::string& request, | 136 void SendJsonRequest(const std::string& request, |
136 const JsonRequestCallback& callback); | 137 const JsonRequestCallback& callback); |
137 void SendProtocolCommand(const std::string& debug_url, | 138 void SendProtocolCommand(const std::string& debug_url, |
138 const std::string& method, | 139 const std::string& method, |
139 base::DictionaryValue* params, | 140 base::DictionaryValue* params, |
140 const base::Closure callback); | 141 const base::Closure callback); |
141 | 142 |
142 void Open(const std::string& url, | 143 void Open(const std::string& url, |
143 const RemotePageCallback& callback); | 144 const RemotePageCallback& callback); |
144 | 145 |
| 146 scoped_refptr<content::DevToolsAgentHost> GetAgentHost(); |
| 147 |
145 scoped_refptr<AndroidWebSocket> CreateWebSocket( | 148 scoped_refptr<AndroidWebSocket> CreateWebSocket( |
146 const std::string& url, | 149 const std::string& url, |
147 DevToolsAndroidBridge::AndroidWebSocket::Delegate* delegate); | 150 DevToolsAndroidBridge::AndroidWebSocket::Delegate* delegate); |
148 | 151 |
149 private: | 152 private: |
150 friend class base::RefCounted<RemoteBrowser>; | 153 friend class base::RefCounted<RemoteBrowser>; |
151 virtual ~RemoteBrowser(); | 154 virtual ~RemoteBrowser(); |
152 | 155 |
153 void InnerOpen(const std::string& url, | 156 void InnerOpen(const std::string& url, |
154 const JsonRequestCallback& callback); | 157 const JsonRequestCallback& callback); |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 | 293 |
291 typedef std::vector<DeviceCountListener*> DeviceCountListeners; | 294 typedef std::vector<DeviceCountListener*> DeviceCountListeners; |
292 DeviceCountListeners device_count_listeners_; | 295 DeviceCountListeners device_count_listeners_; |
293 | 296 |
294 AndroidDeviceManager::DeviceProviders device_providers_; | 297 AndroidDeviceManager::DeviceProviders device_providers_; |
295 PrefChangeRegistrar pref_change_registrar_; | 298 PrefChangeRegistrar pref_change_registrar_; |
296 DISALLOW_COPY_AND_ASSIGN(DevToolsAndroidBridge); | 299 DISALLOW_COPY_AND_ASSIGN(DevToolsAndroidBridge); |
297 }; | 300 }; |
298 | 301 |
299 #endif // CHROME_BROWSER_DEVTOOLS_DEVICE_DEVTOOLS_ANDROID_BRIDGE_H_ | 302 #endif // CHROME_BROWSER_DEVTOOLS_DEVICE_DEVTOOLS_ANDROID_BRIDGE_H_ |
OLD | NEW |