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

Side by Side Diff: views/touchui/touch_factory.cc

Issue 7825026: Revert "Currently, base/timer.cc calls PostTask with FROM_HERE as the Location, (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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 | « views/repeat_controller.cc ('k') | webkit/fileapi/obfuscated_file_system_file_util.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "views/touchui/touch_factory.h" 5 #include "views/touchui/touch_factory.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 #include <gdk/gdkx.h> 8 #include <gdk/gdkx.h>
9 #include <X11/cursorfont.h> 9 #include <X11/cursorfont.h>
10 #include <X11/extensions/XInput.h> 10 #include <X11/extensions/XInput.h>
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 344
345 void TouchFactory::SetCursorVisible(bool show, bool start_timer) { 345 void TouchFactory::SetCursorVisible(bool show, bool start_timer) {
346 #if defined(TOUCH_UI) 346 #if defined(TOUCH_UI)
347 if (!base::MessagePumpForUI::HasXInput2()) 347 if (!base::MessagePumpForUI::HasXInput2())
348 return; 348 return;
349 #endif 349 #endif
350 350
351 // The cursor is going to be shown. Reset the timer for hiding it. 351 // The cursor is going to be shown. Reset the timer for hiding it.
352 if (show && start_timer) { 352 if (show && start_timer) {
353 cursor_timer_.Stop(); 353 cursor_timer_.Stop();
354 cursor_timer_.Start( 354 cursor_timer_.Start(base::TimeDelta::FromSeconds(kCursorIdleSeconds),
355 FROM_HERE, base::TimeDelta::FromSeconds(kCursorIdleSeconds),
356 this, &TouchFactory::HideCursorForInactivity); 355 this, &TouchFactory::HideCursorForInactivity);
357 } else { 356 } else {
358 cursor_timer_.Stop(); 357 cursor_timer_.Stop();
359 } 358 }
360 359
361 if (show == is_cursor_visible_) 360 if (show == is_cursor_visible_)
362 return; 361 return;
363 362
364 is_cursor_visible_ = show; 363 is_cursor_visible_ = show;
365 364
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 float* max) { 436 float* max) {
438 if (valuator_lookup_[deviceid][tp] >= 0) { 437 if (valuator_lookup_[deviceid][tp] >= 0) {
439 *min = touch_param_min_[deviceid][tp]; 438 *min = touch_param_min_[deviceid][tp];
440 *max = touch_param_max_[deviceid][tp]; 439 *max = touch_param_max_[deviceid][tp];
441 return true; 440 return true;
442 } 441 }
443 return false; 442 return false;
444 } 443 }
445 444
446 } // namespace views 445 } // namespace views
OLDNEW
« no previous file with comments | « views/repeat_controller.cc ('k') | webkit/fileapi/obfuscated_file_system_file_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698