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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 188 | 188 |
| 189 scoped_refptr<AndroidDevice> device() { return device_; } | 189 scoped_refptr<AndroidDevice> device() { return device_; } |
| 190 std::string serial() { return device_->serial(); } | 190 std::string serial() { return device_->serial(); } |
| 191 std::string model() { return device_->model(); } | 191 std::string model() { return device_->model(); } |
| 192 | 192 |
| 193 RemoteBrowsers& browsers() { return browsers_; } | 193 RemoteBrowsers& browsers() { return browsers_; } |
| 194 void AddBrowser(scoped_refptr<RemoteBrowser> browser) { | 194 void AddBrowser(scoped_refptr<RemoteBrowser> browser) { |
| 195 browsers_.push_back(browser); | 195 browsers_.push_back(browser); |
| 196 } | 196 } |
| 197 | 197 |
| 198 int screenWidth() { return screenWidth_; } | |
| 199 int screenHeight() { return screenHeight_; } | |
| 200 void SetScreenDimensions(int width, int height) { | |
| 201 screenWidth_ = width; | |
| 202 screenHeight_ = height; | |
| 203 } | |
| 204 | |
| 198 const PortStatusMap& port_status() { return port_status_; } | 205 const PortStatusMap& port_status() { return port_status_; } |
| 199 void set_port_status(const PortStatusMap& port_status) { | 206 void set_port_status(const PortStatusMap& port_status) { |
| 200 port_status_ = port_status; | 207 port_status_ = port_status; |
| 201 } | 208 } |
| 202 | 209 |
| 203 private: | 210 private: |
| 204 friend class base::RefCounted<RemoteDevice>; | 211 friend class base::RefCounted<RemoteDevice>; |
| 205 virtual ~RemoteDevice(); | 212 virtual ~RemoteDevice(); |
| 206 | 213 |
| 207 scoped_refptr<DevToolsAdbBridge> bridge_; | 214 scoped_refptr<DevToolsAdbBridge> bridge_; |
| 208 scoped_refptr<AndroidDevice> device_; | 215 scoped_refptr<AndroidDevice> device_; |
| 209 RemoteBrowsers browsers_; | 216 RemoteBrowsers browsers_; |
| 217 int screenWidth_; | |
|
pfeldman
2013/09/13 13:36:04
screen_width_. I'd also use gfx::Size.
| |
| 218 int screenHeight_; | |
| 210 PortStatusMap port_status_; | 219 PortStatusMap port_status_; |
| 211 | 220 |
| 212 DISALLOW_COPY_AND_ASSIGN(RemoteDevice); | 221 DISALLOW_COPY_AND_ASSIGN(RemoteDevice); |
| 213 }; | 222 }; |
| 214 | 223 |
| 215 typedef std::vector<scoped_refptr<RemoteDevice> > RemoteDevices; | 224 typedef std::vector<scoped_refptr<RemoteDevice> > RemoteDevices; |
| 216 | 225 |
| 217 class AndroidDevice : public base::RefCounted<AndroidDevice> { | 226 class AndroidDevice : public base::RefCounted<AndroidDevice> { |
| 218 public: | 227 public: |
| 219 explicit AndroidDevice(const std::string& serial); | 228 explicit AndroidDevice(const std::string& serial); |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 300 scoped_refptr<RefCountedAdbThread> adb_thread_; | 309 scoped_refptr<RefCountedAdbThread> adb_thread_; |
| 301 bool has_message_loop_; | 310 bool has_message_loop_; |
| 302 scoped_ptr<crypto::RSAPrivateKey> rsa_key_; | 311 scoped_ptr<crypto::RSAPrivateKey> rsa_key_; |
| 303 typedef std::vector<Listener*> Listeners; | 312 typedef std::vector<Listener*> Listeners; |
| 304 Listeners listeners_; | 313 Listeners listeners_; |
| 305 scoped_ptr<PortForwardingController> port_forwarding_controller_; | 314 scoped_ptr<PortForwardingController> port_forwarding_controller_; |
| 306 DISALLOW_COPY_AND_ASSIGN(DevToolsAdbBridge); | 315 DISALLOW_COPY_AND_ASSIGN(DevToolsAdbBridge); |
| 307 }; | 316 }; |
| 308 | 317 |
| 309 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_ADB_BRIDGE_H_ | 318 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_ADB_BRIDGE_H_ |
| OLD | NEW |