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

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

Issue 9250023: Support for mousecontrol script (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: review feedback Created 8 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 | « no previous file | chrome/browser/chromeos/system/input_device_settings.h » ('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 "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/i18n/time_formatting.h" 8 #include "base/i18n/time_formatting.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/string_split.h" 10 #include "base/string_split.h"
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 if (!pref_name || *pref_name == prefs::kTapToClickEnabled) { 313 if (!pref_name || *pref_name == prefs::kTapToClickEnabled) {
314 bool enabled = tap_to_click_enabled_.GetValue(); 314 bool enabled = tap_to_click_enabled_.GetValue();
315 system::touchpad_settings::SetTapToClick(enabled); 315 system::touchpad_settings::SetTapToClick(enabled);
316 if (pref_name) 316 if (pref_name)
317 UMA_HISTOGRAM_BOOLEAN("Touchpad.TapToClick.Changed", enabled); 317 UMA_HISTOGRAM_BOOLEAN("Touchpad.TapToClick.Changed", enabled);
318 else 318 else
319 UMA_HISTOGRAM_BOOLEAN("Touchpad.TapToClick.Started", enabled); 319 UMA_HISTOGRAM_BOOLEAN("Touchpad.TapToClick.Started", enabled);
320 } 320 }
321 if (!pref_name || *pref_name == prefs::kTouchpadSensitivity) { 321 if (!pref_name || *pref_name == prefs::kTouchpadSensitivity) {
322 int sensitivity = sensitivity_.GetValue(); 322 int sensitivity = sensitivity_.GetValue();
323 system::touchpad_settings::SetSensitivity(sensitivity); 323 system::pointer_settings::SetSensitivity(sensitivity);
324 if (pref_name) { 324 if (pref_name) {
325 UMA_HISTOGRAM_CUSTOM_COUNTS( 325 UMA_HISTOGRAM_CUSTOM_COUNTS(
326 "Touchpad.Sensitivity.Changed", sensitivity, 1, 5, 5); 326 "Touchpad.Sensitivity.Changed", sensitivity, 1, 5, 5);
327 } else { 327 } else {
328 UMA_HISTOGRAM_CUSTOM_COUNTS( 328 UMA_HISTOGRAM_CUSTOM_COUNTS(
329 "Touchpad.Sensitivity.Started", sensitivity, 1, 5, 5); 329 "Touchpad.Sensitivity.Started", sensitivity, 1, 5, 5);
330 } 330 }
331 } 331 }
332 if (!pref_name || *pref_name == prefs::kPrimaryMouseButtonRight) { 332 if (!pref_name || *pref_name == prefs::kPrimaryMouseButtonRight) {
333 const bool right = primary_mouse_button_right_.GetValue(); 333 const bool right = primary_mouse_button_right_.GetValue();
334 system::mouse_settings::SetPrimaryButtonRight(right); 334 system::mouse_settings::SetPrimaryButtonRight(right);
335 if (pref_name) 335 if (pref_name)
336 UMA_HISTOGRAM_BOOLEAN("Mouse.PrimaryButtonLeft.Changed", right); 336 UMA_HISTOGRAM_BOOLEAN("Mouse.PrimaryButtonRight.Changed", right);
337 else 337 else
338 UMA_HISTOGRAM_BOOLEAN("Mouse.PrimaryButtonLeft.Started", right); 338 UMA_HISTOGRAM_BOOLEAN("Mouse.PrimaryButtonRight.Started", right);
339 } 339 }
340 340
341 // We don't handle prefs::kLanguageCurrentInputMethod and PreviousInputMethod 341 // We don't handle prefs::kLanguageCurrentInputMethod and PreviousInputMethod
342 // here. 342 // here.
343 343
344 if (!pref_name || *pref_name == prefs::kLanguageHotkeyNextEngineInMenu) { 344 if (!pref_name || *pref_name == prefs::kLanguageHotkeyNextEngineInMenu) {
345 SetLanguageConfigStringListAsCSV( 345 SetLanguageConfigStringListAsCSV(
346 language_prefs::kHotKeySectionName, 346 language_prefs::kHotKeySectionName,
347 language_prefs::kNextEngineInMenuConfigName, 347 language_prefs::kNextEngineInMenuConfigName,
348 language_hotkey_next_engine_in_menu_.GetValue()); 348 language_hotkey_next_engine_in_menu_.GetValue());
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 613
614 // Remove invalid prefs. 614 // Remove invalid prefs.
615 DictionaryPrefUpdate updater(prefs, prefs::kLanguagePreferredVirtualKeyboard); 615 DictionaryPrefUpdate updater(prefs, prefs::kLanguagePreferredVirtualKeyboard);
616 DictionaryValue* pref_value = updater.Get(); 616 DictionaryValue* pref_value = updater.Get();
617 for (size_t i = 0; i < layouts_to_remove.size(); ++i) { 617 for (size_t i = 0; i < layouts_to_remove.size(); ++i) {
618 pref_value->RemoveWithoutPathExpansion(layouts_to_remove[i], NULL); 618 pref_value->RemoveWithoutPathExpansion(layouts_to_remove[i], NULL);
619 } 619 }
620 } 620 }
621 621
622 } // namespace chromeos 622 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/system/input_device_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698