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