OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROMEOS_NETWORK_NETWORK_SMS_HANDLER_H_ | 5 #ifndef CHROMEOS_NETWORK_NETWORK_SMS_HANDLER_H_ |
6 #define CHROMEOS_NETWORK_NETWORK_SMS_HANDLER_H_ | 6 #define CHROMEOS_NETWORK_NETWORK_SMS_HANDLER_H_ |
7 | 7 |
| 8 #include <memory> |
8 #include <string> | 9 #include <string> |
| 10 #include <vector> |
9 | 11 |
10 #include "base/macros.h" | 12 #include "base/macros.h" |
11 #include "base/memory/scoped_vector.h" | |
12 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
13 #include "base/observer_list.h" | 14 #include "base/observer_list.h" |
14 #include "chromeos/chromeos_export.h" | 15 #include "chromeos/chromeos_export.h" |
15 #include "chromeos/dbus/dbus_method_call_status.h" | 16 #include "chromeos/dbus/dbus_method_call_status.h" |
16 #include "chromeos/dbus/shill_property_changed_observer.h" | 17 #include "chromeos/dbus/shill_property_changed_observer.h" |
17 | 18 |
18 namespace base { | 19 namespace base { |
19 class DictionaryValue; | 20 class DictionaryValue; |
20 class ListValue; | 21 class ListValue; |
21 class Value; | 22 class Value; |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 // Requests properties for each entry in |devices|. | 85 // Requests properties for each entry in |devices|. |
85 void UpdateDevices(const base::ListValue* devices); | 86 void UpdateDevices(const base::ListValue* devices); |
86 | 87 |
87 // Callback to handle the device properties for |device_path|. | 88 // Callback to handle the device properties for |device_path|. |
88 // A NetworkSmsDeviceHandler will be instantiated for each cellular device. | 89 // A NetworkSmsDeviceHandler will be instantiated for each cellular device. |
89 void DevicePropertiesCallback(const std::string& device_path, | 90 void DevicePropertiesCallback(const std::string& device_path, |
90 DBusMethodCallStatus call_status, | 91 DBusMethodCallStatus call_status, |
91 const base::DictionaryValue& properties); | 92 const base::DictionaryValue& properties); |
92 | 93 |
93 base::ObserverList<Observer, true> observers_; | 94 base::ObserverList<Observer, true> observers_; |
94 ScopedVector<NetworkSmsDeviceHandler> device_handlers_; | 95 std::vector<std::unique_ptr<NetworkSmsDeviceHandler>> device_handlers_; |
95 ScopedVector<base::DictionaryValue> received_messages_; | 96 std::vector<std::unique_ptr<base::DictionaryValue>> received_messages_; |
96 base::WeakPtrFactory<NetworkSmsHandler> weak_ptr_factory_; | 97 base::WeakPtrFactory<NetworkSmsHandler> weak_ptr_factory_; |
97 | 98 |
98 DISALLOW_COPY_AND_ASSIGN(NetworkSmsHandler); | 99 DISALLOW_COPY_AND_ASSIGN(NetworkSmsHandler); |
99 }; | 100 }; |
100 | 101 |
101 } // namespace chromeos | 102 } // namespace chromeos |
102 | 103 |
103 #endif // CHROMEOS_NETWORK_NETWORK_SMS_HANDLER_H_ | 104 #endif // CHROMEOS_NETWORK_NETWORK_SMS_HANDLER_H_ |
OLD | NEW |