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

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

Issue 10831204: Fix for number of ChromeOS browser_tests that were failing in BVTs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | « no previous file | chrome/browser/ui/webui/options2/browser_options_handler.cc » ('j') | 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) 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 "ash/display/display_controller.h" 7 #include "ash/display/display_controller.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "base/chromeos/chromeos_version.h" 9 #include "base/chromeos/chromeos_version.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 64
65 Preferences::~Preferences() {} 65 Preferences::~Preferences() {}
66 66
67 // static 67 // static
68 void Preferences::RegisterUserPrefs(PrefService* prefs) { 68 void Preferences::RegisterUserPrefs(PrefService* prefs) {
69 std::string hardware_keyboard_id; 69 std::string hardware_keyboard_id;
70 // TODO(yusukes): Remove the runtime hack. 70 // TODO(yusukes): Remove the runtime hack.
71 if (base::chromeos::IsRunningOnChromeOS()) { 71 if (base::chromeos::IsRunningOnChromeOS()) {
72 input_method::InputMethodManager* manager = 72 input_method::InputMethodManager* manager =
73 input_method::InputMethodManager::GetInstance(); 73 input_method::InputMethodManager::GetInstance();
74 hardware_keyboard_id = 74 if (manager) {
75 manager->GetInputMethodUtil()->GetHardwareInputMethodId(); 75 hardware_keyboard_id =
76 manager->GetInputMethodUtil()->GetHardwareInputMethodId();
77 }
76 } else { 78 } else {
77 hardware_keyboard_id = "xkb:us::eng"; // only for testing. 79 hardware_keyboard_id = "xkb:us::eng"; // only for testing.
78 } 80 }
79 81
80 const bool enable_tap_to_click_default = IsLumpy(); 82 const bool enable_tap_to_click_default = IsLumpy();
81 prefs->RegisterBooleanPref(prefs::kTapToClickEnabled, 83 prefs->RegisterBooleanPref(prefs::kTapToClickEnabled,
82 enable_tap_to_click_default, 84 enable_tap_to_click_default,
83 PrefService::SYNCABLE_PREF); 85 PrefService::SYNCABLE_PREF);
84 prefs->RegisterBooleanPref(prefs::kEnableTouchpadThreeFingerClick, 86 prefs->RegisterBooleanPref(prefs::kEnableTouchpadThreeFingerClick,
85 false, 87 false,
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after
697 699
698 input_method::AutoRepeatRate rate; 700 input_method::AutoRepeatRate rate;
699 rate.initial_delay_in_ms = xkb_auto_repeat_delay_pref_.GetValue(); 701 rate.initial_delay_in_ms = xkb_auto_repeat_delay_pref_.GetValue();
700 rate.repeat_interval_in_ms = xkb_auto_repeat_interval_pref_.GetValue(); 702 rate.repeat_interval_in_ms = xkb_auto_repeat_interval_pref_.GetValue();
701 DCHECK(rate.initial_delay_in_ms > 0); 703 DCHECK(rate.initial_delay_in_ms > 0);
702 DCHECK(rate.repeat_interval_in_ms > 0); 704 DCHECK(rate.repeat_interval_in_ms > 0);
703 input_method::XKeyboard::SetAutoRepeatRate(rate); 705 input_method::XKeyboard::SetAutoRepeatRate(rate);
704 } 706 }
705 707
706 } // namespace chromeos 708 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/webui/options2/browser_options_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698