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/menu_button.h" | 5 #include "chrome/views/controls/button/menu_button.h" |
6 | 6 |
7 #include "chrome/common/drag_drop_types.h" | 7 #include "chrome/common/drag_drop_types.h" |
8 #include "chrome/common/gfx/chrome_canvas.h" | 8 #include "chrome/common/gfx/chrome_canvas.h" |
9 #include "chrome/common/l10n_util.h" | 9 #include "chrome/common/l10n_util.h" |
10 #include "chrome/common/resource_bundle.h" | 10 #include "chrome/common/resource_bundle.h" |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 // | 229 // |
230 //////////////////////////////////////////////////////////////////////////////// | 230 //////////////////////////////////////////////////////////////////////////////// |
231 | 231 |
232 bool MenuButton::GetAccessibleDefaultAction(std::wstring* action) { | 232 bool MenuButton::GetAccessibleDefaultAction(std::wstring* action) { |
233 DCHECK(action); | 233 DCHECK(action); |
234 | 234 |
235 action->assign(l10n_util::GetString(IDS_ACCACTION_PRESS)); | 235 action->assign(l10n_util::GetString(IDS_ACCACTION_PRESS)); |
236 return true; | 236 return true; |
237 } | 237 } |
238 | 238 |
239 bool MenuButton::GetAccessibleRole(VARIANT* role) { | 239 bool MenuButton::GetAccessibleRole(AccessibilityTypes::Role* role) { |
240 DCHECK(role); | 240 DCHECK(role); |
241 | 241 |
242 role->vt = VT_I4; | 242 *role = AccessibilityTypes::ROLE_BUTTONDROPDOWN; |
243 role->lVal = ROLE_SYSTEM_BUTTONDROPDOWN; | |
244 return true; | 243 return true; |
245 } | 244 } |
246 | 245 |
247 bool MenuButton::GetAccessibleState(VARIANT* state) { | 246 bool MenuButton::GetAccessibleState(AccessibilityTypes::State* state) { |
248 DCHECK(state); | 247 DCHECK(state); |
249 | 248 |
250 state->lVal |= STATE_SYSTEM_HASPOPUP; | 249 *state = AccessibilityTypes::STATE_HASPOPUP; |
251 return true; | 250 return true; |
252 } | 251 } |
253 | 252 |
254 } // namespace views | 253 } // namespace views |
OLD | NEW |