OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_UI_WEBUI_CHROMEOS_EMULATOR_DEVICE_EMULATOR_MESSAGE_HANDLE
R_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_EMULATOR_DEVICE_EMULATOR_MESSAGE_HANDLE
R_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_EMULATOR_DEVICE_EMULATOR_MESSAGE_HANDLE
R_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_EMULATOR_DEVICE_EMULATOR_MESSAGE_HANDLE
R_H_ |
7 | 7 |
| 8 #include <memory> |
| 9 |
8 #include "base/macros.h" | 10 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | |
10 #include "chromeos/dbus/power_manager/power_supply_properties.pb.h" | 11 #include "chromeos/dbus/power_manager/power_supply_properties.pb.h" |
11 #include "content/public/browser/web_ui_message_handler.h" | 12 #include "content/public/browser/web_ui_message_handler.h" |
12 | 13 |
13 namespace base { | 14 namespace base { |
14 class ListValue; | 15 class ListValue; |
15 } // namespace base | 16 } // namespace base |
16 | 17 |
17 namespace dbus { | 18 namespace dbus { |
18 class ObjectPath; | 19 class ObjectPath; |
19 } // namespace dbus | 20 } // namespace dbus |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 class PowerObserver; | 96 class PowerObserver; |
96 | 97 |
97 // Creates a bluetooth device with the properties given in |args|. |args| | 98 // Creates a bluetooth device with the properties given in |args|. |args| |
98 // should contain a dictionary so that each dictionary value can be mapped | 99 // should contain a dictionary so that each dictionary value can be mapped |
99 // to its respective property upon creating the device. Returns the device | 100 // to its respective property upon creating the device. Returns the device |
100 // path. | 101 // path. |
101 std::string CreateBluetoothDeviceFromListValue(const base::ListValue* args); | 102 std::string CreateBluetoothDeviceFromListValue(const base::ListValue* args); |
102 | 103 |
103 // Builds a dictionary with each key representing a property of the device | 104 // Builds a dictionary with each key representing a property of the device |
104 // with path |object_path|. | 105 // with path |object_path|. |
105 scoped_ptr<base::DictionaryValue> GetDeviceInfo( | 106 std::unique_ptr<base::DictionaryValue> GetDeviceInfo( |
106 const dbus::ObjectPath& object_path); | 107 const dbus::ObjectPath& object_path); |
107 | 108 |
108 bluez::FakeBluetoothDeviceClient* fake_bluetooth_device_client_; | 109 bluez::FakeBluetoothDeviceClient* fake_bluetooth_device_client_; |
109 scoped_ptr<BluetoothObserver> bluetooth_observer_; | 110 std::unique_ptr<BluetoothObserver> bluetooth_observer_; |
110 | 111 |
111 FakeCrasAudioClient* fake_cras_audio_client_; | 112 FakeCrasAudioClient* fake_cras_audio_client_; |
112 scoped_ptr<CrasAudioObserver> cras_audio_observer_; | 113 std::unique_ptr<CrasAudioObserver> cras_audio_observer_; |
113 | 114 |
114 FakePowerManagerClient* fake_power_manager_client_; | 115 FakePowerManagerClient* fake_power_manager_client_; |
115 scoped_ptr<PowerObserver> power_observer_; | 116 std::unique_ptr<PowerObserver> power_observer_; |
116 | 117 |
117 DISALLOW_COPY_AND_ASSIGN(DeviceEmulatorMessageHandler); | 118 DISALLOW_COPY_AND_ASSIGN(DeviceEmulatorMessageHandler); |
118 }; | 119 }; |
119 | 120 |
120 } // namespace chromeos | 121 } // namespace chromeos |
121 | 122 |
122 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_EMULATOR_DEVICE_EMULATOR_MESSAGE_HAN
DLER_H_ | 123 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_EMULATOR_DEVICE_EMULATOR_MESSAGE_HAN
DLER_H_ |
OLD | NEW |