OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/mode_indicator_controller.h" | 5 #include "chrome/browser/chromeos/input_method/mode_indicator_controller.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/shell_window_ids.h" | 8 #include "ash/shell_window_ids.h" |
9 #include "ash/wm/window_util.h" | 9 #include "ash/wm/window_util.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 g_mode_indicator_observer_for_testing_ = observer; | 77 g_mode_indicator_observer_for_testing_ = observer; |
78 } | 78 } |
79 | 79 |
80 // static | 80 // static |
81 ModeIndicatorObserverInterface* | 81 ModeIndicatorObserverInterface* |
82 ModeIndicatorController::GetModeIndicatorObserverForTesting() { | 82 ModeIndicatorController::GetModeIndicatorObserverForTesting() { |
83 return g_mode_indicator_observer_for_testing_; | 83 return g_mode_indicator_observer_for_testing_; |
84 } | 84 } |
85 | 85 |
86 void ModeIndicatorController::InputMethodChanged(InputMethodManager* manager, | 86 void ModeIndicatorController::InputMethodChanged(InputMethodManager* manager, |
| 87 Profile* /* profile */, |
87 bool show_message) { | 88 bool show_message) { |
88 if (!show_message) | 89 if (!show_message) |
89 return; | 90 return; |
90 ShowModeIndicator(); | 91 ShowModeIndicator(); |
91 } | 92 } |
92 | 93 |
93 void ModeIndicatorController::ShowModeIndicator() { | 94 void ModeIndicatorController::ShowModeIndicator() { |
94 // TODO(komatsu): Show the mode indicator in the right bottom of the | 95 // TODO(komatsu): Show the mode indicator in the right bottom of the |
95 // display when the launch bar is hidden and the focus is out. To | 96 // display when the launch bar is hidden and the focus is out. To |
96 // implement it, we should consider to use message center or system | 97 // implement it, we should consider to use message center or system |
(...skipping 18 matching lines...) Expand all Loading... |
115 views::Widget* mi_widget = mi_view->GetWidget(); | 116 views::Widget* mi_widget = mi_view->GetWidget(); |
116 if (GetModeIndicatorObserverForTesting()) | 117 if (GetModeIndicatorObserverForTesting()) |
117 GetModeIndicatorObserverForTesting()->AddModeIndicatorWidget(mi_widget); | 118 GetModeIndicatorObserverForTesting()->AddModeIndicatorWidget(mi_widget); |
118 | 119 |
119 mi_observer_->AddModeIndicatorWidget(mi_widget); | 120 mi_observer_->AddModeIndicatorWidget(mi_widget); |
120 mi_view->ShowAndFadeOut(); | 121 mi_view->ShowAndFadeOut(); |
121 } | 122 } |
122 | 123 |
123 } // namespace input_method | 124 } // namespace input_method |
124 } // namespace chromeos | 125 } // namespace chromeos |
OLD | NEW |