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

Side by Side Diff: views/controls/textfield/native_textfield_win.h

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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « views/controls/native_control_win.cc ('k') | views/controls/textfield/native_textfield_win.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 (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 #ifndef VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_WIN_H_ 5 #ifndef VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_WIN_H_
6 #define VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_WIN_H_ 6 #define VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_WIN_H_
7 7
8 #include <atlbase.h> 8 #include <atlbase.h>
9 #include <atlapp.h> 9 #include <atlapp.h>
10 #include <atlcrack.h> 10 #include <atlcrack.h>
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 MSG_WM_LBUTTONDOWN(OnLButtonDown) 67 MSG_WM_LBUTTONDOWN(OnLButtonDown)
68 MSG_WM_LBUTTONUP(OnLButtonUp) 68 MSG_WM_LBUTTONUP(OnLButtonUp)
69 MSG_WM_MBUTTONDOWN(OnNonLButtonDown) 69 MSG_WM_MBUTTONDOWN(OnNonLButtonDown)
70 MSG_WM_MOUSEMOVE(OnMouseMove) 70 MSG_WM_MOUSEMOVE(OnMouseMove)
71 MSG_WM_MOUSELEAVE(OnMouseLeave) 71 MSG_WM_MOUSELEAVE(OnMouseLeave)
72 MESSAGE_HANDLER_EX(WM_MOUSEWHEEL, OnMouseWheel) 72 MESSAGE_HANDLER_EX(WM_MOUSEWHEEL, OnMouseWheel)
73 MSG_WM_NCCALCSIZE(OnNCCalcSize) 73 MSG_WM_NCCALCSIZE(OnNCCalcSize)
74 MSG_WM_NCPAINT(OnNCPaint) 74 MSG_WM_NCPAINT(OnNCPaint)
75 MSG_WM_RBUTTONDOWN(OnNonLButtonDown) 75 MSG_WM_RBUTTONDOWN(OnNonLButtonDown)
76 MSG_WM_PASTE(OnPaste) 76 MSG_WM_PASTE(OnPaste)
77 MSG_WM_SETFOCUS(OnSetFocus)
77 MSG_WM_SYSCHAR(OnSysChar) // WM_SYSxxx == WM_xxx with ALT down 78 MSG_WM_SYSCHAR(OnSysChar) // WM_SYSxxx == WM_xxx with ALT down
78 MSG_WM_SYSKEYDOWN(OnKeyDown) 79 MSG_WM_SYSKEYDOWN(OnKeyDown)
79 END_MSG_MAP() 80 END_MSG_MAP()
80 81
81 // Menu::Delegate 82 // Menu::Delegate
82 virtual bool IsCommandEnabled(int id) const; 83 virtual bool IsCommandEnabled(int id) const;
83 virtual void ExecuteCommand(int id); 84 virtual void ExecuteCommand(int id);
84 85
85 private: 86 private:
86 // This object freezes repainting of the edit until the object is destroyed. 87 // This object freezes repainting of the edit until the object is destroyed.
(...skipping 28 matching lines...) Expand all
115 void OnLButtonDblClk(UINT keys, const CPoint& point); 116 void OnLButtonDblClk(UINT keys, const CPoint& point);
116 void OnLButtonDown(UINT keys, const CPoint& point); 117 void OnLButtonDown(UINT keys, const CPoint& point);
117 void OnLButtonUp(UINT keys, const CPoint& point); 118 void OnLButtonUp(UINT keys, const CPoint& point);
118 void OnMouseLeave(); 119 void OnMouseLeave();
119 LRESULT OnMouseWheel(UINT message, WPARAM w_param, LPARAM l_param); 120 LRESULT OnMouseWheel(UINT message, WPARAM w_param, LPARAM l_param);
120 void OnMouseMove(UINT keys, const CPoint& point); 121 void OnMouseMove(UINT keys, const CPoint& point);
121 int OnNCCalcSize(BOOL w_param, LPARAM l_param); 122 int OnNCCalcSize(BOOL w_param, LPARAM l_param);
122 void OnNCPaint(HRGN region); 123 void OnNCPaint(HRGN region);
123 void OnNonLButtonDown(UINT keys, const CPoint& point); 124 void OnNonLButtonDown(UINT keys, const CPoint& point);
124 void OnPaste(); 125 void OnPaste();
126 void OnSetFocus(HWND hwnd);
125 void OnSysChar(TCHAR ch, UINT repeat_count, UINT flags); 127 void OnSysChar(TCHAR ch, UINT repeat_count, UINT flags);
126 128
127 // Helper function for OnChar() and OnKeyDown() that handles keystrokes that 129 // Helper function for OnChar() and OnKeyDown() that handles keystrokes that
128 // could change the text in the edit. 130 // could change the text in the edit.
129 void HandleKeystroke(UINT message, TCHAR key, UINT repeat_count, UINT flags); 131 void HandleKeystroke(UINT message, TCHAR key, UINT repeat_count, UINT flags);
130 132
131 // Every piece of code that can change the edit should call these functions 133 // Every piece of code that can change the edit should call these functions
132 // before and after the change. These functions determine if anything 134 // before and after the change. These functions determine if anything
133 // meaningful changed, and do any necessary updating and notification. 135 // meaningful changed, and do any necessary updating and notification.
134 void OnBeforePossibleChange(); 136 void OnBeforePossibleChange();
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 NativeViewHost* container_view_; 197 NativeViewHost* container_view_;
196 198
197 COLORREF bg_color_; 199 COLORREF bg_color_;
198 200
199 DISALLOW_COPY_AND_ASSIGN(NativeTextfieldWin); 201 DISALLOW_COPY_AND_ASSIGN(NativeTextfieldWin);
200 }; 202 };
201 203
202 } // namespace views 204 } // namespace views
203 205
204 #endif // VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_WIN_H_ 206 #endif // VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_WIN_H_
OLDNEW
« no previous file with comments | « views/controls/native_control_win.cc ('k') | views/controls/textfield/native_textfield_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698