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

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

Issue 404203003: Distinguish between keystroke and character events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: IsCharFromNative() for Mac build Created 6 years, 4 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 | « ui/keyboard/keyboard_util.cc ('k') | ui/platform_window/x11/x11_window.cc » ('j') | 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « ui/keyboard/keyboard_util.cc ('k') | ui/platform_window/x11/x11_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698