Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1187)

Side by Side Diff: ui/views/controls/combobox/combobox.h

Issue 2477463003: Replace ui::AXViewState with AXNodeData and AXActionData (Closed)
Patch Set: Fix test Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/views/controls/button/radio_button.cc ('k') | ui/views/controls/combobox/combobox.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 87
88 // Overridden from View: 88 // Overridden from View:
89 gfx::Size GetPreferredSize() const override; 89 gfx::Size GetPreferredSize() const override;
90 const char* GetClassName() const override; 90 const char* GetClassName() const override;
91 bool SkipDefaultKeyEventProcessing(const ui::KeyEvent& e) override; 91 bool SkipDefaultKeyEventProcessing(const ui::KeyEvent& e) override;
92 bool OnKeyPressed(const ui::KeyEvent& e) override; 92 bool OnKeyPressed(const ui::KeyEvent& e) override;
93 bool OnKeyReleased(const ui::KeyEvent& e) override; 93 bool OnKeyReleased(const ui::KeyEvent& e) override;
94 void OnPaint(gfx::Canvas* canvas) override; 94 void OnPaint(gfx::Canvas* canvas) override;
95 void OnFocus() override; 95 void OnFocus() override;
96 void OnBlur() override; 96 void OnBlur() override;
97 void GetAccessibleState(ui::AXViewState* state) override; 97 void GetAccessibleNodeData(ui::AXNodeData* node_data) override;
98 void Layout() override; 98 void Layout() override;
99 void OnEnabledChanged() override; 99 void OnEnabledChanged() override;
100 void OnNativeThemeChanged(const ui::NativeTheme* theme) override; 100 void OnNativeThemeChanged(const ui::NativeTheme* theme) override;
101 101
102 // Overridden from PrefixDelegate: 102 // Overridden from PrefixDelegate:
103 int GetRowCount() override; 103 int GetRowCount() override;
104 int GetSelectedRow() override; 104 int GetSelectedRow() override;
105 void SetSelectedRow(int row) override; 105 void SetSelectedRow(int row) override;
106 base::string16 GetTextForRow(int row) override; 106 base::string16 GetTextForRow(int row) override;
107 107
108 // Overriden from ButtonListener: 108 // Overriden from ButtonListener:
109 void ButtonPressed(Button* sender, const ui::Event& event) override; 109 void ButtonPressed(Button* sender, const ui::Event& event) override;
110 110
111 protected: 111 protected:
112 void set_size_to_largest_label(bool size_to_largest_label) { 112 void set_size_to_largest_label(bool size_to_largest_label) {
113 size_to_largest_label_ = size_to_largest_label; 113 size_to_largest_label_ = size_to_largest_label;
114 } 114 }
115 115
116 private: 116 private:
117 friend class test::ComboboxTestApi; 117 friend class test::ComboboxTestApi;
118 118
119 class ComboboxMenuModel; 119 class ComboboxMenuModel;
120 120
121 // Updates the border according to the current state. 121 // Updates the border according to the current node_data.
122 void UpdateBorder(); 122 void UpdateBorder();
123 123
124 // Given bounds within our View, this helper mirrors the bounds if necessary. 124 // Given bounds within our View, this helper mirrors the bounds if necessary.
125 void AdjustBoundsForRTLUI(gfx::Rect* rect) const; 125 void AdjustBoundsForRTLUI(gfx::Rect* rect) const;
126 126
127 // Draws the selected value of the drop down list 127 // Draws the selected value of the drop down list
128 void PaintText(gfx::Canvas* canvas); 128 void PaintText(gfx::Canvas* canvas);
129 129
130 // Draws the button images. 130 // Draws the button images.
131 void PaintButtons(gfx::Canvas* canvas); 131 void PaintButtons(gfx::Canvas* canvas);
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 222
223 // Used for making calbacks. 223 // Used for making calbacks.
224 base::WeakPtrFactory<Combobox> weak_ptr_factory_; 224 base::WeakPtrFactory<Combobox> weak_ptr_factory_;
225 225
226 DISALLOW_COPY_AND_ASSIGN(Combobox); 226 DISALLOW_COPY_AND_ASSIGN(Combobox);
227 }; 227 };
228 228
229 } // namespace views 229 } // namespace views
230 230
231 #endif // UI_VIEWS_CONTROLS_COMBOBOX_COMBOBOX_H_ 231 #endif // UI_VIEWS_CONTROLS_COMBOBOX_COMBOBOX_H_
OLDNEW
« no previous file with comments | « ui/views/controls/button/radio_button.cc ('k') | ui/views/controls/combobox/combobox.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698