Home | History | Annotate | Download | only in accessibility
      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.
      4 
      5 #include "content/renderer/accessibility/renderer_accessibility.h"
      6 
      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/WebLocalFrame.h"
     11 #include "third_party/WebKit/public/web/WebView.h"
     12 
     13 using blink::WebDocument;
     14 using blink::WebView;
     15 
     16 namespace content {
     17 
     18 RendererAccessibility::RendererAccessibility(
     19     RenderFrameImpl* render_frame)
     20     : RenderFrameObserver(render_frame),
     21       render_frame_(render_frame) {
     22 }
     23 
     24 RendererAccessibility::~RendererAccessibility() {
     25 }
     26 
     27 WebDocument RendererAccessibility::GetMainDocument() {
     28   if (render_frame_ && render_frame_->GetWebFrame())
     29     return render_frame_->GetWebFrame()->document();
     30   return WebDocument();
     31 }
     32 
     33 }  // namespace content
     34