| OLD | NEW |
| 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 #include "chrome/browser/devtools/device/devtools_android_bridge.h" | 5 #include "chrome/browser/devtools/device/devtools_android_bridge.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 | 250 |
| 251 ProtocolCommand::~ProtocolCommand() { | 251 ProtocolCommand::~ProtocolCommand() { |
| 252 if (!callback_.is_null()) | 252 if (!callback_.is_null()) |
| 253 callback_.Run(); | 253 callback_.Run(); |
| 254 } | 254 } |
| 255 | 255 |
| 256 } // namespace | 256 } // namespace |
| 257 | 257 |
| 258 // static | 258 // static |
| 259 DevToolsAndroidBridge::Factory* DevToolsAndroidBridge::Factory::GetInstance() { | 259 DevToolsAndroidBridge::Factory* DevToolsAndroidBridge::Factory::GetInstance() { |
| 260 return Singleton<DevToolsAndroidBridge::Factory>::get(); | 260 return base::Singleton<DevToolsAndroidBridge::Factory>::get(); |
| 261 } | 261 } |
| 262 | 262 |
| 263 // static | 263 // static |
| 264 DevToolsAndroidBridge* DevToolsAndroidBridge::Factory::GetForProfile( | 264 DevToolsAndroidBridge* DevToolsAndroidBridge::Factory::GetForProfile( |
| 265 Profile* profile) { | 265 Profile* profile) { |
| 266 return static_cast<DevToolsAndroidBridge*>(GetInstance()-> | 266 return static_cast<DevToolsAndroidBridge*>(GetInstance()-> |
| 267 GetServiceForBrowserContext(profile, true)); | 267 GetServiceForBrowserContext(profile, true)); |
| 268 } | 268 } |
| 269 | 269 |
| 270 DevToolsAndroidBridge::Factory::Factory() | 270 DevToolsAndroidBridge::Factory::Factory() |
| (...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 952 device_providers.push_back( | 952 device_providers.push_back( |
| 953 new WebRTCDeviceProvider(profile_, signin_manager_, token_service_)); | 953 new WebRTCDeviceProvider(profile_, signin_manager_, token_service_)); |
| 954 } | 954 } |
| 955 | 955 |
| 956 device_manager_->SetDeviceProviders(device_providers); | 956 device_manager_->SetDeviceProviders(device_providers); |
| 957 if (NeedsDeviceListPolling()) { | 957 if (NeedsDeviceListPolling()) { |
| 958 StopDeviceListPolling(); | 958 StopDeviceListPolling(); |
| 959 StartDeviceListPolling(); | 959 StartDeviceListPolling(); |
| 960 } | 960 } |
| 961 } | 961 } |
| OLD | NEW |