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

Side by Side Diff: chrome/views/controls/button/button_dropdown.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
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/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
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
OLDNEW
« no previous file with comments | « chrome/views/controls/button/button_dropdown.h ('k') | chrome/views/controls/button/menu_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698