| 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_COMBOBOX_H_ | 5 #ifndef UI_VIEWS_CONTROLS_COMBOBOX_COMBOBOX_H_ |
| 6 #define UI_VIEWS_CONTROLS_COMBOBOX_COMBOBOX_H_ | 6 #define UI_VIEWS_CONTROLS_COMBOBOX_COMBOBOX_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 // Overridden from View: | 95 // Overridden from View: |
| 96 gfx::Size GetPreferredSize() const override; | 96 gfx::Size GetPreferredSize() const override; |
| 97 const char* GetClassName() const override; | 97 const char* GetClassName() const override; |
| 98 bool SkipDefaultKeyEventProcessing(const ui::KeyEvent& e) override; | 98 bool SkipDefaultKeyEventProcessing(const ui::KeyEvent& e) override; |
| 99 bool OnKeyPressed(const ui::KeyEvent& e) override; | 99 bool OnKeyPressed(const ui::KeyEvent& e) override; |
| 100 bool OnKeyReleased(const ui::KeyEvent& e) override; | 100 bool OnKeyReleased(const ui::KeyEvent& e) override; |
| 101 void OnPaint(gfx::Canvas* canvas) override; | 101 void OnPaint(gfx::Canvas* canvas) override; |
| 102 void OnFocus() override; | 102 void OnFocus() override; |
| 103 void OnBlur() override; | 103 void OnBlur() override; |
| 104 void GetAccessibleState(ui::AXViewState* state) override; | 104 void GetAccessibleState(ui::AXViewState* state) override; |
| 105 ui::TextInputClient* GetTextInputClient() override; | |
| 106 void Layout() override; | 105 void Layout() override; |
| 107 | 106 |
| 108 // Overridden from MenuDelegate: | 107 // Overridden from MenuDelegate: |
| 109 bool IsItemChecked(int id) const override; | 108 bool IsItemChecked(int id) const override; |
| 110 bool IsCommandEnabled(int id) const override; | 109 bool IsCommandEnabled(int id) const override; |
| 111 void ExecuteCommand(int id) override; | 110 void ExecuteCommand(int id) override; |
| 112 bool GetAccelerator(int id, ui::Accelerator* accelerator) const override; | 111 bool GetAccelerator(int id, ui::Accelerator* accelerator) const override; |
| 113 | 112 |
| 114 // Overridden from PrefixDelegate: | 113 // Overridden from PrefixDelegate: |
| 115 int GetRowCount() override; | 114 int GetRowCount() override; |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 | 156 |
| 158 int GetDisclosureArrowLeftPadding() const; | 157 int GetDisclosureArrowLeftPadding() const; |
| 159 int GetDisclosureArrowRightPadding() const; | 158 int GetDisclosureArrowRightPadding() const; |
| 160 | 159 |
| 161 // Returns the size of the disclosure arrow. | 160 // Returns the size of the disclosure arrow. |
| 162 gfx::Size ArrowSize() const; | 161 gfx::Size ArrowSize() const; |
| 163 | 162 |
| 164 // Handles the clicking event. | 163 // Handles the clicking event. |
| 165 void HandleClickEvent(); | 164 void HandleClickEvent(); |
| 166 | 165 |
| 166 PrefixSelector* GetPrefixSelector(); |
| 167 |
| 167 // Our model. Not owned. | 168 // Our model. Not owned. |
| 168 ui::ComboboxModel* model_; | 169 ui::ComboboxModel* model_; |
| 169 | 170 |
| 170 // The visual style of this combobox. | 171 // The visual style of this combobox. |
| 171 Style style_; | 172 Style style_; |
| 172 | 173 |
| 173 // Our listener. Not owned. Notified when the selected index change. | 174 // Our listener. Not owned. Notified when the selected index change. |
| 174 ComboboxListener* listener_; | 175 ComboboxListener* listener_; |
| 175 | 176 |
| 176 // The current selected index; -1 and means no selection. | 177 // The current selected index; -1 and means no selection. |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 | 224 |
| 224 // Used for making calbacks. | 225 // Used for making calbacks. |
| 225 base::WeakPtrFactory<Combobox> weak_ptr_factory_; | 226 base::WeakPtrFactory<Combobox> weak_ptr_factory_; |
| 226 | 227 |
| 227 DISALLOW_COPY_AND_ASSIGN(Combobox); | 228 DISALLOW_COPY_AND_ASSIGN(Combobox); |
| 228 }; | 229 }; |
| 229 | 230 |
| 230 } // namespace views | 231 } // namespace views |
| 231 | 232 |
| 232 #endif // UI_VIEWS_CONTROLS_COMBOBOX_COMBOBOX_H_ | 233 #endif // UI_VIEWS_CONTROLS_COMBOBOX_COMBOBOX_H_ |
| OLD | NEW |