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

Unified Diff: ui/base/event.h

Issue 10828133: Desktop Aura: Allow tab drags out of window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup Created 8 years, 4 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 | « ui/base/cocoa/events_mac.mm ('k') | ui/base/event.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/event.h
diff --git a/ui/base/event.h b/ui/base/event.h
index 43fb253efb76b38a6d07e242a7759e709d3c5b6d..d7b2c2ce7f00610fd9214fc2ceea31fdbbf512be 100644
--- a/ui/base/event.h
+++ b/ui/base/event.h
@@ -136,6 +136,13 @@ class UI_EXPORT LocatedEvent : public Event {
gfx::Point location() const { return location_; }
gfx::Point root_location() const { return root_location_; }
+ bool valid_system_location() const { return valid_system_location_; }
+ void set_system_location(const gfx::Point& loc) {
+ valid_system_location_ = true;
+ system_location_ = loc;
+ }
+ const gfx::Point& system_location() const { return system_location_; }
+
// Applies |root_transform| to the event.
// This is applied to both |location_| and |root_location_|.
virtual void UpdateForRootTransform(const Transform& root_transform);
@@ -150,7 +157,11 @@ class UI_EXPORT LocatedEvent : public Event {
LocatedEvent(const LocatedEvent& model, T* source, T* target)
: Event(model),
location_(model.location_),
- root_location_(model.root_location_) {
+ root_location_(model.root_location_),
+ valid_system_location_(model.valid_system_location_),
+ system_location_(model.system_location_) {
+ // TODO(erg): May need to create system_location_ by converting location to
+ // system coordinates here.
if (target && target != source)
T::ConvertPointToTarget(source, target, &location_);
}
@@ -166,7 +177,14 @@ class UI_EXPORT LocatedEvent : public Event {
gfx::Point location_;
+ // |location_| multiplied by an optional transformation matrix for
+ // rotations, animations and skews.
gfx::Point root_location_;
+
+ // |location_| in underlying system screen coordinates. This can be invalid
+ // |during synthesized events if a location isn't explicitly set.
+ bool valid_system_location_;
+ gfx::Point system_location_;
};
class UI_EXPORT MouseEvent : public LocatedEvent {
« no previous file with comments | « ui/base/cocoa/events_mac.mm ('k') | ui/base/event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698