base: Change DCHECK_IS_ON to a macro DCHECK_IS_ON().
[chromium-blink-merge.git] / mojo / services / html_viewer / ax_provider_impl.h
blob5f03e47c4809d66df817797b28d38e388c58efe2
1 // Copyright 2014 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.
5 #ifndef MOJO_SERVICES_HTML_VIEWER_AX_PROVIDER_IMPL_H_
6 #define MOJO_SERVICES_HTML_VIEWER_AX_PROVIDER_IMPL_H_
8 #include "mojo/public/cpp/bindings/interface_impl.h"
9 #include "mojo/services/accessibility/public/interfaces/accessibility.mojom.h"
11 namespace blink {
12 class WebAXObject;
13 class WebView;
14 } // namespace blink
16 namespace html_viewer {
18 // Caller must ensure that |web_view| outlives AxProviderImpl.
19 class AxProviderImpl : public mojo::InterfaceImpl<mojo::AxProvider> {
20 public:
21 explicit AxProviderImpl(blink::WebView* web_view);
22 void GetTree(const mojo::Callback<void(mojo::Array<mojo::AxNodePtr> nodes)>&
23 callback) override;
25 private:
26 int Populate(const blink::WebAXObject& ax_object,
27 int parent_id,
28 int next_sibling_id,
29 mojo::Array<mojo::AxNodePtr>* result);
30 mojo::AxNodePtr ConvertAxNode(const blink::WebAXObject& ax_object,
31 int parent_id,
32 int next_sibling_id);
34 blink::WebView* web_view_;
37 } // namespace html_viewer
39 #endif // MOJO_SERVICES_HTML_VIEWER_AX_PROVIDER_IMPL_H_