| OLD | NEW |
| 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_GTK_H_ | 5 #ifndef VIEWS_CONTROLS_COMBOBOX_NATIVE_COMBOBOX_GTK_H_ |
| 6 #define VIEWS_CONTROLS_COMBOBOX_NATIVE_COMBOBOX_GTK_H_ | 6 #define VIEWS_CONTROLS_COMBOBOX_NATIVE_COMBOBOX_GTK_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_gtk.h" | 9 #include "views/controls/native_control_gtk.h" |
| 10 | 10 |
| 11 namespace views { | 11 namespace views { |
| 12 | 12 |
| 13 class NativeComboboxGtk : public NativeControlGtk, | 13 class NativeComboboxGtk : public NativeControlGtk, |
| 14 public NativeComboboxWrapper { | 14 public NativeComboboxWrapper { |
| 15 public: | 15 public: |
| 16 explicit NativeComboboxGtk(Combobox* combobox); | 16 explicit NativeComboboxGtk(Combobox* combobox); |
| 17 virtual ~NativeComboboxGtk(); | 17 virtual ~NativeComboboxGtk(); |
| 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 NativeControlGtk: | 31 // Overridden from NativeControlGtk: |
| 31 virtual void CreateNativeControl(); | 32 virtual void CreateNativeControl(); |
| 32 virtual void NativeControlCreated(GtkWidget* widget); | 33 virtual void NativeControlCreated(GtkWidget* widget); |
| 33 | 34 |
| 34 private: | 35 private: |
| 35 // The combobox we are bound to. | 36 // The combobox we are bound to. |
| 36 Combobox* combobox_; | 37 Combobox* combobox_; |
| 37 | 38 |
| 38 DISALLOW_COPY_AND_ASSIGN(NativeComboboxGtk); | 39 DISALLOW_COPY_AND_ASSIGN(NativeComboboxGtk); |
| 39 }; | 40 }; |
| 40 | 41 |
| 41 } // namespace views | 42 } // namespace views |
| 42 | 43 |
| 43 #endif // VIEWS_CONTROLS_COMBOBOX_NATIVE_COMBOBOX_GTK_H_ | 44 #endif // VIEWS_CONTROLS_COMBOBOX_NATIVE_COMBOBOX_GTK_H_ |
| OLD | NEW |