| Index: ui/aura/env.cc
|
| diff --git a/ui/aura/env.cc b/ui/aura/env.cc
|
| index 5e9411332e3aacd7299bd6c5c1a08fc6c58e8fce..9704b641579870d56bd2f201f6d192f8dca63a7f 100644
|
| --- a/ui/aura/env.cc
|
| +++ b/ui/aura/env.cc
|
| @@ -123,6 +123,15 @@ bool Env::IsMouseButtonDown() const {
|
| mouse_button_flags_ != 0;
|
| }
|
|
|
| +const gfx::Point& Env::last_mouse_location() {
|
| + if (mode_ == Mode::LOCAL || !get_last_mouse_location_from_mus_)
|
| + return last_mouse_location_;
|
| +
|
| + DCHECK(window_tree_client_);
|
| + last_mouse_location_ = window_tree_client_->GetCursorScreenPoint();
|
| + return last_mouse_location_;
|
| +}
|
| +
|
| void Env::SetWindowTreeClient(WindowTreeClient* window_tree_client) {
|
| // The WindowTreeClient should only be set once. Test code may need to change
|
| // the value after the fact, to do that use EnvTestHelper.
|
| @@ -155,6 +164,7 @@ Env::Env(Mode mode)
|
| : mode_(mode),
|
| mouse_button_flags_(0),
|
| is_touch_down_(false),
|
| + get_last_mouse_location_from_mus_(mode_ == Mode::MUS),
|
| input_state_lookup_(InputStateLookup::Create()),
|
| context_factory_(nullptr),
|
| context_factory_private_(nullptr) {
|
|
|