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

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

Issue 11421055: Add power-user keyboard mode for ChromeOS with Search key acting as a typical Fn key. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: SkyNits 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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 PrefService::SYNCABLE_PREF); 226 PrefService::SYNCABLE_PREF);
227 prefs->RegisterIntegerPref(prefs::kLanguageRemapControlKeyTo, 227 prefs->RegisterIntegerPref(prefs::kLanguageRemapControlKeyTo,
228 input_method::kControlKey, 228 input_method::kControlKey,
229 PrefService::SYNCABLE_PREF); 229 PrefService::SYNCABLE_PREF);
230 prefs->RegisterIntegerPref(prefs::kLanguageRemapAltKeyTo, 230 prefs->RegisterIntegerPref(prefs::kLanguageRemapAltKeyTo,
231 input_method::kAltKey, 231 input_method::kAltKey,
232 PrefService::SYNCABLE_PREF); 232 PrefService::SYNCABLE_PREF);
233 prefs->RegisterIntegerPref(prefs::kLanguageRemapCapsLockKeyTo, 233 prefs->RegisterIntegerPref(prefs::kLanguageRemapCapsLockKeyTo,
234 input_method::kCapsLockKey, 234 input_method::kCapsLockKey,
235 PrefService::SYNCABLE_PREF); 235 PrefService::SYNCABLE_PREF);
236 prefs->RegisterBooleanPref(prefs::kLanguageSearchKeyActsAsFunctionKey,
237 false,
238 PrefService::SYNCABLE_PREF);
236 // We don't sync the following keyboard prefs since they are not user- 239 // We don't sync the following keyboard prefs since they are not user-
237 // configurable. 240 // configurable.
238 prefs->RegisterBooleanPref(prefs::kLanguageXkbAutoRepeatEnabled, 241 prefs->RegisterBooleanPref(prefs::kLanguageXkbAutoRepeatEnabled,
239 true, 242 true,
240 PrefService::UNSYNCABLE_PREF); 243 PrefService::UNSYNCABLE_PREF);
241 prefs->RegisterIntegerPref(prefs::kLanguageXkbAutoRepeatDelay, 244 prefs->RegisterIntegerPref(prefs::kLanguageXkbAutoRepeatDelay,
242 language_prefs::kXkbAutoRepeatDelayInMs, 245 language_prefs::kXkbAutoRepeatDelayInMs,
243 PrefService::UNSYNCABLE_PREF); 246 PrefService::UNSYNCABLE_PREF);
244 prefs->RegisterIntegerPref(prefs::kLanguageXkbAutoRepeatInterval, 247 prefs->RegisterIntegerPref(prefs::kLanguageXkbAutoRepeatInterval,
245 language_prefs::kXkbAutoRepeatIntervalInMs, 248 language_prefs::kXkbAutoRepeatIntervalInMs,
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 language_prefs::kMozcBooleanPrefs[i].pref_name, prefs, callback); 361 language_prefs::kMozcBooleanPrefs[i].pref_name, prefs, callback);
359 } 362 }
360 for (size_t i = 0; i < language_prefs::kNumMozcMultipleChoicePrefs; ++i) { 363 for (size_t i = 0; i < language_prefs::kNumMozcMultipleChoicePrefs; ++i) {
361 mozc_multiple_choice_prefs_[i].Init( 364 mozc_multiple_choice_prefs_[i].Init(
362 language_prefs::kMozcMultipleChoicePrefs[i].pref_name, prefs, callback); 365 language_prefs::kMozcMultipleChoicePrefs[i].pref_name, prefs, callback);
363 } 366 }
364 for (size_t i = 0; i < language_prefs::kNumMozcIntegerPrefs; ++i) { 367 for (size_t i = 0; i < language_prefs::kNumMozcIntegerPrefs; ++i) {
365 mozc_integer_prefs_[i].Init( 368 mozc_integer_prefs_[i].Init(
366 language_prefs::kMozcIntegerPrefs[i].pref_name, prefs, callback); 369 language_prefs::kMozcIntegerPrefs[i].pref_name, prefs, callback);
367 } 370 }
371 search_key_acts_as_function_key_.Init(
372 prefs::kLanguageSearchKeyActsAsFunctionKey, prefs, callback);
368 xkb_auto_repeat_enabled_.Init( 373 xkb_auto_repeat_enabled_.Init(
369 prefs::kLanguageXkbAutoRepeatEnabled, prefs, callback); 374 prefs::kLanguageXkbAutoRepeatEnabled, prefs, callback);
370 xkb_auto_repeat_delay_pref_.Init( 375 xkb_auto_repeat_delay_pref_.Init(
371 prefs::kLanguageXkbAutoRepeatDelay, prefs, callback); 376 prefs::kLanguageXkbAutoRepeatDelay, prefs, callback);
372 xkb_auto_repeat_interval_pref_.Init( 377 xkb_auto_repeat_interval_pref_.Init(
373 prefs::kLanguageXkbAutoRepeatInterval, prefs, callback); 378 prefs::kLanguageXkbAutoRepeatInterval, prefs, callback);
374 379
375 enable_screen_lock_.Init(prefs::kEnableScreenLock, prefs, callback); 380 enable_screen_lock_.Init(prefs::kEnableScreenLock, prefs, callback);
376 381
377 enable_drm_.Init(prefs::kEnableCrosDRM, prefs, callback); 382 enable_drm_.Init(prefs::kEnableCrosDRM, prefs, callback);
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
763 768
764 input_method::AutoRepeatRate rate; 769 input_method::AutoRepeatRate rate;
765 rate.initial_delay_in_ms = xkb_auto_repeat_delay_pref_.GetValue(); 770 rate.initial_delay_in_ms = xkb_auto_repeat_delay_pref_.GetValue();
766 rate.repeat_interval_in_ms = xkb_auto_repeat_interval_pref_.GetValue(); 771 rate.repeat_interval_in_ms = xkb_auto_repeat_interval_pref_.GetValue();
767 DCHECK(rate.initial_delay_in_ms > 0); 772 DCHECK(rate.initial_delay_in_ms > 0);
768 DCHECK(rate.repeat_interval_in_ms > 0); 773 DCHECK(rate.repeat_interval_in_ms > 0);
769 input_method::XKeyboard::SetAutoRepeatRate(rate); 774 input_method::XKeyboard::SetAutoRepeatRate(rate);
770 } 775 }
771 776
772 } // namespace chromeos 777 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/preferences.h ('k') | chrome/browser/resources/options/chromeos/keyboard_overlay.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698