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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 void OnPerformAction(); | 152 void OnPerformAction(); |
153 void NotifyPerformAction(); | 153 void NotifyPerformAction(); |
154 void AfterPerformAction(); | 154 void AfterPerformAction(); |
155 | 155 |
156 // Converts a menu command ID to a menu item index. | 156 // Converts a menu command ID to a menu item index. |
157 int MenuCommandToIndex(int menu_command_id) const; | 157 int MenuCommandToIndex(int menu_command_id) const; |
158 | 158 |
159 int GetDisclosureArrowLeftPadding() const; | 159 int GetDisclosureArrowLeftPadding() const; |
160 int GetDisclosureArrowRightPadding() const; | 160 int GetDisclosureArrowRightPadding() const; |
161 | 161 |
| 162 // Returns the size of the disclosure arrow. |
| 163 gfx::Size ArrowSize() const; |
| 164 |
162 // Handles the clicking event. | 165 // Handles the clicking event. |
163 void HandleClickEvent(); | 166 void HandleClickEvent(); |
164 | 167 |
165 // Our model. Not owned. | 168 // Our model. Not owned. |
166 ui::ComboboxModel* model_; | 169 ui::ComboboxModel* model_; |
167 | 170 |
168 // The visual style of this combobox. | 171 // The visual style of this combobox. |
169 Style style_; | 172 Style style_; |
170 | 173 |
171 // Our listener. Not owned. Notified when the selected index change. | 174 // Our listener. Not owned. Notified when the selected index change. |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 | 221 |
219 // Used for making calbacks. | 222 // Used for making calbacks. |
220 base::WeakPtrFactory<Combobox> weak_ptr_factory_; | 223 base::WeakPtrFactory<Combobox> weak_ptr_factory_; |
221 | 224 |
222 DISALLOW_COPY_AND_ASSIGN(Combobox); | 225 DISALLOW_COPY_AND_ASSIGN(Combobox); |
223 }; | 226 }; |
224 | 227 |
225 } // namespace views | 228 } // namespace views |
226 | 229 |
227 #endif // UI_VIEWS_CONTROLS_COMBOBOX_COMBOBOX_H_ | 230 #endif // UI_VIEWS_CONTROLS_COMBOBOX_COMBOBOX_H_ |
OLD | NEW |