| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_COMBOBOX_COMBOBOX_H_ | 5 #ifndef VIEWS_CONTROLS_COMBOBOX_COMBOBOX_H_ |
| 6 #define VIEWS_CONTROLS_COMBOBOX_COMBOBOX_H_ | 6 #define VIEWS_CONTROLS_COMBOBOX_COMBOBOX_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 virtual bool SkipDefaultKeyEventProcessing(const KeyEvent& e) OVERRIDE; | 75 virtual bool SkipDefaultKeyEventProcessing(const KeyEvent& e) OVERRIDE; |
| 76 virtual void OnPaintFocusBorder(gfx::Canvas* canvas) OVERRIDE; | 76 virtual void OnPaintFocusBorder(gfx::Canvas* canvas) OVERRIDE; |
| 77 virtual bool OnKeyPressed(const views::KeyEvent& e) OVERRIDE; | 77 virtual bool OnKeyPressed(const views::KeyEvent& e) OVERRIDE; |
| 78 virtual bool OnKeyReleased(const views::KeyEvent& e) OVERRIDE; | 78 virtual bool OnKeyReleased(const views::KeyEvent& e) OVERRIDE; |
| 79 virtual void OnFocus() OVERRIDE; | 79 virtual void OnFocus() OVERRIDE; |
| 80 virtual void OnBlur() OVERRIDE; | 80 virtual void OnBlur() OVERRIDE; |
| 81 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; | 81 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; |
| 82 | 82 |
| 83 protected: | 83 protected: |
| 84 // Overridden from View: | 84 // Overridden from View: |
| 85 virtual void ViewHierarchyChanged(bool is_add, View* parent, | 85 virtual void ViewHierarchyChanged(bool is_add, |
| 86 View* parent, |
| 86 View* child) OVERRIDE; | 87 View* child) OVERRIDE; |
| 87 virtual std::string GetClassName() const OVERRIDE; | 88 virtual std::string GetClassName() const OVERRIDE; |
| 88 | 89 |
| 89 // The object that actually implements the native combobox. | 90 // The object that actually implements the native combobox. |
| 90 NativeComboboxWrapper* native_wrapper_; | 91 NativeComboboxWrapper* native_wrapper_; |
| 91 | 92 |
| 92 private: | 93 private: |
| 93 // Our model. | 94 // Our model. |
| 94 ui::ComboboxModel* model_; | 95 ui::ComboboxModel* model_; |
| 95 | 96 |
| 96 // Item change listener. | 97 // Item change listener. |
| 97 Listener* listener_; | 98 Listener* listener_; |
| 98 | 99 |
| 99 // The current selection. | 100 // The current selection. |
| 100 int selected_item_; | 101 int selected_item_; |
| 101 | 102 |
| 102 // The accessible name of the text field. | 103 // The accessible name of the text field. |
| 103 string16 accessible_name_; | 104 string16 accessible_name_; |
| 104 | 105 |
| 105 DISALLOW_COPY_AND_ASSIGN(Combobox); | 106 DISALLOW_COPY_AND_ASSIGN(Combobox); |
| 106 }; | 107 }; |
| 107 | 108 |
| 108 } // namespace views | 109 } // namespace views |
| 109 | 110 |
| 110 #endif // VIEWS_CONTROLS_COMBOBOX_COMBOBOX_H_ | 111 #endif // VIEWS_CONTROLS_COMBOBOX_COMBOBOX_H_ |
| OLD | NEW |