| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 UI_VIEWS_CONTROLS_COMBOBOX_NATIVE_COMBOBOX_VIEWS_H_ | 5 #ifndef UI_VIEWS_CONTROLS_COMBOBOX_NATIVE_COMBOBOX_VIEWS_H_ |
| 6 #define UI_VIEWS_CONTROLS_COMBOBOX_NATIVE_COMBOBOX_VIEWS_H_ | 6 #define UI_VIEWS_CONTROLS_COMBOBOX_NATIVE_COMBOBOX_VIEWS_H_ |
| 7 | 7 |
| 8 #include "ui/views/controls/combobox/native_combobox_wrapper.h" | 8 #include "ui/views/controls/combobox/native_combobox_wrapper.h" |
| 9 #include "ui/views/controls/menu/menu_delegate.h" | 9 #include "ui/views/controls/menu/menu_delegate.h" |
| 10 #include "ui/views/view.h" | 10 #include "ui/views/view.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 static const char kViewClassName[]; | 28 static const char kViewClassName[]; |
| 29 | 29 |
| 30 explicit NativeComboboxViews(Combobox* combobox); | 30 explicit NativeComboboxViews(Combobox* combobox); |
| 31 virtual ~NativeComboboxViews(); | 31 virtual ~NativeComboboxViews(); |
| 32 | 32 |
| 33 // views::View overrides: | 33 // views::View overrides: |
| 34 virtual bool OnMousePressed(const views::MouseEvent& mouse_event) OVERRIDE; | 34 virtual bool OnMousePressed(const views::MouseEvent& mouse_event) OVERRIDE; |
| 35 virtual bool OnMouseDragged(const views::MouseEvent& mouse_event) OVERRIDE; | 35 virtual bool OnMouseDragged(const views::MouseEvent& mouse_event) OVERRIDE; |
| 36 virtual ui::GestureStatus OnGestureEvent( | 36 virtual ui::GestureStatus OnGestureEvent( |
| 37 const views::GestureEvent& gesture_event) OVERRIDE; | 37 const views::GestureEvent& gesture_event) OVERRIDE; |
| 38 virtual bool OnKeyPressed(const views::KeyEvent& key_event) OVERRIDE; | 38 virtual bool OnKeyPressed(const ui::KeyEvent& key_event) OVERRIDE; |
| 39 virtual bool OnKeyReleased(const views::KeyEvent& key_event) OVERRIDE; | 39 virtual bool OnKeyReleased(const ui::KeyEvent& key_event) OVERRIDE; |
| 40 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 40 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; |
| 41 virtual void OnFocus() OVERRIDE; | 41 virtual void OnFocus() OVERRIDE; |
| 42 virtual void OnBlur() OVERRIDE; | 42 virtual void OnBlur() OVERRIDE; |
| 43 | 43 |
| 44 // NativeComboboxWrapper overrides: | 44 // NativeComboboxWrapper overrides: |
| 45 virtual void UpdateFromModel() OVERRIDE; | 45 virtual void UpdateFromModel() OVERRIDE; |
| 46 virtual void UpdateSelectedIndex() OVERRIDE; | 46 virtual void UpdateSelectedIndex() OVERRIDE; |
| 47 virtual void UpdateEnabled() OVERRIDE; | 47 virtual void UpdateEnabled() OVERRIDE; |
| 48 virtual int GetSelectedIndex() const OVERRIDE; | 48 virtual int GetSelectedIndex() const OVERRIDE; |
| 49 virtual bool IsDropdownOpen() const OVERRIDE; | 49 virtual bool IsDropdownOpen() const OVERRIDE; |
| 50 virtual gfx::Size GetPreferredSize() OVERRIDE; | 50 virtual gfx::Size GetPreferredSize() OVERRIDE; |
| 51 virtual View* GetView() OVERRIDE; | 51 virtual View* GetView() OVERRIDE; |
| 52 virtual void SetFocus() OVERRIDE; | 52 virtual void SetFocus() OVERRIDE; |
| 53 virtual bool HandleKeyPressed(const views::KeyEvent& event) OVERRIDE; | 53 virtual bool HandleKeyPressed(const ui::KeyEvent& event) OVERRIDE; |
| 54 virtual bool HandleKeyReleased(const views::KeyEvent& event) OVERRIDE; | 54 virtual bool HandleKeyReleased(const ui::KeyEvent& event) OVERRIDE; |
| 55 virtual void HandleFocus() OVERRIDE; | 55 virtual void HandleFocus() OVERRIDE; |
| 56 virtual void HandleBlur() OVERRIDE; | 56 virtual void HandleBlur() OVERRIDE; |
| 57 virtual gfx::NativeView GetTestingHandle() const OVERRIDE; | 57 virtual gfx::NativeView GetTestingHandle() const OVERRIDE; |
| 58 | 58 |
| 59 // MenuDelegate overrides: | 59 // MenuDelegate overrides: |
| 60 virtual bool IsItemChecked(int id) const OVERRIDE; | 60 virtual bool IsItemChecked(int id) const OVERRIDE; |
| 61 virtual bool IsCommandEnabled(int id) const OVERRIDE; | 61 virtual bool IsCommandEnabled(int id) const OVERRIDE; |
| 62 virtual void ExecuteCommand(int id) OVERRIDE; | 62 virtual void ExecuteCommand(int id) OVERRIDE; |
| 63 virtual bool GetAccelerator(int id, ui::Accelerator* accelerator) OVERRIDE; | 63 virtual bool GetAccelerator(int id, ui::Accelerator* accelerator) OVERRIDE; |
| 64 | 64 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 95 // The maximum dimensions of the content in the dropdown | 95 // The maximum dimensions of the content in the dropdown |
| 96 int content_width_; | 96 int content_width_; |
| 97 int content_height_; | 97 int content_height_; |
| 98 | 98 |
| 99 DISALLOW_COPY_AND_ASSIGN(NativeComboboxViews); | 99 DISALLOW_COPY_AND_ASSIGN(NativeComboboxViews); |
| 100 }; | 100 }; |
| 101 | 101 |
| 102 } // namespace views | 102 } // namespace views |
| 103 | 103 |
| 104 #endif // UI_VIEWS_CONTROLS_COMBOBOX_NATIVE_COMBOBOX_VIEWS_H_ | 104 #endif // UI_VIEWS_CONTROLS_COMBOBOX_NATIVE_COMBOBOX_VIEWS_H_ |
| OLD | NEW |