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

Unified Diff: mojo/services/html_viewer/ax_provider_impl.h

Issue 710803002: Beginning of an accessibility implementation for html_viewer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleanup, rebase Created 6 years, 1 month 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
Index: mojo/services/html_viewer/ax_provider_impl.h
diff --git a/mojo/services/html_viewer/ax_provider_impl.h b/mojo/services/html_viewer/ax_provider_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..40f47745c9f31ff0829b4937c897026eb5b31ec9
--- /dev/null
+++ b/mojo/services/html_viewer/ax_provider_impl.h
@@ -0,0 +1,38 @@
+// Copyright 2014 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.
+
+#ifndef MOJO_SERVICES_HTML_VIEWER_AX_PROVIDER_IMPL_H_
+#define MOJO_SERVICES_HTML_VIEWER_AX_PROVIDER_IMPL_H_
+
+#include "mojo/public/cpp/bindings/interface_impl.h"
+#include "mojo/services/public/interfaces/accessibility/accessibility.mojom.h"
+
+namespace blink {
+class WebAXObject;
+class WebView;
+} // namespace blink
+
+namespace mojo {
+
+// Caller must ensure that |web_view| outlives AxProviderImpl.
+class AxProviderImpl : public InterfaceImpl<AxProvider> {
+ public:
+ AxProviderImpl(blink::WebView* web_view);
abarth-chromium 2014/11/10 00:33:04 explicit
Aaron Boodman 2014/11/10 07:05:53 Done.
+ void GetTree(const Callback<void(Array<AxNodePtr> nodes)>& callback) override;
+
+ private:
+ int Populate(const blink::WebAXObject& ax_object,
+ int parent_id,
+ int next_sibling_id,
+ Array<AxNodePtr>* result);
+ AxNodePtr ConvertAxNode(const blink::WebAXObject& ax_object,
+ int parent_id,
+ int next_sibling_id);
+
+ blink::WebView* web_view_;
+};
+
+} // namespace mojo
+
+#endif // MOJO_SERVICES_HTML_VIEWER_AX_PROVIDER_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698