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 CHROME_BROWSER_CHROMEOS_INPUT_METHOD_BROWSER_STATE_MONITOR_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_BROWSER_STATE_MONITOR_H_ |
6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_BROWSER_STATE_MONITOR_H_ | 6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_BROWSER_STATE_MONITOR_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "chrome/browser/api/prefs/pref_member.h" | 10 #include "chrome/browser/api/prefs/pref_member.h" |
11 #include "chrome/browser/chromeos/input_method/input_method_manager.h" | 11 #include "chrome/browser/chromeos/input_method/input_method_manager.h" |
12 #include "content/public/browser/notification_observer.h" | 12 #include "content/public/browser/notification_observer.h" |
13 #include "content/public/browser/notification_registrar.h" | 13 #include "content/public/browser/notification_registrar.h" |
14 #include "content/public/browser/notification_types.h" | 14 #include "content/public/browser/notification_types.h" |
15 | 15 |
| 16 class PrefService; |
| 17 |
16 namespace chromeos { | 18 namespace chromeos { |
17 namespace input_method { | 19 namespace input_method { |
18 | 20 |
19 // A class which monitors a notification from the browser to keep track of the | 21 // A class which monitors a notification from the browser to keep track of the |
20 // browser state (not logged in, logged in, etc.) and notify the current state | 22 // browser state (not logged in, logged in, etc.) and notify the current state |
21 // to the input method manager. The class also updates the appropriate Chrome | 23 // to the input method manager. The class also updates the appropriate Chrome |
22 // prefs (~/Local\ State or ~/Preferences) depending on the current browser | 24 // prefs (~/Local\ State or ~/Preferences) depending on the current browser |
23 // state. | 25 // state. |
24 class BrowserStateMonitor : public content::NotificationObserver, | 26 class BrowserStateMonitor : public content::NotificationObserver, |
25 public InputMethodManager::Observer { | 27 public InputMethodManager::Observer { |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 // For testing. | 62 // For testing. |
61 PrefService* pref_service_; | 63 PrefService* pref_service_; |
62 | 64 |
63 DISALLOW_COPY_AND_ASSIGN(BrowserStateMonitor); | 65 DISALLOW_COPY_AND_ASSIGN(BrowserStateMonitor); |
64 }; | 66 }; |
65 | 67 |
66 } // namespace input_method | 68 } // namespace input_method |
67 } // namespace chromeos | 69 } // namespace chromeos |
68 | 70 |
69 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_BROWSER_STATE_MONITOR_H_ | 71 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_BROWSER_STATE_MONITOR_H_ |
OLD | NEW |