Dominic Mazzoni | ccbaa9b | 2018-06-06 07:44:23 | [diff] [blame^] | 1 | // Copyright 2018 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_event.h" |
| 6 | |
| 7 | #include "base/strings/string_number_conversions.h" |
| 8 | #include "ui/accessibility/ax_enum_util.h" |
| 9 | |
| 10 | namespace ui { |
| 11 | |
| 12 | AXEvent::AXEvent() {} |
| 13 | |
| 14 | AXEvent::~AXEvent() {} |
| 15 | |
| 16 | std::string AXEvent::ToString() const { |
| 17 | std::string result = "AXEvent"; |
| 18 | |
| 19 | result += ui::ToString(event_type); |
| 20 | result += " on node id=" + base::NumberToString(id); |
| 21 | if (event_from != ax::mojom::EventFrom::kNone) |
| 22 | result += std::string(" from ") + ui::ToString(event_from); |
| 23 | if (action_request_id) |
| 24 | result += " action_request_id=" + base::NumberToString(action_request_id); |
| 25 | return result; |
| 26 | } |
| 27 | |
| 28 | } // namespace ui |