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 <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 16 matching lines...) Expand all Loading... |
27 class MessageLoop; | 27 class MessageLoop; |
28 class DictionaryValue; | 28 class DictionaryValue; |
29 class ListValue; | 29 class ListValue; |
30 class Thread; | 30 class Thread; |
31 } // namespace base | 31 } // namespace base |
32 | 32 |
33 namespace content { | 33 namespace content { |
34 class BrowserContext; | 34 class BrowserContext; |
35 } | 35 } |
36 | 36 |
37 class DevToolsTargetImpl; | |
38 class PortForwardingController; | 37 class PortForwardingController; |
39 class Profile; | 38 class Profile; |
40 class TCPDeviceProvider; | 39 class TCPDeviceProvider; |
41 | 40 |
42 class DevToolsAndroidBridge : public KeyedService { | 41 class DevToolsAndroidBridge : public KeyedService { |
43 public: | 42 public: |
44 class Factory : public BrowserContextKeyedServiceFactory { | 43 class Factory : public BrowserContextKeyedServiceFactory { |
45 public: | 44 public: |
46 // Returns singleton instance of DevToolsAndroidBridge. | 45 // Returns singleton instance of DevToolsAndroidBridge. |
47 static Factory* GetInstance(); | 46 static Factory* GetInstance(); |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 } | 196 } |
198 | 197 |
199 void set_task_scheduler_for_test( | 198 void set_task_scheduler_for_test( |
200 base::Callback<void(const base::Closure&)> scheduler) { | 199 base::Callback<void(const base::Closure&)> scheduler) { |
201 task_scheduler_ = scheduler; | 200 task_scheduler_ = scheduler; |
202 } | 201 } |
203 | 202 |
204 bool HasDevToolsWindow(const std::string& agent_id); | 203 bool HasDevToolsWindow(const std::string& agent_id); |
205 | 204 |
206 // Creates new target instance owned by caller. | 205 // Creates new target instance owned by caller. |
207 DevToolsTargetImpl* CreatePageTarget(scoped_refptr<RemotePage> browser); | 206 scoped_refptr<content::DevToolsAgentHost> |
| 207 CreatePageTarget(scoped_refptr<RemotePage> browser); |
208 | 208 |
209 using RemotePageCallback = base::Callback<void(scoped_refptr<RemotePage>)>; | 209 using RemotePageCallback = base::Callback<void(scoped_refptr<RemotePage>)>; |
210 void OpenRemotePage(scoped_refptr<RemoteBrowser> browser, | 210 void OpenRemotePage(scoped_refptr<RemoteBrowser> browser, |
211 const std::string& url); | 211 const std::string& url); |
212 | 212 |
213 scoped_refptr<content::DevToolsAgentHost> GetBrowserAgentHost( | 213 scoped_refptr<content::DevToolsAgentHost> GetBrowserAgentHost( |
214 scoped_refptr<RemoteBrowser> browser); | 214 scoped_refptr<RemoteBrowser> browser); |
215 | 215 |
216 void SendJsonRequest(const std::string& browser_id_str, | 216 void SendJsonRequest(const std::string& browser_id_str, |
217 const std::string& url, | 217 const std::string& url, |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 PrefChangeRegistrar pref_change_registrar_; | 298 PrefChangeRegistrar pref_change_registrar_; |
299 | 299 |
300 TCPProviderCallback tcp_provider_callback_; | 300 TCPProviderCallback tcp_provider_callback_; |
301 | 301 |
302 base::WeakPtrFactory<DevToolsAndroidBridge> weak_factory_; | 302 base::WeakPtrFactory<DevToolsAndroidBridge> weak_factory_; |
303 | 303 |
304 DISALLOW_COPY_AND_ASSIGN(DevToolsAndroidBridge); | 304 DISALLOW_COPY_AND_ASSIGN(DevToolsAndroidBridge); |
305 }; | 305 }; |
306 | 306 |
307 #endif // CHROME_BROWSER_DEVTOOLS_DEVICE_DEVTOOLS_ANDROID_BRIDGE_H_ | 307 #endif // CHROME_BROWSER_DEVTOOLS_DEVICE_DEVTOOLS_ANDROID_BRIDGE_H_ |
OLD | NEW |