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

Unified 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: Rename SetStateFlag -> AddStateFlag 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/accessibility/ax_view_state.h ('k') | ui/views/accessibility/native_view_accessibility_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/accessibility/ax_view_state.cc
diff --git a/ui/accessibility/ax_view_state.cc b/ui/accessibility/ax_view_state.cc
index fb19e2d38d8cd9fb0b1fddfcd53341b31dfb9250..11044bc16dd05304e96441b33641153621637a0a 100644
--- a/ui/accessibility/ax_view_state.cc
+++ b/ui/accessibility/ax_view_state.cc
@@ -8,12 +8,20 @@ namespace ui {
AXViewState::AXViewState()
: role(AX_ROLE_CLIENT),
- state(0),
selection_start(-1),
selection_end(-1),
index(-1),
- count(-1) { }
+ count(-1),
+ state_(0) { }
AXViewState::~AXViewState() { }
+void AXViewState::AddStateFlag(ui::AXState state_flag) {
+ state_ |= (1 << state_flag);
+}
+
+bool AXViewState::HasStateFlag(ui::AXState state_flag) const {
+ return 0 != (state_ & (1 << state_flag));
+}
+
} // namespace ui
« no previous file with comments | « ui/accessibility/ax_view_state.h ('k') | ui/views/accessibility/native_view_accessibility_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698