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

Unified Diff: views/controls/textfield/native_textfield_win.cc

Issue 122002: Moving the WM_SETFOCUS message processing out of FocusManager (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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/controls/textfield/native_textfield_win.h ('k') | views/focus/focus_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/textfield/native_textfield_win.cc
===================================================================
--- views/controls/textfield/native_textfield_win.cc (revision 18286)
+++ views/controls/textfield/native_textfield_win.cc (working copy)
@@ -16,6 +16,7 @@
#include "views/controls/native/native_view_host.h"
#include "views/controls/textfield/native_textfield_win.h"
#include "views/controls/textfield/textfield.h"
+#include "views/focus/focus_manager.h"
#include "views/focus/focus_util_win.h"
#include "views/views_delegate.h"
#include "views/widget/widget.h"
@@ -667,6 +668,18 @@
}
}
+void NativeTextfieldWin::OnSetFocus(HWND hwnd) {
+ SetMsgHandled(FALSE); // We still want the default processing of the message.
+
+ views::FocusManager* focus_manager =
+ views::FocusManager::GetFocusManager(m_hWnd);
+ if (!focus_manager) {
+ NOTREACHED();
+ return;
+ }
+ focus_manager->SetFocusedView(textfield_);
+}
+
void NativeTextfieldWin::OnSysChar(TCHAR ch, UINT repeat_count, UINT flags) {
// Nearly all alt-<xxx> combos result in beeping rather than doing something
// useful, so we discard most. Exceptions:
« no previous file with comments | « views/controls/textfield/native_textfield_win.h ('k') | views/focus/focus_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698