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

Unified Diff: views/widget/widget_win.cc

Issue 6034002: Replace Textfield::Keystroke with views::KeyEvent (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: key_code, ET_KEY_PRESS for WM_CHAR Created 9 years, 12 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « views/examples/textfield_example.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/widget/widget_win.cc
diff --git a/views/widget/widget_win.cc b/views/widget/widget_win.cc
index 8bf6a3f595e2c966a733caa3c4cf82b97f441c4d..5aef351e43248d7dff962f360a9e0d706376c20e 100644
--- a/views/widget/widget_win.cc
+++ b/views/widget/widget_win.cc
@@ -662,7 +662,8 @@ void WidgetWin::OnInitMenuPopup(HMENU menu,
void WidgetWin::OnKeyDown(TCHAR c, UINT rep_cnt, UINT flags) {
KeyEvent event(Event::ET_KEY_PRESSED, app::KeyboardCodeForWindowsKeyCode(c),
- KeyEvent::GetKeyStateFlags(), rep_cnt, flags);
+ KeyEvent::GetKeyStateFlags(), rep_cnt, flags,
+ WM_KEYDOWN);
RootView* root_view = GetFocusedViewRootView();
if (!root_view)
root_view = root_view_.get();
@@ -672,7 +673,8 @@ void WidgetWin::OnKeyDown(TCHAR c, UINT rep_cnt, UINT flags) {
void WidgetWin::OnKeyUp(TCHAR c, UINT rep_cnt, UINT flags) {
KeyEvent event(Event::ET_KEY_RELEASED, app::KeyboardCodeForWindowsKeyCode(c),
- KeyEvent::GetKeyStateFlags(), rep_cnt, flags);
+ KeyEvent::GetKeyStateFlags(), rep_cnt, flags,
+ WM_KEYUP);
RootView* root_view = GetFocusedViewRootView();
if (!root_view)
root_view = root_view_.get();
« no previous file with comments | « views/examples/textfield_example.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698