| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "ui/accessibility/ax_view_state.h" | |
| 6 | |
| 7 namespace ui { | |
| 8 | |
| 9 AXViewState::AXViewState() | |
| 10 : role(AX_ROLE_CLIENT), | |
| 11 selection_start(-1), | |
| 12 selection_end(-1), | |
| 13 index(-1), | |
| 14 count(-1), | |
| 15 state_(0) { } | |
| 16 | |
| 17 AXViewState::~AXViewState() { } | |
| 18 | |
| 19 // static | |
| 20 bool AXViewState::IsFlagSet(uint32_t state, ui::AXState state_flag) { | |
| 21 return 0 != (state & (1 << state_flag)); | |
| 22 } | |
| 23 | |
| 24 void AXViewState::AddStateFlag(ui::AXState state_flag) { | |
| 25 state_ |= (1 << state_flag); | |
| 26 } | |
| 27 | |
| 28 bool AXViewState::HasStateFlag(ui::AXState state_flag) const { | |
| 29 return IsFlagSet(state_, state_flag); | |
| 30 } | |
| 31 | |
| 32 } // namespace ui | |
| OLD | NEW |