| 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 "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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 | 116 |
| 117 LRESULT WinWindow::OnCaptureChanged(UINT message, | 117 LRESULT WinWindow::OnCaptureChanged(UINT message, |
| 118 WPARAM w_param, | 118 WPARAM w_param, |
| 119 LPARAM l_param) { | 119 LPARAM l_param) { |
| 120 delegate_->OnLostCapture(); | 120 delegate_->OnLostCapture(); |
| 121 return 0; | 121 return 0; |
| 122 } | 122 } |
| 123 | 123 |
| 124 LRESULT WinWindow::OnKeyEvent(UINT message, WPARAM w_param, LPARAM l_param) { | 124 LRESULT WinWindow::OnKeyEvent(UINT message, WPARAM w_param, LPARAM l_param) { |
| 125 MSG msg = { hwnd(), message, w_param, l_param }; | 125 MSG msg = { hwnd(), message, w_param, l_param }; |
| 126 KeyEvent event(msg, message == WM_CHAR); | 126 KeyEvent event(msg); |
| 127 delegate_->DispatchEvent(&event); | 127 delegate_->DispatchEvent(&event); |
| 128 SetMsgHandled(event.handled()); | 128 SetMsgHandled(event.handled()); |
| 129 return 0; | 129 return 0; |
| 130 } | 130 } |
| 131 | 131 |
| 132 LRESULT WinWindow::OnNCActivate(UINT message, WPARAM w_param, LPARAM l_param) { | 132 LRESULT WinWindow::OnNCActivate(UINT message, WPARAM w_param, LPARAM l_param) { |
| 133 delegate_->OnActivationChanged(!!w_param); | 133 delegate_->OnActivationChanged(!!w_param); |
| 134 return DefWindowProc(hwnd(), message, w_param, l_param); | 134 return DefWindowProc(hwnd(), message, w_param, l_param); |
| 135 } | 135 } |
| 136 | 136 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 | 169 |
| 170 namespace test { | 170 namespace test { |
| 171 | 171 |
| 172 // static | 172 // static |
| 173 void SetUsePopupAsRootWindowForTest(bool use) { | 173 void SetUsePopupAsRootWindowForTest(bool use) { |
| 174 use_popup_as_root_window_for_test = use; | 174 use_popup_as_root_window_for_test = use; |
| 175 } | 175 } |
| 176 | 176 |
| 177 } // namespace test | 177 } // namespace test |
| 178 } // namespace ui | 178 } // namespace ui |
| OLD | NEW |