| 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 "ui/platform_window/win/win_window.h" | 5 #include "ui/platform_window/win/win_window.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 return nullptr; | 129 return nullptr; |
| 130 } | 130 } |
| 131 | 131 |
| 132 LRESULT WinWindow::OnMouseRange(UINT message, WPARAM w_param, LPARAM l_param) { | 132 LRESULT WinWindow::OnMouseRange(UINT message, WPARAM w_param, LPARAM l_param) { |
| 133 MSG msg = { hwnd(), message, w_param, l_param, | 133 MSG msg = { hwnd(), message, w_param, l_param, |
| 134 static_cast<DWORD>(GetMessageTime()), | 134 static_cast<DWORD>(GetMessageTime()), |
| 135 { CR_GET_X_LPARAM(l_param), CR_GET_Y_LPARAM(l_param) } }; | 135 { CR_GET_X_LPARAM(l_param), CR_GET_Y_LPARAM(l_param) } }; |
| 136 std::unique_ptr<Event> event = EventFromNative(msg); | 136 std::unique_ptr<Event> event = EventFromNative(msg); |
| 137 if (IsMouseEventFromTouch(message)) | 137 if (IsMouseEventFromTouch(message)) |
| 138 event->set_flags(event->flags() | EF_FROM_TOUCH); | 138 event->set_flags(event->flags() | EF_FROM_TOUCH); |
| 139 if (IsWindowsCursorHidden()) |
| 140 event->set_flags(event->flags() | EF_CURSOR_HIDDEN); |
| 139 if (!(event->flags() & ui::EF_IS_NON_CLIENT)) | 141 if (!(event->flags() & ui::EF_IS_NON_CLIENT)) |
| 140 delegate_->DispatchEvent(event.get()); | 142 delegate_->DispatchEvent(event.get()); |
| 141 SetMsgHandled(event->handled()); | 143 SetMsgHandled(event->handled()); |
| 142 return 0; | 144 return 0; |
| 143 } | 145 } |
| 144 | 146 |
| 145 LRESULT WinWindow::OnCaptureChanged(UINT message, | 147 LRESULT WinWindow::OnCaptureChanged(UINT message, |
| 146 WPARAM w_param, | 148 WPARAM w_param, |
| 147 LPARAM l_param) { | 149 LPARAM l_param) { |
| 148 delegate_->OnLostCapture(); | 150 delegate_->OnLostCapture(); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 | 200 |
| 199 namespace test { | 201 namespace test { |
| 200 | 202 |
| 201 // static | 203 // static |
| 202 void SetUsePopupAsRootWindowForTest(bool use) { | 204 void SetUsePopupAsRootWindowForTest(bool use) { |
| 203 use_popup_as_root_window_for_test = use; | 205 use_popup_as_root_window_for_test = use; |
| 204 } | 206 } |
| 205 | 207 |
| 206 } // namespace test | 208 } // namespace test |
| 207 } // namespace ui | 209 } // namespace ui |
| OLD | NEW |