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

Side by Side Diff: ui/platform_window/win/win_window.cc

Issue 663203006: Send the proper event time when dispatching mouse event on windows aura. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months 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 | « no previous file | 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 "ui/platform_window/win/win_window.h" 5 #include "ui/platform_window/win/win_window.h"
6 6
7 #include "ui/events/event.h" 7 #include "ui/events/event.h"
8 #include "ui/events/event_utils.h" 8 #include "ui/events/event_utils.h"
9 #include "ui/gfx/win/msg_util.h" 9 #include "ui/gfx/win/msg_util.h"
10 #include "ui/platform_window/platform_window_delegate.h" 10 #include "ui/platform_window/platform_window_delegate.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 100
101 void WinWindow::Minimize() {} 101 void WinWindow::Minimize() {}
102 102
103 void WinWindow::Restore() {} 103 void WinWindow::Restore() {}
104 104
105 void WinWindow::SetCursor(PlatformCursor cursor) {} 105 void WinWindow::SetCursor(PlatformCursor cursor) {}
106 106
107 void WinWindow::MoveCursorTo(const gfx::Point& location) {} 107 void WinWindow::MoveCursorTo(const gfx::Point& location) {}
108 108
109 LRESULT WinWindow::OnMouseRange(UINT message, WPARAM w_param, LPARAM l_param) { 109 LRESULT WinWindow::OnMouseRange(UINT message, WPARAM w_param, LPARAM l_param) {
110 MSG msg = { hwnd(), message, w_param, l_param, 0, 110 MSG msg = { hwnd(), message, w_param, l_param, GetMessageTime(),
111 { CR_GET_X_LPARAM(l_param), CR_GET_Y_LPARAM(l_param) } }; 111 { CR_GET_X_LPARAM(l_param), CR_GET_Y_LPARAM(l_param) } };
112 MouseEvent event(msg); 112 MouseEvent event(msg);
113 if (IsMouseEventFromTouch(message)) 113 if (IsMouseEventFromTouch(message))
114 event.set_flags(event.flags() | EF_FROM_TOUCH); 114 event.set_flags(event.flags() | EF_FROM_TOUCH);
115 if (!(event.flags() & ui::EF_IS_NON_CLIENT)) 115 if (!(event.flags() & ui::EF_IS_NON_CLIENT))
116 delegate_->DispatchEvent(&event); 116 delegate_->DispatchEvent(&event);
117 SetMsgHandled(event.handled()); 117 SetMsgHandled(event.handled());
118 return 0; 118 return 0;
119 } 119 }
120 120
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 173
174 namespace test { 174 namespace test {
175 175
176 // static 176 // static
177 void SetUsePopupAsRootWindowForTest(bool use) { 177 void SetUsePopupAsRootWindowForTest(bool use) {
178 use_popup_as_root_window_for_test = use; 178 use_popup_as_root_window_for_test = use;
179 } 179 }
180 180
181 } // namespace test 181 } // namespace test
182 } // namespace ui 182 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698