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

Unified Diff: ui/aura/env.h

Issue 2657283003: mash: make Env::last_mouse_location() accurate for Mus (Closed)
Patch Set: fix test Created 3 years, 11 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/aura/BUILD.gn ('k') | ui/aura/env.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « ui/aura/BUILD.gn ('k') | ui/aura/env.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698