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

Side by Side Diff: views/controls/combobox/native_combobox_win.h

Issue 150051: Fixing focus problems with the combobox (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 5 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/combobox/combobox.h ('k') | views/controls/combobox/native_combobox_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. 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 VIEWS_CONTROLS_COMBOBOX_NATIVE_COMBOBOX_WIN_H_ 5 #ifndef VIEWS_CONTROLS_COMBOBOX_NATIVE_COMBOBOX_WIN_H_
6 #define VIEWS_CONTROLS_COMBOBOX_NATIVE_COMBOBOX_WIN_H_ 6 #define VIEWS_CONTROLS_COMBOBOX_NATIVE_COMBOBOX_WIN_H_
7 7
8 #include "views/controls/combobox/native_combobox_wrapper.h" 8 #include "views/controls/combobox/native_combobox_wrapper.h"
9 #include "views/controls/native_control_win.h" 9 #include "views/controls/native_control_win.h"
10 10
11 namespace views { 11 namespace views {
12 12
13 class NativeComboboxWin : public NativeControlWin, 13 class NativeComboboxWin : public NativeControlWin,
14 public NativeComboboxWrapper { 14 public NativeComboboxWrapper {
15 public: 15 public:
16 explicit NativeComboboxWin(Combobox* combobox); 16 explicit NativeComboboxWin(Combobox* combobox);
17 virtual ~NativeComboboxWin(); 17 virtual ~NativeComboboxWin();
18 18
19 // Overridden from NativeComboboxWrapper: 19 // Overridden from NativeComboboxWrapper:
20 virtual void UpdateFromModel(); 20 virtual void UpdateFromModel();
21 virtual void UpdateSelectedItem(); 21 virtual void UpdateSelectedItem();
22 virtual void UpdateEnabled(); 22 virtual void UpdateEnabled();
23 virtual int GetSelectedItem() const; 23 virtual int GetSelectedItem() const;
24 virtual bool IsDropdownOpen() const; 24 virtual bool IsDropdownOpen() const;
25 virtual gfx::Size GetPreferredSize() const; 25 virtual gfx::Size GetPreferredSize() const;
26 virtual View* GetView(); 26 virtual View* GetView();
27 virtual void SetFocus(); 27 virtual void SetFocus();
28 virtual gfx::NativeView GetTestingHandle() const;
28 29
29 protected: 30 protected:
30 // Overridden from NativeControlWin: 31 // Overridden from NativeControlWin:
31 virtual bool ProcessMessage(UINT message, 32 virtual bool ProcessMessage(UINT message,
32 WPARAM w_param, 33 WPARAM w_param,
33 LPARAM l_param, 34 LPARAM l_param,
34 LRESULT* result); 35 LRESULT* result);
35 virtual void CreateNativeControl(); 36 virtual void CreateNativeControl();
36 virtual void NativeControlCreated(HWND native_control); 37 virtual void NativeControlCreated(HWND native_control);
37 38
38 private: 39 private:
39 void UpdateFont(); 40 void UpdateFont();
40 41
41 // The combobox we are bound to. 42 // The combobox we are bound to.
42 Combobox* combobox_; 43 Combobox* combobox_;
43 44
44 // The min width, in pixels, for the text content. 45 // The min width, in pixels, for the text content.
45 int content_width_; 46 int content_width_;
46 47
47 DISALLOW_COPY_AND_ASSIGN(NativeComboboxWin); 48 DISALLOW_COPY_AND_ASSIGN(NativeComboboxWin);
48 }; 49 };
49 50
50 } // namespace views 51 } // namespace views
51 52
52 #endif // VIEWS_CONTROLS_COMBOBOX_NATIVE_COMBOBOX_WIN_H_ 53 #endif // VIEWS_CONTROLS_COMBOBOX_NATIVE_COMBOBOX_WIN_H_
OLDNEW
« no previous file with comments | « views/controls/combobox/combobox.h ('k') | views/controls/combobox/native_combobox_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698