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

Side by Side Diff: chrome/views/controls/button/native_button_win.h

Issue 45042: Fix for native button focus bug (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
2 // source code is governed by a BSD-style license that can be found in the 2 // source code is governed by a BSD-style license that can be found in the
3 // LICENSE file. 3 // LICENSE file.
4 4
5 #ifndef CHROME_VIEWS_CONTROLS_BUTTON_NATIVE_BUTTON_WIN_H_ 5 #ifndef CHROME_VIEWS_CONTROLS_BUTTON_NATIVE_BUTTON_WIN_H_
6 #define CHROME_VIEWS_CONTROLS_BUTTON_NATIVE_BUTTON_WIN_H_ 6 #define CHROME_VIEWS_CONTROLS_BUTTON_NATIVE_BUTTON_WIN_H_
7 7
8 #include "chrome/views/controls/native_control_win.h" 8 #include "chrome/views/controls/native_control_win.h"
9 #include "chrome/views/controls/button/native_button_wrapper.h" 9 #include "chrome/views/controls/button/native_button_wrapper.h"
10 10
11 namespace views { 11 namespace views {
12 12
13 // A View that hosts a native Windows button. 13 // A View that hosts a native Windows button.
14 class NativeButtonWin : public NativeControlWin, 14 class NativeButtonWin : public NativeControlWin,
15 public NativeButtonWrapper { 15 public NativeButtonWrapper {
16 public: 16 public:
17 explicit NativeButtonWin(NativeButton* native_button); 17 explicit NativeButtonWin(NativeButton* native_button);
18 virtual ~NativeButtonWin(); 18 virtual ~NativeButtonWin();
19 19
20 // Overridden from NativeButtonWrapper: 20 // Overridden from NativeButtonWrapper:
21 virtual void UpdateLabel(); 21 virtual void UpdateLabel();
22 virtual void UpdateFont(); 22 virtual void UpdateFont();
23 virtual void UpdateDefault(); 23 virtual void UpdateDefault();
24 virtual View* GetView(); 24 virtual View* GetView();
25 virtual void SetFocus();
25 26
26 // Overridden from View: 27 // Overridden from View:
27 virtual gfx::Size GetPreferredSize(); 28 virtual gfx::Size GetPreferredSize();
28 29
29 // Overridden from NativeControlWin: 30 // Overridden from NativeControlWin:
30 virtual LRESULT ProcessMessage(UINT message, 31 virtual LRESULT ProcessMessage(UINT message,
31 WPARAM w_param, 32 WPARAM w_param,
32 LPARAM l_param); 33 LPARAM l_param);
33 virtual bool OnKeyDown(int vkey); 34 virtual bool OnKeyDown(int vkey);
34 35
(...skipping 19 matching lines...) Expand all
54 virtual ~NativeCheckboxWin(); 55 virtual ~NativeCheckboxWin();
55 56
56 // Overridden from View: 57 // Overridden from View:
57 virtual gfx::Size GetPreferredSize(); 58 virtual gfx::Size GetPreferredSize();
58 59
59 // Overridden from NativeButtonWrapper: 60 // Overridden from NativeButtonWrapper:
60 virtual void UpdateChecked(); 61 virtual void UpdateChecked();
61 virtual void SetPushed(bool pushed); 62 virtual void SetPushed(bool pushed);
62 63
63 // Overridden from NativeControlWin: 64 // Overridden from NativeControlWin:
65 virtual void SetFocus();
64 virtual LRESULT ProcessMessage(UINT message, 66 virtual LRESULT ProcessMessage(UINT message,
65 WPARAM w_param, 67 WPARAM w_param,
66 LPARAM l_param); 68 LPARAM l_param);
67 69
68 protected: 70 protected:
69 virtual void CreateNativeControl(); 71 virtual void CreateNativeControl();
70 virtual void NativeControlCreated(HWND control_hwnd); 72 virtual void NativeControlCreated(HWND control_hwnd);
71 virtual bool IsCheckbox() const { return true; } 73 virtual bool IsCheckbox() const { return true; }
72 74
73 private: 75 private:
(...skipping 13 matching lines...) Expand all
87 // Overridden from NativeCheckboxWin: 89 // Overridden from NativeCheckboxWin:
88 virtual void CreateNativeControl(); 90 virtual void CreateNativeControl();
89 91
90 private: 92 private:
91 DISALLOW_COPY_AND_ASSIGN(NativeRadioButtonWin); 93 DISALLOW_COPY_AND_ASSIGN(NativeRadioButtonWin);
92 }; 94 };
93 95
94 } // namespace views 96 } // namespace views
95 97
96 #endif // #ifndef CHROME_VIEWS_CONTROLS_BUTTON_NATIVE_BUTTON_WIN_H_ 98 #endif // #ifndef CHROME_VIEWS_CONTROLS_BUTTON_NATIVE_BUTTON_WIN_H_
OLDNEW
« no previous file with comments | « chrome/views/controls/button/native_button.cc ('k') | chrome/views/controls/button/native_button_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698