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

Unified Diff: motion_event_coalescer.h

Issue 6902072: wm: Update a lot of code to use structs from geometry.h. (Closed) Base URL: ssh://gitrw.chromium.org:9222/window_manager.git@master
Patch Set: move override-redirect stacking and visibility into Window Created 9 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « modality_handler.h ('k') | motion_event_coalescer.cc » ('j') | window.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: motion_event_coalescer.h
diff --git a/motion_event_coalescer.h b/motion_event_coalescer.h
index bd3a7d77a12aca23eb9a083b7ce39a78c0d9081d..fc043972c86627c4bbfd843a3142a9f2bf577611 100644
--- a/motion_event_coalescer.h
+++ b/motion_event_coalescer.h
@@ -7,6 +7,7 @@
#include "base/scoped_ptr.h"
#include "window_manager/callback.h"
+#include "window_manager/geometry.h"
namespace window_manager {
@@ -21,8 +22,9 @@ class MotionEventCoalescer {
MotionEventCoalescer(EventLoop* event_loop, Closure* cb, int timeout_ms);
~MotionEventCoalescer();
- int x() const { return x_; }
- int y() const { return y_; }
+ const Point& position() const { return position_; }
+ int x() const { return position_.x; }
+ int y() const { return position_.y; }
void set_synchronous(bool synchronous) {
synchronous_ = synchronous;
@@ -39,7 +41,7 @@ class MotionEventCoalescer {
// Store a position. This should be called in response to each motion
// event.
- void StorePosition(int x, int y);
+ void StorePosition(const Point& pos);
private:
// Invoked by Stop() and by the destructor to remove the timer. If
@@ -66,8 +68,7 @@ class MotionEventCoalescer {
bool have_queued_position_;
// The most-recently-received position.
- int x_;
- int y_;
+ Point position_;
// Callback that gets periodically invoked when there's a new position to
// handle.
« no previous file with comments | « modality_handler.h ('k') | motion_event_coalescer.cc » ('j') | window.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698