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

Side by Side Diff: chromeos/network/network_sms_handler.h

Issue 10539007: NetworkSmsHandler: Use the ModemManager1 dbus interfaces (Closed) Base URL: http://git.chromium.org/git/chromium/src@master
Patch Set: Only deliver messages after call to RequestUpdate Created 8 years, 6 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
« no previous file with comments | « no previous file | chromeos/network/network_sms_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <string>
9
8 #include "base/memory/scoped_vector.h" 10 #include "base/memory/scoped_vector.h"
9 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
10 #include "base/observer_list.h" 12 #include "base/observer_list.h"
11 #include "base/values.h" 13 #include "base/values.h"
12 #include "chromeos/chromeos_export.h" 14 #include "chromeos/chromeos_export.h"
13 #include "chromeos/dbus/dbus_method_call_status.h" 15 #include "chromeos/dbus/dbus_method_call_status.h"
14 16
15 namespace chromeos { 17 namespace chromeos {
16 18
17 // Class to watch sms without Libcros. 19 // Class to watch sms without Libcros.
(...skipping 21 matching lines...) Expand all
39 void Init(); 41 void Init();
40 42
41 // Requests an immediate check for new messages. 43 // Requests an immediate check for new messages.
42 void RequestUpdate(); 44 void RequestUpdate();
43 45
44 void AddObserver(Observer* observer); 46 void AddObserver(Observer* observer);
45 void RemoveObserver(Observer* observer); 47 void RemoveObserver(Observer* observer);
46 48
47 private: 49 private:
48 class NetworkSmsDeviceHandler; 50 class NetworkSmsDeviceHandler;
51 class ModemManagerNetworkSmsDeviceHandler;
52 class ModemManager1NetworkSmsDeviceHandler;
49 53
50 // Called from NetworkSmsDeviceHandler when a message is received. 54 // Called from NetworkSmsDeviceHandler when a message is received.
51 void NotifyMessageReceived(const base::DictionaryValue& message); 55 void NotifyMessageReceived(const base::DictionaryValue& message);
52 56
53 // Callback to handle the manager properties with the list of devices. 57 // Callback to handle the manager properties with the list of devices.
54 void ManagerPropertiesCallback(DBusMethodCallStatus call_status, 58 void ManagerPropertiesCallback(DBusMethodCallStatus call_status,
55 const base::DictionaryValue& properties); 59 const base::DictionaryValue& properties);
56 60
57 // Callback to handle the device properties for |device_path|. 61 // Callback to handle the device properties for |device_path|.
58 // A NetworkSmsDeviceHandler will be instantiated for each cellular device. 62 // A NetworkSmsDeviceHandler will be instantiated for each cellular device.
59 void DevicePropertiesCallback(const std::string& device_path, 63 void DevicePropertiesCallback(const std::string& device_path,
60 DBusMethodCallStatus call_status, 64 DBusMethodCallStatus call_status,
61 const base::DictionaryValue& properties); 65 const base::DictionaryValue& properties);
62 66
63 ObserverList<Observer> observers_; 67 ObserverList<Observer> observers_;
64 ScopedVector<NetworkSmsDeviceHandler> device_handlers_; 68 ScopedVector<NetworkSmsDeviceHandler> device_handlers_;
65 base::WeakPtrFactory<NetworkSmsHandler> weak_ptr_factory_; 69 base::WeakPtrFactory<NetworkSmsHandler> weak_ptr_factory_;
66 70
67 DISALLOW_COPY_AND_ASSIGN(NetworkSmsHandler); 71 DISALLOW_COPY_AND_ASSIGN(NetworkSmsHandler);
68 }; 72 };
69 73
70 } // namespace 74 } // namespace
71 75
72 #endif // CHROMEOS_NETWORK_NETWORK_SMS_HANDLER_H_ 76 #endif // CHROMEOS_NETWORK_NETWORK_SMS_HANDLER_H_
OLDNEW
« no previous file with comments | « no previous file | chromeos/network/network_sms_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698