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

Side by Side Diff: ui/accessibility/ax_view_state.cc

Issue 196133012: Fix incorrect use of AXState caused when refactoring two enums into one. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add dependency Created 6 years, 9 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "ui/accessibility/ax_view_state.h" 5 #include "ui/accessibility/ax_view_state.h"
6 6
7 namespace ui { 7 namespace ui {
8 8
9 AXViewState::AXViewState() 9 AXViewState::AXViewState()
10 : role(AX_ROLE_CLIENT), 10 : role(AX_ROLE_CLIENT),
11 state(0), 11 state(0),
12 selection_start(-1), 12 selection_start(-1),
13 selection_end(-1), 13 selection_end(-1),
14 index(-1), 14 index(-1),
15 count(-1) { } 15 count(-1) { }
16 16
17 AXViewState::~AXViewState() { } 17 AXViewState::~AXViewState() { }
18 18
19 void AXViewState::SetStateFlag(ui::AXState state_flag) {
20 state |= (1 << state_flag);
21 }
22
23 bool AXViewState::HasStateFlag(ui::AXState state_flag) const {
24 return 0 != (state & (1 << state_flag));
25 }
26
19 } // namespace ui 27 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698