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

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

Issue 2873373005: Add custom action support (Closed)
Patch Set: Migrate to DataObjectBuilder. Created 3 years, 6 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
« no previous file with comments | « ui/accessibility/ax_action_data.h ('k') | ui/accessibility/ax_enums.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 custom_action_id(-1),
26 hit_test_event_to_fire(AX_EVENT_NONE) {} 27 hit_test_event_to_fire(AX_EVENT_NONE) {}
27 28
28 AXActionData::AXActionData(const AXActionData& other) = default; 29 AXActionData::AXActionData(const AXActionData& other) = default;
29 30
30 AXActionData::~AXActionData() { 31 AXActionData::~AXActionData() {
31 } 32 }
32 33
33 // Note that this includes an initial space character if nonempty, but 34 // Note that this includes an initial space character if nonempty, but
34 // that works fine because this is normally printed by AXAction::ToString. 35 // that works fine because this is normally printed by AXAction::ToString.
35 std::string AXActionData::ToString() const { 36 std::string AXActionData::ToString() const {
(...skipping 14 matching lines...) Expand all
50 } 51 }
51 if (focus_node_id != -1) { 52 if (focus_node_id != -1) {
52 result += " focus_node_id=" + IntToString(focus_node_id); 53 result += " focus_node_id=" + IntToString(focus_node_id);
53 result += " focus_offset=" + IntToString(focus_offset); 54 result += " focus_offset=" + IntToString(focus_offset);
54 } 55 }
55 56
56 return result; 57 return result;
57 } 58 }
58 59
59 } // namespace ui 60 } // namespace ui
OLDNEW
« no previous file with comments | « ui/accessibility/ax_action_data.h ('k') | ui/accessibility/ax_enums.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698