| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/location.h" | 6 #include "base/location.h" |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
| 10 #include "base/threading/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 gfx::Point host_location = root_location; | 109 gfx::Point host_location = root_location; |
| 110 host_->ConvertPointToHost(&host_location); | 110 host_->ConvertPointToHost(&host_location); |
| 111 | 111 |
| 112 ui::EventType event_type; | 112 ui::EventType event_type; |
| 113 | 113 |
| 114 if (button_down_mask_) | 114 if (button_down_mask_) |
| 115 event_type = ui::ET_MOUSE_DRAGGED; | 115 event_type = ui::ET_MOUSE_DRAGGED; |
| 116 else | 116 else |
| 117 event_type = ui::ET_MOUSE_MOVED; | 117 event_type = ui::ET_MOUSE_MOVED; |
| 118 | 118 |
| 119 PostMouseEvent(event_type, host_location, 0, 0); | 119 PostMouseEvent(event_type, host_location, button_down_mask_, 0); |
| 120 | 120 |
| 121 RunClosureAfterAllPendingUIEvents(closure); | 121 RunClosureAfterAllPendingUIEvents(closure); |
| 122 return true; | 122 return true; |
| 123 } | 123 } |
| 124 bool SendMouseEvents(ui_controls::MouseButton type, int state) override { | 124 bool SendMouseEvents(ui_controls::MouseButton type, int state) override { |
| 125 return SendMouseEventsNotifyWhenDone(type, state, base::Closure()); | 125 return SendMouseEventsNotifyWhenDone(type, state, base::Closure()); |
| 126 } | 126 } |
| 127 bool SendMouseEventsNotifyWhenDone( | 127 bool SendMouseEventsNotifyWhenDone( |
| 128 ui_controls::MouseButton type, | 128 ui_controls::MouseButton type, |
| 129 int state, | 129 int state, |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 }; | 237 }; |
| 238 | 238 |
| 239 } // namespace | 239 } // namespace |
| 240 | 240 |
| 241 ui_controls::UIControlsAura* CreateUIControlsAura(WindowTreeHost* host) { | 241 ui_controls::UIControlsAura* CreateUIControlsAura(WindowTreeHost* host) { |
| 242 return new UIControlsOzone(host); | 242 return new UIControlsOzone(host); |
| 243 } | 243 } |
| 244 | 244 |
| 245 } // namespace test | 245 } // namespace test |
| 246 } // namespace aura | 246 } // namespace aura |
| OLD | NEW |