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

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

Issue 251012: Assert that thread-safe reference counting is used with... (Closed) Base URL: svn://svn.chromium.org/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 void RunnableMethodTraits<Touchpad>::RetainCallee( 23 struct RunnableMethodTraits<Touchpad> {
24 Touchpad* remover) { 24 void RetainCallee(Touchpad*) {}
25 } 25 void ReleaseCallee(Touchpad*) {}
26 template<> 26 };
27 void RunnableMethodTraits<Touchpad>::ReleaseCallee(
28 Touchpad* remover) {
29 }
30 27
31 // static 28 // static
32 void Touchpad::RegisterUserPrefs(PrefService* prefs) { 29 void Touchpad::RegisterUserPrefs(PrefService* prefs) {
33 prefs->RegisterBooleanPref(prefs::kTapToClickEnabled, false); 30 prefs->RegisterBooleanPref(prefs::kTapToClickEnabled, false);
34 prefs->RegisterBooleanPref(prefs::kVertEdgeScrollEnabled, false); 31 prefs->RegisterBooleanPref(prefs::kVertEdgeScrollEnabled, false);
35 prefs->RegisterIntegerPref(prefs::kTouchpadSpeedFactor, 5); 32 prefs->RegisterIntegerPref(prefs::kTouchpadSpeedFactor, 5);
36 prefs->RegisterIntegerPref(prefs::kTouchpadSensitivity, 5); 33 prefs->RegisterIntegerPref(prefs::kTouchpadSensitivity, 5);
37 } 34 }
38 35
39 void Touchpad::Init(PrefService* prefs) { 36 void Touchpad::Init(PrefService* prefs) {
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 // FingerHigh value of 25 to 70 inversely. 127 // FingerHigh value of 25 to 70 inversely.
131 int value = sensitivity_.GetValue(); 128 int value = sensitivity_.GetValue();
132 if (value < 1) 129 if (value < 1)
133 value = 1; 130 value = 1;
134 if (value > 10) 131 if (value > 10)
135 value = 10; 132 value = 10;
136 // Convert from 1-10 to 70-25. 133 // Convert from 1-10 to 70-25.
137 double d = (15 - value) * 5; 134 double d = (15 - value) * 5;
138 SetSynclientParam("FingerHigh", d); 135 SetSynclientParam("FingerHigh", d);
139 } 136 }
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