1 // Copyright (c) 2012 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 #include "content/renderer/accessibility/renderer_accessibility.h"
7 #include "content/renderer/render_frame_impl.h"
8 #include "content/renderer/render_view_impl.h"
9 #include "third_party/WebKit/public/web/WebDocument.h"
10 #include "third_party/WebKit/public/web/WebFrame.h"
11 #include "third_party/WebKit/public/web/WebView.h"
13 using blink::WebDocument
;
14 using blink::WebFrame
;
19 RendererAccessibility::RendererAccessibility(
20 RenderFrameImpl
* render_frame
)
21 : RenderFrameObserver(render_frame
),
22 render_frame_(render_frame
) {
25 RendererAccessibility::~RendererAccessibility() {
28 WebDocument
RendererAccessibility::GetMainDocument() {
29 WebView
* view
= render_frame_
->render_view()->GetWebView();
30 WebFrame
* main_frame
= view
? view
->mainFrame() : NULL
;
33 return main_frame
->document();
38 } // namespace content