Chromium Code Reviews| Index: ui/aura/env.h |
| diff --git a/ui/aura/env.h b/ui/aura/env.h |
| index 3d2bccc124dbac27933370cd125314fdb3162c43..c4a51038a9dc26b78136957110d34bdd6e35fa5a 100644 |
| --- a/ui/aura/env.h |
| +++ b/ui/aura/env.h |
| @@ -32,6 +32,7 @@ class EnvTestHelper; |
| class EnvObserver; |
| class InputStateLookup; |
| +class MusMouseLocationUpdater; |
| class Window; |
| class WindowPort; |
| class WindowTreeClient; |
| @@ -74,7 +75,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_; } |
| + const gfx::Point& last_mouse_location(); |
|
sadrul
2017/02/01 17:30:14
Alternatively, maybe we could keep this const, and
sky
2017/02/01 17:58:09
Done.
|
| void set_last_mouse_location(const gfx::Point& last_mouse_location) { |
| last_mouse_location_ = last_mouse_location; |
| } |
| @@ -112,6 +113,7 @@ class AURA_EXPORT Env : public ui::EventTarget, public base::SupportsUserData { |
| class ActiveFocusClientWindowObserver; |
| friend class test::EnvTestHelper; |
| + friend class MusMouseLocationUpdater; |
| friend class Window; |
| friend class WindowTreeHost; |
| @@ -147,6 +149,10 @@ class AURA_EXPORT Env : public ui::EventTarget, public base::SupportsUserData { |
| // Location of last mouse event, in screen coordinates. |
| gfx::Point last_mouse_location_; |
| bool is_touch_down_; |
| + bool get_last_mouse_location_from_mus_; |
| + // This may be set to true in tests to force using |last_mouse_location_| |
| + // rather than querying WindowTreeClient. |
| + bool always_use_last_mouse_location_ = false; |
| std::unique_ptr<InputStateLookup> input_state_lookup_; |
| std::unique_ptr<ui::PlatformEventSource> event_source_; |