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

Side by Side Diff: chrome/views/controls/button/menu_button.cc

Issue 93085: Removes the use of Windows-specific types for accessibility roles and states ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 8 months 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 | Annotate | Revision Log
« no previous file with comments | « chrome/views/controls/button/menu_button.h ('k') | chrome/views/controls/label.h » ('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) 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
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
OLDNEW
« no previous file with comments | « chrome/views/controls/button/menu_button.h ('k') | chrome/views/controls/label.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698