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

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

Issue 596253003: DevTools: RemoteDevice and RemoteBrowser are now value types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pfc3
Patch Set: Rebased Created 6 years, 2 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_PORT_FORWARDING_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_DEVTOOLS_DEVICE_PORT_FORWARDING_CONTROLLER_H_
6 #define CHROME_BROWSER_DEVTOOLS_DEVICE_PORT_FORWARDING_CONTROLLER_H_ 6 #define CHROME_BROWSER_DEVTOOLS_DEVICE_PORT_FORWARDING_CONTROLLER_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/prefs/pref_change_registrar.h" 10 #include "base/prefs/pref_change_registrar.h"
11 #include "chrome/browser/devtools/device/devtools_android_bridge.h" 11 #include "chrome/browser/devtools/device/devtools_android_bridge.h"
12 #include "components/keyed_service/content/browser_context_keyed_service_factory .h" 12 #include "components/keyed_service/content/browser_context_keyed_service_factory .h"
13 #include "components/keyed_service/core/keyed_service.h" 13 #include "components/keyed_service/core/keyed_service.h"
14 14
15 class PrefService; 15 class PrefService;
16 class Profile; 16 class Profile;
17 17
18 class PortForwardingController { 18 class PortForwardingController {
19 public: 19 public:
20 typedef DevToolsAndroidBridge::PortStatus PortStatus; 20 typedef DevToolsAndroidBridge::PortStatus PortStatus;
21 typedef DevToolsAndroidBridge::PortStatusMap PortStatusMap; 21 typedef DevToolsAndroidBridge::PortStatusMap PortStatusMap;
22 typedef DevToolsAndroidBridge::BrowserStatus BrowserStatus; 22 typedef DevToolsAndroidBridge::BrowserStatus BrowserStatus;
23 typedef DevToolsAndroidBridge::ForwardingStatus ForwardingStatus; 23 typedef DevToolsAndroidBridge::ForwardingStatus ForwardingStatus;
24 24
25 explicit PortForwardingController(Profile* profile); 25 explicit PortForwardingController(Profile* profile);
26 26
27 virtual ~PortForwardingController(); 27 virtual ~PortForwardingController();
28 28
29 ForwardingStatus DeviceListChanged( 29 ForwardingStatus DeviceListChanged(
30 const DevToolsAndroidBridge::RemoteDevices& devices); 30 const DevToolsAndroidBridge::CompleteDevices& complete_devices);
31 31
32 private: 32 private:
33 class Connection; 33 class Connection;
34 typedef std::map<std::string, Connection*> Registry; 34 typedef std::map<std::string, Connection*> Registry;
35 35
36 void OnPrefsChange(); 36 void OnPrefsChange();
37 37
38 void UpdateConnections(); 38 void UpdateConnections();
39 39
40 Profile* profile_; 40 Profile* profile_;
41 PrefService* pref_service_; 41 PrefService* pref_service_;
42 PrefChangeRegistrar pref_change_registrar_; 42 PrefChangeRegistrar pref_change_registrar_;
43 Registry registry_; 43 Registry registry_;
44 44
45 typedef std::map<int, std::string> ForwardingMap; 45 typedef std::map<int, std::string> ForwardingMap;
46 ForwardingMap forwarding_map_; 46 ForwardingMap forwarding_map_;
47 47
48 DISALLOW_COPY_AND_ASSIGN(PortForwardingController); 48 DISALLOW_COPY_AND_ASSIGN(PortForwardingController);
49 }; 49 };
50 50
51 #endif // CHROME_BROWSER_DEVTOOLS_DEVICE_PORT_FORWARDING_CONTROLLER_H_ 51 #endif // CHROME_BROWSER_DEVTOOLS_DEVICE_PORT_FORWARDING_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698