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 #include "chrome/browser/chromeos/input_method/browser_state_monitor.h" | 5 #include "chrome/browser/chromeos/input_method/browser_state_monitor.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "chrome/browser/chrome_notification_types.h" | 8 #include "chrome/browser/chrome_notification_types.h" |
9 #include "chrome/browser/chromeos/input_method/input_method_util.h" | 9 #include "chrome/browser/chromeos/input_method/input_method_util.h" |
| 10 #include "chromeos/ime/input_method_delegate.h" |
10 #include "content/public/browser/notification_service.h" | 11 #include "content/public/browser/notification_service.h" |
11 #include "ui/base/ime/chromeos/input_method_delegate.h" | |
12 | 12 |
13 namespace chromeos { | 13 namespace chromeos { |
14 namespace input_method { | 14 namespace input_method { |
15 | 15 |
16 BrowserStateMonitor::BrowserStateMonitor( | 16 BrowserStateMonitor::BrowserStateMonitor( |
17 const base::Callback<void(InputMethodManager::UISessionState)>& observer) | 17 const base::Callback<void(InputMethodManager::UISessionState)>& observer) |
18 : observer_(observer), ui_session_(InputMethodManager::STATE_LOGIN_SCREEN) { | 18 : observer_(observer), ui_session_(InputMethodManager::STATE_LOGIN_SCREEN) { |
19 notification_registrar_.Add(this, | 19 notification_registrar_.Add(this, |
20 chrome::NOTIFICATION_LOGIN_USER_CHANGED, | 20 chrome::NOTIFICATION_LOGIN_USER_CHANGED, |
21 content::NotificationService::AllSources()); | 21 content::NotificationService::AllSources()); |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 // | 100 // |
101 // We have to be careful not to overwrite both local and user prefs when | 101 // We have to be careful not to overwrite both local and user prefs when |
102 // preloaded engine is set. Note that it does not work to do nothing in | 102 // preloaded engine is set. Note that it does not work to do nothing in |
103 // InputMethodChanged() between chrome::NOTIFICATION_LOGIN_USER_CHANGED and | 103 // InputMethodChanged() between chrome::NOTIFICATION_LOGIN_USER_CHANGED and |
104 // chrome::NOTIFICATION_SESSION_STARTED because SESSION_STARTED is sent very | 104 // chrome::NOTIFICATION_SESSION_STARTED because SESSION_STARTED is sent very |
105 // early on Chrome crash/restart. | 105 // early on Chrome crash/restart. |
106 } | 106 } |
107 | 107 |
108 } // namespace input_method | 108 } // namespace input_method |
109 } // namespace chromeos | 109 } // namespace chromeos |
OLD | NEW |