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

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

Issue 26568004: Introduced AndroidDeviceProvider to simplify testing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added files to changelist. Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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_PORT_FORWARDING_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_DEVTOOLS_PORT_FORWARDING_CONTROLLER_H_
6 #define CHROME_BROWSER_DEVTOOLS_PORT_FORWARDING_CONTROLLER_H_ 6 #define CHROME_BROWSER_DEVTOOLS_PORT_FORWARDING_CONTROLLER_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "chrome/browser/devtools/devtools_adb_bridge.h" 10 #include "chrome/browser/devtools/devtools_adb_bridge.h"
11 #include "chrome/browser/devtools/devtools_device_provider.h"
11 #include "components/browser_context_keyed_service/browser_context_keyed_service .h" 12 #include "components/browser_context_keyed_service/browser_context_keyed_service .h"
12 #include "components/browser_context_keyed_service/browser_context_keyed_service _factory.h" 13 #include "components/browser_context_keyed_service/browser_context_keyed_service _factory.h"
13 14
14 class PrefService; 15 class PrefService;
15 16
16 class PortForwardingController : public BrowserContextKeyedService { 17 class PortForwardingController : public BrowserContextKeyedService {
17 public: 18 public:
18 PortForwardingController( 19 explicit PortForwardingController(PrefService* pref_service);
19 scoped_refptr<DevToolsAdbBridge> bridge,
20 PrefService* pref_service);
21 20
22 virtual ~PortForwardingController(); 21 virtual ~PortForwardingController();
23 22
24 class Factory : public BrowserContextKeyedServiceFactory { 23 class Factory : public BrowserContextKeyedServiceFactory {
25 public: 24 public:
26 // Returns singleton instance of Factory. 25 // Returns singleton instance of Factory.
27 static Factory* GetInstance(); 26 static Factory* GetInstance();
28 27
29 // Returns PortForwardingController associated with |profile|. 28 // Returns PortForwardingController associated with |profile|.
30 static PortForwardingController* GetForProfile(Profile* profile); 29 static PortForwardingController* GetForProfile(Profile* profile);
(...skipping 14 matching lines...) Expand all
45 typedef std::map<int, PortStatus> PortStatusMap; 44 typedef std::map<int, PortStatus> PortStatusMap;
46 typedef std::map<std::string, PortStatusMap> DevicesStatus; 45 typedef std::map<std::string, PortStatusMap> DevicesStatus;
47 46
48 DevicesStatus UpdateDeviceList( 47 DevicesStatus UpdateDeviceList(
49 const DevToolsAdbBridge::RemoteDevices& devices); 48 const DevToolsAdbBridge::RemoteDevices& devices);
50 49
51 private: 50 private:
52 class Connection; 51 class Connection;
53 typedef std::map<std::string, Connection* > Registry; 52 typedef std::map<std::string, Connection* > Registry;
54 53
55 scoped_refptr<DevToolsAdbBridge> bridge_; 54 scoped_refptr<RefCountedAdbThread> adb_thread_;
56 PrefService* pref_service_; 55 PrefService* pref_service_;
57 Registry registry_; 56 Registry registry_;
58 57
59 DISALLOW_COPY_AND_ASSIGN(PortForwardingController); 58 DISALLOW_COPY_AND_ASSIGN(PortForwardingController);
60 }; 59 };
61 60
62 #endif // CHROME_BROWSER_DEVTOOLS_PORT_FORWARDING_CONTROLLER_H_ 61 #endif // CHROME_BROWSER_DEVTOOLS_PORT_FORWARDING_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698