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

Unified Diff: ui/accessibility/ax_host_delegate.cc

Issue 2700103004: Initial support for accessibility actions on ARC. (Closed)
Patch Set: Use desktop tree id. Created 3 years, 10 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_host_delegate.h ('k') | ui/accessibility/ax_tree_id_registry.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/accessibility/ax_host_delegate.cc
diff --git a/ui/accessibility/ax_host_delegate.cc b/ui/accessibility/ax_host_delegate.cc
new file mode 100644
index 0000000000000000000000000000000000000000..a7ecd1b0cdab5497181c477db6b54b162ad3a53f
--- /dev/null
+++ b/ui/accessibility/ax_host_delegate.cc
@@ -0,0 +1,22 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ui/accessibility/ax_host_delegate.h"
+
+#include "ui/accessibility/ax_tree_id_registry.h"
+
+namespace ui {
+
+AXHostDelegate::AXHostDelegate()
+ : tree_id_(AXTreeIDRegistry::GetInstance()->GetOrCreateAXTreeID(this)) {}
+
+AXHostDelegate::AXHostDelegate(int32_t tree_id) : tree_id_(tree_id) {
+ AXTreeIDRegistry::GetInstance()->SetDelegateForID(this, tree_id);
+}
+
+AXHostDelegate::~AXHostDelegate() {
+ AXTreeIDRegistry::GetInstance()->RemoveAXTreeID(tree_id_);
+}
+
+} // namespace ui
« no previous file with comments | « ui/accessibility/ax_host_delegate.h ('k') | ui/accessibility/ax_tree_id_registry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698