OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #include "chrome/views/controls/button/button_dropdown.h" | 5 #include "chrome/views/controls/button/button_dropdown.h" |
6 | 6 |
7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "chrome/common/l10n_util.h" | 8 #include "chrome/common/l10n_util.h" |
9 #include "chrome/views/controls/menu/view_menu_delegate.h" | 9 #include "chrome/views/controls/menu/view_menu_delegate.h" |
10 #include "chrome/views/widget/widget.h" | 10 #include "chrome/views/widget/widget.h" |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 // | 168 // |
169 //////////////////////////////////////////////////////////////////////////////// | 169 //////////////////////////////////////////////////////////////////////////////// |
170 | 170 |
171 bool ButtonDropDown::GetAccessibleDefaultAction(std::wstring* action) { | 171 bool ButtonDropDown::GetAccessibleDefaultAction(std::wstring* action) { |
172 DCHECK(action); | 172 DCHECK(action); |
173 | 173 |
174 action->assign(l10n_util::GetString(IDS_ACCACTION_PRESS)); | 174 action->assign(l10n_util::GetString(IDS_ACCACTION_PRESS)); |
175 return true; | 175 return true; |
176 } | 176 } |
177 | 177 |
178 bool ButtonDropDown::GetAccessibleRole(VARIANT* role) { | 178 bool ButtonDropDown::GetAccessibleRole(AccessibilityTypes::Role* role) { |
179 DCHECK(role); | 179 DCHECK(role); |
180 | 180 |
181 role->vt = VT_I4; | 181 *role = AccessibilityTypes::ROLE_BUTTONDROPDOWN; |
182 role->lVal = ROLE_SYSTEM_BUTTONDROPDOWN; | |
183 return true; | 182 return true; |
184 } | 183 } |
185 | 184 |
186 bool ButtonDropDown::GetAccessibleState(VARIANT* state) { | 185 bool ButtonDropDown::GetAccessibleState(AccessibilityTypes::State* state) { |
187 DCHECK(state); | 186 DCHECK(state); |
188 | 187 |
189 state->lVal |= STATE_SYSTEM_HASPOPUP; | 188 *state = AccessibilityTypes::STATE_HASPOPUP; |
190 return true; | 189 return true; |
191 } | 190 } |
192 | 191 |
193 } // namespace views | 192 } // namespace views |
OLD | NEW |