| Index: ui/aura/test/ui_controls_factory_ozone.cc
|
| diff --git a/ui/aura/test/ui_controls_factory_ozone.cc b/ui/aura/test/ui_controls_factory_ozone.cc
|
| index 403757b947503c7c2cf344760960eb90af5a6937..cc3589e4778bbc6d7d27b45374e40899a740ffec 100644
|
| --- a/ui/aura/test/ui_controls_factory_ozone.cc
|
| +++ b/ui/aura/test/ui_controls_factory_ozone.cc
|
| @@ -21,6 +21,9 @@ namespace aura {
|
| namespace test {
|
| namespace {
|
|
|
| +// Mask of the mouse buttons currently down.
|
| +unsigned g_button_down_mask = 0;
|
| +
|
| class UIControlsOzone : public ui_controls::UIControlsAura {
|
| public:
|
| UIControlsOzone(WindowTreeHost* host) : host_(host) {}
|
| @@ -42,7 +45,7 @@ class UIControlsOzone : public ui_controls::UIControlsAura {
|
| bool alt,
|
| bool command,
|
| const base::Closure& closure) override {
|
| - int flags = button_down_mask_;
|
| + int flags = g_button_down_mask;
|
|
|
| if (control) {
|
| flags |= ui::EF_CONTROL_DOWN;
|
| @@ -111,12 +114,12 @@ class UIControlsOzone : public ui_controls::UIControlsAura {
|
|
|
| ui::EventType event_type;
|
|
|
| - if (button_down_mask_)
|
| + if (g_button_down_mask)
|
| event_type = ui::ET_MOUSE_DRAGGED;
|
| else
|
| event_type = ui::ET_MOUSE_MOVED;
|
|
|
| - PostMouseEvent(event_type, host_location, button_down_mask_, 0);
|
| + PostMouseEvent(event_type, host_location, g_button_down_mask, 0);
|
|
|
| RunClosureAfterAllPendingUIEvents(closure);
|
| return true;
|
| @@ -157,14 +160,14 @@ class UIControlsOzone : public ui_controls::UIControlsAura {
|
| }
|
|
|
| if (state & ui_controls::DOWN) {
|
| - button_down_mask_ |= flag;
|
| + g_button_down_mask |= flag;
|
| PostMouseEvent(ui::ET_MOUSE_PRESSED, host_location,
|
| - button_down_mask_ | flag, flag);
|
| + g_button_down_mask | flag, flag);
|
| }
|
| if (state & ui_controls::UP) {
|
| - button_down_mask_ &= ~flag;
|
| + g_button_down_mask &= ~flag;
|
| PostMouseEvent(ui::ET_MOUSE_RELEASED, host_location,
|
| - button_down_mask_ | flag, flag);
|
| + g_button_down_mask | flag, flag);
|
| }
|
|
|
| RunClosureAfterAllPendingUIEvents(closure);
|
| @@ -229,9 +232,6 @@ class UIControlsOzone : public ui_controls::UIControlsAura {
|
|
|
| WindowTreeHost* host_;
|
|
|
| - // Mask of the mouse buttons currently down.
|
| - unsigned button_down_mask_ = 0;
|
| -
|
| DISALLOW_COPY_AND_ASSIGN(UIControlsOzone);
|
| };
|
|
|
|
|