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

Side by Side Diff: chrome/browser/chromeos/preferences.cc

Issue 1552743003: Add chrome.inputMethodPrivate.onImeMenuActivationChanged API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
OLDNEW
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/preferences.h" 5 #include "chrome/browser/chromeos/preferences.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/autoclick/autoclick_controller.h" 9 #include "ash/autoclick/autoclick_controller.h"
10 #include "ash/display/display_manager.h" 10 #include "ash/display/display_manager.h"
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 if (!value.empty()) { 581 if (!value.empty()) {
582 split_values = base::SplitString(value, ",", base::TRIM_WHITESPACE, 582 split_values = base::SplitString(value, ",", base::TRIM_WHITESPACE,
583 base::SPLIT_WANT_ALL); 583 base::SPLIT_WANT_ALL);
584 } 584 }
585 ime_state_->SetEnabledExtensionImes(&split_values); 585 ime_state_->SetEnabledExtensionImes(&split_values);
586 } 586 }
587 587
588 if (pref_name == prefs::kLangugaeImeMenuActivated && 588 if (pref_name == prefs::kLangugaeImeMenuActivated &&
589 (reason == REASON_PREF_CHANGED || reason == REASON_ACTIVE_USER_CHANGED)) { 589 (reason == REASON_PREF_CHANGED || reason == REASON_ACTIVE_USER_CHANGED)) {
590 const bool activated = ime_menu_activated_.GetValue(); 590 const bool activated = ime_menu_activated_.GetValue();
591 if (activated) 591 input_method::InputMethodManager::Get()->ImeMenuActivationChanged(
592 DVLOG(1) << "IME menu is activated."; 592 activated);
593 else
594 DVLOG(1) << "IME menu is deactivated.";
595 // TODO(azurewei): Fire inputMethodPrivate API event.
596 } 593 }
597 594
598 if (user_is_active) { 595 if (user_is_active) {
599 system::InputDeviceSettings::Get()->UpdateTouchpadSettings( 596 system::InputDeviceSettings::Get()->UpdateTouchpadSettings(
600 touchpad_settings); 597 touchpad_settings);
601 system::InputDeviceSettings::Get()->UpdateMouseSettings(mouse_settings); 598 system::InputDeviceSettings::Get()->UpdateMouseSettings(mouse_settings);
602 } 599 }
603 600
604 if (user_is_primary_ && (reason != REASON_PREF_CHANGED || 601 if (user_is_primary_ && (reason != REASON_PREF_CHANGED ||
605 pref_name == prefs::kWakeOnWifiDarkConnect)) { 602 pref_name == prefs::kWakeOnWifiDarkConnect)) {
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
729 touch_hud_projection_enabled_.SetValue(enabled); 726 touch_hud_projection_enabled_.SetValue(enabled);
730 } 727 }
731 728
732 void Preferences::ActiveUserChanged(const user_manager::User* active_user) { 729 void Preferences::ActiveUserChanged(const user_manager::User* active_user) {
733 if (active_user != user_) 730 if (active_user != user_)
734 return; 731 return;
735 ApplyPreferences(REASON_ACTIVE_USER_CHANGED, ""); 732 ApplyPreferences(REASON_ACTIVE_USER_CHANGED, "");
736 } 733 }
737 734
738 } // namespace chromeos 735 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698