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_CHROME_DEVTOOLS_MANAGER_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_DEVTOOLS_CHROME_DEVTOOLS_MANAGER_DELEGATE_H_ |
6 #define CHROME_BROWSER_DEVTOOLS_CHROME_DEVTOOLS_MANAGER_DELEGATE_H_ | 6 #define CHROME_BROWSER_DEVTOOLS_CHROME_DEVTOOLS_MANAGER_DELEGATE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 #include <set> | 10 #include <set> |
11 | 11 |
12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "chrome/browser/devtools/device/devtools_device_discovery.h" | 14 #include "chrome/browser/devtools/device/devtools_device_discovery.h" |
15 #include "content/public/browser/devtools_agent_host_observer.h" | 15 #include "content/public/browser/devtools_agent_host_observer.h" |
16 #include "content/public/browser/devtools_manager_delegate.h" | 16 #include "content/public/browser/devtools_manager_delegate.h" |
17 #include "net/base/host_port_pair.h" | 17 #include "net/base/host_port_pair.h" |
18 | 18 |
19 class DevToolsNetworkProtocolHandler; | 19 class DevToolsNetworkProtocolHandler; |
20 | 20 |
21 class ChromeDevToolsManagerDelegate : | 21 class ChromeDevToolsManagerDelegate : |
22 public content::DevToolsManagerDelegate, | 22 public content::DevToolsManagerDelegate, |
23 public content::DevToolsAgentHostObserver { | 23 public content::DevToolsAgentHostObserver { |
24 public: | 24 public: |
25 static char kTypeApp[]; | 25 static char kTypeApp[]; |
26 static char kTypeBackgroundPage[]; | 26 static char kTypeBackgroundPage[]; |
27 static char kTypeWebView[]; | 27 static char kTypeWebView[]; |
28 | 28 |
29 static std::unique_ptr<base::DictionaryValue> GetWindowForTarget( | |
dgozman
2017/03/23 22:56:01
Move this to private, and add a friend class DevTo
jzfeng
2017/03/24 02:24:40
Done.
| |
30 int id, | |
31 base::DictionaryValue* params); | |
32 static std::unique_ptr<base::DictionaryValue> GetWindowBounds( | |
33 int id, | |
34 base::DictionaryValue* params); | |
35 static std::unique_ptr<base::DictionaryValue> SetWindowBounds( | |
36 int id, | |
37 base::DictionaryValue* params); | |
38 | |
29 ChromeDevToolsManagerDelegate(); | 39 ChromeDevToolsManagerDelegate(); |
30 ~ChromeDevToolsManagerDelegate() override; | 40 ~ChromeDevToolsManagerDelegate() override; |
31 | 41 |
32 private: | 42 private: |
33 class HostData; | 43 class HostData; |
34 using RemoteLocations = std::set<net::HostPortPair>; | 44 using RemoteLocations = std::set<net::HostPortPair>; |
35 | 45 |
36 // content::DevToolsManagerDelegate implementation. | 46 // content::DevToolsManagerDelegate implementation. |
37 void Inspect(content::DevToolsAgentHost* agent_host) override; | 47 void Inspect(content::DevToolsAgentHost* agent_host) override; |
38 base::DictionaryValue* HandleCommand( | 48 base::DictionaryValue* HandleCommand( |
(...skipping 26 matching lines...) Expand all Loading... | |
65 | 75 |
66 std::unique_ptr<AndroidDeviceManager> device_manager_; | 76 std::unique_ptr<AndroidDeviceManager> device_manager_; |
67 std::unique_ptr<DevToolsDeviceDiscovery> device_discovery_; | 77 std::unique_ptr<DevToolsDeviceDiscovery> device_discovery_; |
68 content::DevToolsAgentHost::List remote_agent_hosts_; | 78 content::DevToolsAgentHost::List remote_agent_hosts_; |
69 RemoteLocations remote_locations_; | 79 RemoteLocations remote_locations_; |
70 | 80 |
71 DISALLOW_COPY_AND_ASSIGN(ChromeDevToolsManagerDelegate); | 81 DISALLOW_COPY_AND_ASSIGN(ChromeDevToolsManagerDelegate); |
72 }; | 82 }; |
73 | 83 |
74 #endif // CHROME_BROWSER_DEVTOOLS_CHROME_DEVTOOLS_MANAGER_DELEGATE_H_ | 84 #endif // CHROME_BROWSER_DEVTOOLS_CHROME_DEVTOOLS_MANAGER_DELEGATE_H_ |
OLD | NEW |