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

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

Issue 329033: Fix compile failures in Chrome OS and Views builds. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 1 month 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/renderer_host/render_crash_handler_host_linux.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) 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/synaptics_library.h" 5 #include "chrome/browser/chromeos/synaptics_library.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "chrome/browser/chrome_thread.h" 8 #include "chrome/browser/chrome_thread.h"
9 #include "chrome/browser/chromeos/cros_library.h" 9 #include "chrome/browser/chromeos/cros_library.h"
10 10
(...skipping 18 matching lines...) Expand all
29 value = 1; 29 value = 1;
30 if (value > 10) 30 if (value > 10)
31 value = 10; 31 value = 10;
32 SetParameter(param, value); 32 SetParameter(param, value);
33 } 33 }
34 34
35 void SynapticsLibrary::SetParameter(SynapticsParameter param, int value) { 35 void SynapticsLibrary::SetParameter(SynapticsParameter param, int value) {
36 if (CrosLibrary::loaded()) { 36 if (CrosLibrary::loaded()) {
37 // This calls SetSynapticsParameter in the cros library which is 37 // This calls SetSynapticsParameter in the cros library which is
38 // potentially time consuming. So we run this on the FILE thread. 38 // potentially time consuming. So we run this on the FILE thread.
39 MessageLoop* loop = ChromeThread::GetMessageLoop(ChromeThread::FILE); 39 ChromeThread::PostTask(
40 if (loop) { 40 ChromeThread::FILE, FROM_HERE,
41 loop->PostTask(FROM_HERE, NewRunnableFunction( 41 NewRunnableFunction(&SetSynapticsParameter, param, value));
42 &SetSynapticsParameter, param, value));
43 }
44 } 42 }
45 } 43 }
46 44
47 } // namespace chromeos 45 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/renderer_host/render_crash_handler_host_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698