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

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

Issue 7812036: Update base/timer.h code to pass through Location from call sites. (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(base::TimeDelta::FromSeconds(kCursorIdleSeconds), 354 cursor_timer_.Start(
355 FROM_HERE, base::TimeDelta::FromSeconds(kCursorIdleSeconds),
355 this, &TouchFactory::HideCursorForInactivity); 356 this, &TouchFactory::HideCursorForInactivity);
356 } else { 357 } else {
357 cursor_timer_.Stop(); 358 cursor_timer_.Stop();
358 } 359 }
359 360
360 if (show == is_cursor_visible_) 361 if (show == is_cursor_visible_)
361 return; 362 return;
362 363
363 is_cursor_visible_ = show; 364 is_cursor_visible_ = show;
364 365
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 float* max) { 437 float* max) {
437 if (valuator_lookup_[deviceid][tp] >= 0) { 438 if (valuator_lookup_[deviceid][tp] >= 0) {
438 *min = touch_param_min_[deviceid][tp]; 439 *min = touch_param_min_[deviceid][tp];
439 *max = touch_param_max_[deviceid][tp]; 440 *max = touch_param_max_[deviceid][tp];
440 return true; 441 return true;
441 } 442 }
442 return false; 443 return false;
443 } 444 }
444 445
445 } // namespace views 446 } // 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