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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
85 | 85 |
86 // Set the accessible name of the combobox. | 86 // Set the accessible name of the combobox. |
87 void SetAccessibleName(const base::string16& name); | 87 void SetAccessibleName(const base::string16& name); |
88 | 88 |
89 // Visually marks the combobox as having an invalid value selected. | 89 // Visually marks the combobox as having an invalid value selected. |
90 // When invalid, it paints with white text on a red background. | 90 // When invalid, it paints with white text on a red background. |
91 // Callers are responsible for restoring validity with selection changes. | 91 // Callers are responsible for restoring validity with selection changes. |
92 void SetInvalid(bool invalid); | 92 void SetInvalid(bool invalid); |
93 bool invalid() const { return invalid_; } | 93 bool invalid() const { return invalid_; } |
94 | 94 |
95 ui::TextInputClient* GetTextInputClient(); | |
yukawa
2015/06/16 02:45:03
I prefer to use more descriptive name such as
P
Shu Chen
2015/06/16 05:15:26
Done.
| |
96 | |
95 // Overridden from View: | 97 // Overridden from View: |
96 gfx::Size GetPreferredSize() const override; | 98 gfx::Size GetPreferredSize() const override; |
97 const char* GetClassName() const override; | 99 const char* GetClassName() const override; |
98 bool SkipDefaultKeyEventProcessing(const ui::KeyEvent& e) override; | 100 bool SkipDefaultKeyEventProcessing(const ui::KeyEvent& e) override; |
99 bool OnKeyPressed(const ui::KeyEvent& e) override; | 101 bool OnKeyPressed(const ui::KeyEvent& e) override; |
100 bool OnKeyReleased(const ui::KeyEvent& e) override; | 102 bool OnKeyReleased(const ui::KeyEvent& e) override; |
101 void OnPaint(gfx::Canvas* canvas) override; | 103 void OnPaint(gfx::Canvas* canvas) override; |
102 void OnFocus() override; | 104 void OnFocus() override; |
103 void OnBlur() override; | 105 void OnBlur() override; |
104 void GetAccessibleState(ui::AXViewState* state) override; | 106 void GetAccessibleState(ui::AXViewState* state) override; |
105 ui::TextInputClient* GetTextInputClient() override; | |
106 void Layout() override; | 107 void Layout() override; |
107 | 108 |
108 // Overridden from MenuDelegate: | 109 // Overridden from MenuDelegate: |
109 bool IsItemChecked(int id) const override; | 110 bool IsItemChecked(int id) const override; |
110 bool IsCommandEnabled(int id) const override; | 111 bool IsCommandEnabled(int id) const override; |
111 void ExecuteCommand(int id) override; | 112 void ExecuteCommand(int id) override; |
112 bool GetAccelerator(int id, ui::Accelerator* accelerator) const override; | 113 bool GetAccelerator(int id, ui::Accelerator* accelerator) const override; |
113 | 114 |
114 // Overridden from PrefixDelegate: | 115 // Overridden from PrefixDelegate: |
115 int GetRowCount() override; | 116 int GetRowCount() override; |
(...skipping 107 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 |