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

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

Issue 248021: Reverting 27379. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 2 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 | « chrome/browser/chrome_plugin_host.cc ('k') | chrome/browser/dom_ui/chrome_url_data_manager.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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/touchpad.h" 5 #include "chrome/browser/chromeos/touchpad.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/string_util.h" 11 #include "base/string_util.h"
12 #include "base/process_util.h" 12 #include "base/process_util.h"
13 #include "chrome/browser/browser_process.h" 13 #include "chrome/browser/browser_process.h"
14 #include "chrome/browser/chrome_thread.h" 14 #include "chrome/browser/chrome_thread.h"
15 #include "chrome/common/notification_service.h" 15 #include "chrome/common/notification_service.h"
16 #include "chrome/common/pref_member.h" 16 #include "chrome/common/pref_member.h"
17 #include "chrome/common/pref_names.h" 17 #include "chrome/common/pref_names.h"
18 #include "chrome/common/pref_service.h" 18 #include "chrome/common/pref_service.h"
19 19
20 // Allows InvokeLater without adding refcounting. The object is only deleted 20 // Allows InvokeLater without adding refcounting. The object is only deleted
21 // when its last InvokeLater is run anyway. 21 // when its last InvokeLater is run anyway.
22 template <> 22 template<>
23 struct RunnableMethodTraits<Touchpad> { 23 void RunnableMethodTraits<Touchpad>::RetainCallee(
24 void RetainCallee(Touchpad*) {} 24 Touchpad* remover) {
25 void ReleaseCallee(Touchpad*) {} 25 }
26 }; 26 template<>
27 void RunnableMethodTraits<Touchpad>::ReleaseCallee(
28 Touchpad* remover) {
29 }
27 30
28 // static 31 // static
29 void Touchpad::RegisterUserPrefs(PrefService* prefs) { 32 void Touchpad::RegisterUserPrefs(PrefService* prefs) {
30 prefs->RegisterBooleanPref(prefs::kTapToClickEnabled, false); 33 prefs->RegisterBooleanPref(prefs::kTapToClickEnabled, false);
31 prefs->RegisterBooleanPref(prefs::kVertEdgeScrollEnabled, false); 34 prefs->RegisterBooleanPref(prefs::kVertEdgeScrollEnabled, false);
32 prefs->RegisterIntegerPref(prefs::kTouchpadSpeedFactor, 5); 35 prefs->RegisterIntegerPref(prefs::kTouchpadSpeedFactor, 5);
33 prefs->RegisterIntegerPref(prefs::kTouchpadSensitivity, 5); 36 prefs->RegisterIntegerPref(prefs::kTouchpadSensitivity, 5);
34 } 37 }
35 38
36 void Touchpad::Init(PrefService* prefs) { 39 void Touchpad::Init(PrefService* prefs) {
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 // FingerHigh value of 25 to 70 inversely. 130 // FingerHigh value of 25 to 70 inversely.
128 int value = sensitivity_.GetValue(); 131 int value = sensitivity_.GetValue();
129 if (value < 1) 132 if (value < 1)
130 value = 1; 133 value = 1;
131 if (value > 10) 134 if (value > 10)
132 value = 10; 135 value = 10;
133 // Convert from 1-10 to 70-25. 136 // Convert from 1-10 to 70-25.
134 double d = (15 - value) * 5; 137 double d = (15 - value) * 5;
135 SetSynclientParam("FingerHigh", d); 138 SetSynclientParam("FingerHigh", d);
136 } 139 }
OLDNEW
« no previous file with comments | « chrome/browser/chrome_plugin_host.cc ('k') | chrome/browser/dom_ui/chrome_url_data_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698