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

Side by Side Diff: chrome/browser/chromeos/status/input_method_menu.cc

Issue 6243009: Deprecate Get/SetKeyboardLayoutPerWindow APIs (Chrome part). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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
« no previous file with comments | « chrome/browser/chromeos/cros/mock_keyboard_library.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/status/input_method_menu.h" 5 #include "chrome/browser/chromeos/status/input_method_menu.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "app/l10n_util.h" 10 #include "app/l10n_util.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 // 0 when |model_| is NULL. 129 // 0 when |model_| is NULL.
130 ALLOW_THIS_IN_INITIALIZER_LIST(input_method_menu_(this)), 130 ALLOW_THIS_IN_INITIALIZER_LIST(input_method_menu_(this)),
131 minimum_input_method_menu_width_(0), 131 minimum_input_method_menu_width_(0),
132 pref_service_(pref_service), 132 pref_service_(pref_service),
133 is_browser_mode_(is_browser_mode), 133 is_browser_mode_(is_browser_mode),
134 is_screen_locker_mode_(is_screen_locker_mode), 134 is_screen_locker_mode_(is_screen_locker_mode),
135 is_out_of_box_experience_mode_(is_out_of_box_experience_mode) { 135 is_out_of_box_experience_mode_(is_out_of_box_experience_mode) {
136 DCHECK(input_method_descriptors_.get() && 136 DCHECK(input_method_descriptors_.get() &&
137 !input_method_descriptors_->empty()); 137 !input_method_descriptors_->empty());
138 138
139 // Use the same keyboard layout on all windows.
140 CrosLibrary::Get()->GetKeyboardLibrary()->SetKeyboardLayoutPerWindow(false);
141
142 // Sync current and previous input methods on Chrome prefs with ibus-daemon. 139 // Sync current and previous input methods on Chrome prefs with ibus-daemon.
143 // InputMethodChanged() will be called soon and the indicator will be updated. 140 // InputMethodChanged() will be called soon and the indicator will be updated.
144 InputMethodLibrary* library = CrosLibrary::Get()->GetInputMethodLibrary(); 141 InputMethodLibrary* library = CrosLibrary::Get()->GetInputMethodLibrary();
145 if (pref_service && is_browser_mode_) { 142 if (pref_service && is_browser_mode_) {
146 previous_input_method_pref_.Init( 143 previous_input_method_pref_.Init(
147 prefs::kLanguagePreviousInputMethod, pref_service, this); 144 prefs::kLanguagePreviousInputMethod, pref_service, this);
148 const std::string previous_input_method_id = 145 const std::string previous_input_method_id =
149 previous_input_method_pref_.GetValue(); 146 previous_input_method_pref_.GetValue();
150 if (!previous_input_method_id.empty()) { 147 if (!previous_input_method_id.empty()) {
151 library->ChangeInputMethod(previous_input_method_id); 148 library->ChangeInputMethod(previous_input_method_id);
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 CrosLibrary::Get()->GetInputMethodLibrary()->RemoveObserver(this); 610 CrosLibrary::Get()->GetInputMethodLibrary()->RemoveObserver(this);
614 } 611 }
615 } 612 }
616 613
617 void InputMethodMenu::SetMinimumWidth(int width) { 614 void InputMethodMenu::SetMinimumWidth(int width) {
618 // On the OOBE network selection screen, fixed width menu would be preferable. 615 // On the OOBE network selection screen, fixed width menu would be preferable.
619 minimum_input_method_menu_width_ = width; 616 minimum_input_method_menu_width_ = width;
620 } 617 }
621 618
622 } // namespace chromeos 619 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/cros/mock_keyboard_library.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698