Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(420)

Side by Side Diff: chrome/browser/devtools/device/self_device_provider.h

Issue 1224743002: DevTools: allow to pass list of remote debugging targets as command line argument (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed port forwarding test Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_SELF_DEVICE_PROVIDER_H_ 5 #ifndef CHROME_BROWSER_DEVTOOLS_DEVICE_SELF_DEVICE_PROVIDER_H_
6 #define CHROME_BROWSER_DEVTOOLS_DEVICE_SELF_DEVICE_PROVIDER_H_ 6 #define CHROME_BROWSER_DEVTOOLS_DEVICE_SELF_DEVICE_PROVIDER_H_
7 7
8 #include <set>
9
8 #include "chrome/browser/devtools/device/android_device_manager.h" 10 #include "chrome/browser/devtools/device/android_device_manager.h"
11 #include "net/base/host_port_pair.h"
9 12
10 // Instantiate this class only in a test and/or when DEBUG_DEVTOOLS is defined. 13 // Instantiate this class only in a test and/or when DEBUG_DEVTOOLS is defined.
11 class SelfAsDeviceProvider : public AndroidDeviceManager::DeviceProvider { 14 class SelfAsDeviceProvider : public AndroidDeviceManager::DeviceProvider {
dgozman 2015/07/06 10:08:34 This is not a "SelfAsDeviceProvider" anymore, let'
yurys 2015/07/06 13:57:07 Done.
12 public: 15 public:
13 explicit SelfAsDeviceProvider(int port); 16 using RemoteTargets = std::set<net::HostPortPair>;
dgozman 2015/07/06 10:08:34 Using RemoteTargets for this if confusing, as we h
yurys 2015/07/06 13:57:07 Done.
17 explicit SelfAsDeviceProvider(const RemoteTargets& targets);
14 18
15 void QueryDevices(const SerialsCallback& callback) override; 19 void QueryDevices(const SerialsCallback& callback) override;
16 20
17 void QueryDeviceInfo(const std::string& serial, 21 void QueryDeviceInfo(const std::string& serial,
18 const DeviceInfoCallback& callback) override; 22 const DeviceInfoCallback& callback) override;
19 23
20 void OpenSocket(const std::string& serial, 24 void OpenSocket(const std::string& serial,
21 const std::string& socket_name, 25 const std::string& socket_name,
22 const SocketCallback& callback) override; 26 const SocketCallback& callback) override;
23 27
24 void ReleaseDevice(const std::string& serial) override; 28 void ReleaseDevice(const std::string& serial) override;
25 29
26 void set_release_callback_for_test(const base::Closure& callback); 30 void set_release_callback_for_test(const base::Closure& callback);
27 31
28 private: 32 private:
29 ~SelfAsDeviceProvider() override; 33 ~SelfAsDeviceProvider() override;
30 34
31 int port_; 35 RemoteTargets targets_;
32 base::Closure release_callback_; 36 base::Closure release_callback_;
33 }; 37 };
34 38
35 #endif // CHROME_BROWSER_DEVTOOLS_DEVICE_SELF_DEVICE_PROVIDER_H_ 39 #endif // CHROME_BROWSER_DEVTOOLS_DEVICE_SELF_DEVICE_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698