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

Side by Side Diff: ui/aura/test/ui_controls_factory_ozone.cc

Issue 2499103002: Use remembered mouse button state when simulating a mouse move in Ozone. (Closed)
Patch Set: Rebasing... Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/views/drag_and_drop_interactive_uitest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/drag_and_drop_interactive_uitest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698