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

Unified Diff: ui/aura/env.h

Issue 902123002: Fix initial hiding and centering cursor on Ozone (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
Index: ui/aura/env.h
diff --git a/ui/aura/env.h b/ui/aura/env.h
index 4ae2d694f0ff67db75c8dd8ec5a5f5d2f65edbea..8b6db019306ba34dddbb32b97818ac2d2e1f6694 100644
--- a/ui/aura/env.h
+++ b/ui/aura/env.h
@@ -42,6 +42,8 @@ class AURA_EXPORT Env : public ui::EventTarget, public base::SupportsUserData {
void AddObserver(EnvObserver* observer);
void RemoveObserver(EnvObserver* observer);
+ bool mouse_moved() const { return mouse_moved_; }
+
int mouse_button_flags() const { return mouse_button_flags_; }
void set_mouse_button_flags(int mouse_button_flags) {
mouse_button_flags_ = mouse_button_flags;
@@ -53,9 +55,7 @@ class AURA_EXPORT Env : public ui::EventTarget, public base::SupportsUserData {
// Gets/sets the last mouse location seen in a mouse event in the screen
// coordinates.
const gfx::Point& last_mouse_location() const { return last_mouse_location_; }
- void set_last_mouse_location(const gfx::Point& last_mouse_location) {
- last_mouse_location_ = last_mouse_location;
- }
+ void SetLastMouseLocation(const gfx::Point& last_mouse_location);
// Whether any touch device is currently down.
bool is_touch_down() const { return is_touch_down_; }
@@ -94,6 +94,9 @@ class AURA_EXPORT Env : public ui::EventTarget, public base::SupportsUserData {
ObserverList<EnvObserver> observers_;
+ // Whether the mouse was moved from its initial location.
+ bool mouse_moved_;
+
int mouse_button_flags_;
// Location of last mouse event, in screen coordinates.
gfx::Point last_mouse_location_;

Powered by Google App Engine
This is Rietveld 408576698