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

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

Issue 11594008: Revert 173477 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years 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 (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 "base/chromeos/chromeos_version.h" 7 #include "base/chromeos/chromeos_version.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/i18n/time_formatting.h" 9 #include "base/i18n/time_formatting.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 default_download_to_drive); 519 default_download_to_drive);
520 } 520 }
521 521
522 if (!pref_name || *pref_name == prefs::kLanguagePreferredLanguages) { 522 if (!pref_name || *pref_name == prefs::kLanguagePreferredLanguages) {
523 // Unlike kLanguagePreloadEngines and some other input method 523 // Unlike kLanguagePreloadEngines and some other input method
524 // preferencs, we don't need to send this to ibus-daemon. 524 // preferencs, we don't need to send this to ibus-daemon.
525 } 525 }
526 526
527 if (!pref_name || *pref_name == prefs::kLanguageXkbAutoRepeatEnabled) { 527 if (!pref_name || *pref_name == prefs::kLanguageXkbAutoRepeatEnabled) {
528 const bool enabled = xkb_auto_repeat_enabled_.GetValue(); 528 const bool enabled = xkb_auto_repeat_enabled_.GetValue();
529 input_method::GetInputMethodManager()->GetXKeyboard()-> 529 input_method::XKeyboard::SetAutoRepeatEnabled(enabled);
530 SetAutoRepeatEnabled(enabled);
531 } 530 }
532 if (!pref_name || ((*pref_name == prefs::kLanguageXkbAutoRepeatDelay) || 531 if (!pref_name || ((*pref_name == prefs::kLanguageXkbAutoRepeatDelay) ||
533 (*pref_name == prefs::kLanguageXkbAutoRepeatInterval))) { 532 (*pref_name == prefs::kLanguageXkbAutoRepeatInterval))) {
534 UpdateAutoRepeatRate(); 533 UpdateAutoRepeatRate();
535 } 534 }
536 535
537 if (!pref_name) { 536 if (!pref_name) {
538 SetInputMethodList(); 537 SetInputMethodList();
539 } else if (*pref_name == prefs::kLanguagePreloadEngines) { 538 } else if (*pref_name == prefs::kLanguagePreloadEngines) {
540 SetLanguageConfigStringListAsCSV(language_prefs::kGeneralSectionName, 539 SetLanguageConfigStringListAsCSV(language_prefs::kGeneralSectionName,
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 void Preferences::UpdateAutoRepeatRate() { 764 void Preferences::UpdateAutoRepeatRate() {
766 // Avoid setting repeat rate on desktop dev environment. 765 // Avoid setting repeat rate on desktop dev environment.
767 if (!base::chromeos::IsRunningOnChromeOS()) 766 if (!base::chromeos::IsRunningOnChromeOS())
768 return; 767 return;
769 768
770 input_method::AutoRepeatRate rate; 769 input_method::AutoRepeatRate rate;
771 rate.initial_delay_in_ms = xkb_auto_repeat_delay_pref_.GetValue(); 770 rate.initial_delay_in_ms = xkb_auto_repeat_delay_pref_.GetValue();
772 rate.repeat_interval_in_ms = xkb_auto_repeat_interval_pref_.GetValue(); 771 rate.repeat_interval_in_ms = xkb_auto_repeat_interval_pref_.GetValue();
773 DCHECK(rate.initial_delay_in_ms > 0); 772 DCHECK(rate.initial_delay_in_ms > 0);
774 DCHECK(rate.repeat_interval_in_ms > 0); 773 DCHECK(rate.repeat_interval_in_ms > 0);
775 input_method::GetInputMethodManager()->GetXKeyboard()-> 774 input_method::XKeyboard::SetAutoRepeatRate(rate);
776 SetAutoRepeatRate(rate);
777 } 775 }
778 776
779 } // namespace chromeos 777 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/input_method/xkeyboard_unittest.cc ('k') | chrome/chrome_tests_unit.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698