Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_DEVTOOLS_ADB_BRIDGE_H_ | 5 #ifndef CHROME_BROWSER_DEVTOOLS_DEVTOOLS_ADB_BRIDGE_H_ |
| 6 #define CHROME_BROWSER_DEVTOOLS_DEVTOOLS_ADB_BRIDGE_H_ | 6 #define CHROME_BROWSER_DEVTOOLS_DEVTOOLS_ADB_BRIDGE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 126 class RemoteBrowser : public base::RefCounted<RemoteBrowser> { | 126 class RemoteBrowser : public base::RefCounted<RemoteBrowser> { |
| 127 public: | 127 public: |
| 128 RemoteBrowser(scoped_refptr<DevToolsAdbBridge> bridge, | 128 RemoteBrowser(scoped_refptr<DevToolsAdbBridge> bridge, |
| 129 scoped_refptr<AndroidDevice> device, | 129 scoped_refptr<AndroidDevice> device, |
| 130 const std::string& socket, | 130 const std::string& socket, |
| 131 const std::string& name); | 131 const std::string& name); |
| 132 | 132 |
| 133 scoped_refptr<AndroidDevice> device() { return device_; } | 133 scoped_refptr<AndroidDevice> device() { return device_; } |
| 134 std::string socket() { return socket_; } | 134 std::string socket() { return socket_; } |
| 135 std::string name() { return name_; } | 135 std::string name() { return name_; } |
| 136 std::string version() { return version_; } | |
| 136 | 137 |
| 137 RemotePages& pages() { return pages_; } | 138 RemotePages& pages() { return pages_; } |
| 138 void AddPage(scoped_refptr<RemotePage> page) { pages_.push_back(page); } | 139 void AddPage(scoped_refptr<RemotePage> page) { pages_.push_back(page); } |
| 139 | 140 |
| 141 void SetVersion(const std::string& version) { version_ = version; } | |
|
pfeldman
2013/08/08 16:25:14
set_version
Vladislav Kaznacheev
2013/08/09 08:56:10
Done.
| |
| 142 | |
| 140 void Open(const std::string& url); | 143 void Open(const std::string& url); |
| 141 | 144 |
| 142 private: | 145 private: |
| 143 friend class base::RefCounted<RemoteBrowser>; | 146 friend class base::RefCounted<RemoteBrowser>; |
| 144 virtual ~RemoteBrowser(); | 147 virtual ~RemoteBrowser(); |
| 145 | 148 |
| 146 void PageCreatedOnHandlerThread( | 149 void PageCreatedOnHandlerThread( |
| 147 const std::string& url, int result, const std::string& response); | 150 const std::string& url, int result, const std::string& response); |
| 148 | 151 |
| 149 void PageCreatedOnUIThread( | 152 void PageCreatedOnUIThread( |
| 150 const std::string& response, const std::string& url); | 153 const std::string& response, const std::string& url); |
| 151 | 154 |
| 152 scoped_refptr<DevToolsAdbBridge> bridge_; | 155 scoped_refptr<DevToolsAdbBridge> bridge_; |
| 153 scoped_refptr<AndroidDevice> device_; | 156 scoped_refptr<AndroidDevice> device_; |
| 154 const std::string socket_; | 157 const std::string socket_; |
| 155 const std::string name_; | 158 const std::string name_; |
| 159 std::string version_; | |
| 156 RemotePages pages_; | 160 RemotePages pages_; |
| 157 | 161 |
| 158 DISALLOW_COPY_AND_ASSIGN(RemoteBrowser); | 162 DISALLOW_COPY_AND_ASSIGN(RemoteBrowser); |
| 159 }; | 163 }; |
| 160 | 164 |
| 161 typedef std::vector<scoped_refptr<RemoteBrowser> > RemoteBrowsers; | 165 typedef std::vector<scoped_refptr<RemoteBrowser> > RemoteBrowsers; |
| 162 | 166 |
| 163 class RemoteDevice : public base::RefCounted<RemoteDevice> { | 167 class RemoteDevice : public base::RefCounted<RemoteDevice> { |
| 164 public: | 168 public: |
| 165 typedef int PortStatus; | 169 typedef int PortStatus; |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 290 scoped_refptr<RefCountedAdbThread> adb_thread_; | 294 scoped_refptr<RefCountedAdbThread> adb_thread_; |
| 291 bool has_message_loop_; | 295 bool has_message_loop_; |
| 292 scoped_ptr<crypto::RSAPrivateKey> rsa_key_; | 296 scoped_ptr<crypto::RSAPrivateKey> rsa_key_; |
| 293 typedef std::vector<Listener*> Listeners; | 297 typedef std::vector<Listener*> Listeners; |
| 294 Listeners listeners_; | 298 Listeners listeners_; |
| 295 scoped_ptr<PortForwardingController> port_forwarding_controller_; | 299 scoped_ptr<PortForwardingController> port_forwarding_controller_; |
| 296 DISALLOW_COPY_AND_ASSIGN(DevToolsAdbBridge); | 300 DISALLOW_COPY_AND_ASSIGN(DevToolsAdbBridge); |
| 297 }; | 301 }; |
| 298 | 302 |
| 299 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_ADB_BRIDGE_H_ | 303 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_ADB_BRIDGE_H_ |
| OLD | NEW |