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

Side by Side Diff: src/platform/window_manager/motion_event_coalescer.cc

Issue 501116: wm: Update namespace and header define guards. (Closed)
Patch Set: move using directive inside of namespace for consistency Created 11 years 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
OLDNEW
1 // Copyright (c) 2009 The Chromium OS Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium OS 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 "window_manager/motion_event_coalescer.h" 5 #include "window_manager/motion_event_coalescer.h"
6 6
7 #include "chromeos/obsolete_logging.h" 7 #include "chromeos/obsolete_logging.h"
8 8
9 namespace chromeos { 9 namespace window_manager {
10
11 using chromeos::Closure;
10 12
11 MotionEventCoalescer::MotionEventCoalescer(Closure* cb, int timeout_ms) 13 MotionEventCoalescer::MotionEventCoalescer(Closure* cb, int timeout_ms)
12 : timer_id_(0), 14 : timer_id_(0),
13 timeout_ms_(timeout_ms), 15 timeout_ms_(timeout_ms),
14 have_queued_position_(false), 16 have_queued_position_(false),
15 x_(0), 17 x_(0),
16 y_(0), 18 y_(0),
17 cb_(cb) { 19 cb_(cb) {
18 CHECK(cb); 20 CHECK(cb);
19 CHECK_GT(timeout_ms, 0); 21 CHECK_GT(timeout_ms, 0);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 } 67 }
66 68
67 gboolean MotionEventCoalescer::HandleTimer() { 69 gboolean MotionEventCoalescer::HandleTimer() {
68 if (have_queued_position_) { 70 if (have_queued_position_) {
69 cb_->Run(); 71 cb_->Run();
70 have_queued_position_ = false; 72 have_queued_position_ = false;
71 } 73 }
72 return TRUE; 74 return TRUE;
73 } 75 }
74 76
75 } // namespace chromeos 77 } // namespace window_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698