Split gdata_file_system_interface.h from gdata_file_system.h
[chromium-blink-merge.git] / chrome / browser / chromeos / sms_observer.h
blob40b7b69c1d43cfb8555d56cd0a33ebc67cdd4cf2
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_CHROMEOS_SMS_OBSERVER_H_
6 #define CHROME_BROWSER_CHROMEOS_SMS_OBSERVER_H_
8 #include <map>
9 #include <string>
11 #include "base/basictypes.h"
12 #include "base/compiler_specific.h"
13 #include "chrome/browser/chromeos/cros/network_library.h"
15 class Profile;
17 namespace chromeos {
19 // Performs monitoring of incoming SMS and shows system notifications.
20 class SmsObserver : public NetworkLibrary::NetworkManagerObserver {
21 public:
22 explicit SmsObserver(Profile* profile);
23 virtual ~SmsObserver();
25 private:
26 typedef std::map<std::string, CrosNetworkWatcher*> ObserversMap;
28 // NetworkLibrary:NetworkManagerObserver implementation:
29 virtual void OnNetworkManagerChanged(NetworkLibrary* obj) OVERRIDE;
31 void OnNewMessage(const std::string& modem_device_path, const SMS& message);
33 void UpdateObservers(NetworkLibrary* library);
34 void DisconnectAll();
36 Profile* profile_;
37 ObserversMap observers_;
39 DISALLOW_COPY_AND_ASSIGN(SmsObserver);
42 } // namespace chromeos
44 #endif // CHROME_BROWSER_CHROMEOS_SMS_OBSERVER_H_