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

Side by Side Diff: chrome/browser/chromeos/input_method/mode_indicator_controller.cc

Issue 150203015: Split out InputMethodMenuManager from InputMethodManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 | Annotate | Revision Log
OLDNEW
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/ime/mode_indicator_view.h" 7 #include "ash/ime/mode_indicator_view.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/shell_window_ids.h" 9 #include "ash/shell_window_ids.h"
10 #include "ash/wm/window_util.h" 10 #include "ash/wm/window_util.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 return g_mode_indicator_observer_for_testing_; 85 return g_mode_indicator_observer_for_testing_;
86 } 86 }
87 87
88 void ModeIndicatorController::InputMethodChanged(InputMethodManager* manager, 88 void ModeIndicatorController::InputMethodChanged(InputMethodManager* manager,
89 bool show_message) { 89 bool show_message) {
90 if (!show_message) 90 if (!show_message)
91 return; 91 return;
92 ShowModeIndicator(); 92 ShowModeIndicator();
93 } 93 }
94 94
95 void ModeIndicatorController::InputMethodPropertyChanged(
96 InputMethodManager* manager) {
97 // Do nothing.
98 }
99
100 void ModeIndicatorController::ShowModeIndicator() { 95 void ModeIndicatorController::ShowModeIndicator() {
101 // TODO(komatsu): When this is permanently enabled by defalut, 96 // TODO(komatsu): When this is permanently enabled by defalut,
102 // delete command_line.h and chromeos_switches.h from the header 97 // delete command_line.h and chromeos_switches.h from the header
103 // files. 98 // files.
104 if (CommandLine::ForCurrentProcess()->HasSwitch( 99 if (CommandLine::ForCurrentProcess()->HasSwitch(
105 switches::kDisableIMEModeIndicator)) 100 switches::kDisableIMEModeIndicator))
106 return; 101 return;
107 102
108 // TODO(komatsu): Show the mode indicator in the right bottom of the 103 // TODO(komatsu): Show the mode indicator in the right bottom of the
109 // display when the launch bar is hidden and the focus is out. To 104 // display when the launch bar is hidden and the focus is out. To
(...skipping 18 matching lines...) Expand all
128 views::Widget* mi_widget = mi_view->GetWidget(); 123 views::Widget* mi_widget = mi_view->GetWidget();
129 if (GetModeIndicatorObserverForTesting()) 124 if (GetModeIndicatorObserverForTesting())
130 GetModeIndicatorObserverForTesting()->AddModeIndicatorWidget(mi_widget); 125 GetModeIndicatorObserverForTesting()->AddModeIndicatorWidget(mi_widget);
131 126
132 mi_observer_->AddModeIndicatorWidget(mi_widget); 127 mi_observer_->AddModeIndicatorWidget(mi_widget);
133 mi_view->ShowAndFadeOut(); 128 mi_view->ShowAndFadeOut();
134 } 129 }
135 130
136 } // namespace input_method 131 } // namespace input_method
137 } // namespace chromeos 132 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698