Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_action_data.h" | 5 #include "ui/accessibility/ax_action_data.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
| 10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| 11 #include "base/strings/stringprintf.h" | 11 #include "base/strings/stringprintf.h" |
| 12 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
| 13 | 13 |
| 14 using base::IntToString; | 14 using base::IntToString; |
| 15 | 15 |
| 16 namespace ui { | 16 namespace ui { |
| 17 | 17 |
| 18 AXActionData::AXActionData() | 18 AXActionData::AXActionData() |
| 19 : action(AX_ACTION_NONE), | 19 : action(AX_ACTION_NONE), |
| 20 target_node_id(-1), | 20 target_node_id(-1), |
| 21 flags(0), | 21 flags(0), |
| 22 anchor_node_id(-1), | 22 anchor_node_id(-1), |
| 23 anchor_offset(-1), | 23 anchor_offset(-1), |
| 24 focus_node_id(-1), | 24 focus_node_id(-1), |
| 25 focus_offset(-1) { | 25 focus_offset(-1), |
| 26 } | 26 hit_test_event_to_fire(AX_EVENT_NONE) {} |
|
David Tseng
2017/03/13 21:43:47
Seems like this should default to hover. Alternati
dmazzoni
2017/03/20 05:40:40
I added a DCHECK. I'd rather we make it explicit.
| |
| 27 | 27 |
| 28 AXActionData::AXActionData(const AXActionData& other) = default; | 28 AXActionData::AXActionData(const AXActionData& other) = default; |
| 29 | 29 |
| 30 AXActionData::~AXActionData() { | 30 AXActionData::~AXActionData() { |
| 31 } | 31 } |
| 32 | 32 |
| 33 // Note that this includes an initial space character if nonempty, but | 33 // Note that this includes an initial space character if nonempty, but |
| 34 // that works fine because this is normally printed by AXAction::ToString. | 34 // that works fine because this is normally printed by AXAction::ToString. |
| 35 std::string AXActionData::ToString() const { | 35 std::string AXActionData::ToString() const { |
| 36 std::string result = ui::ToString(action); | 36 std::string result = ui::ToString(action); |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 50 } | 50 } |
| 51 if (focus_node_id != -1) { | 51 if (focus_node_id != -1) { |
| 52 result += " focus_node_id=" + IntToString(focus_node_id); | 52 result += " focus_node_id=" + IntToString(focus_node_id); |
| 53 result += " focus_offset=" + IntToString(focus_offset); | 53 result += " focus_offset=" + IntToString(focus_offset); |
| 54 } | 54 } |
| 55 | 55 |
| 56 return result; | 56 return result; |
| 57 } | 57 } |
| 58 | 58 |
| 59 } // namespace ui | 59 } // namespace ui |
| OLD | NEW |