Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/renderer/accessibility/renderer_accessibility.h" | 5 #include "content/renderer/accessibility/renderer_accessibility.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "content/renderer/render_frame_impl.h" | |
| 8 #include "content/renderer/render_view_impl.h" | 9 #include "content/renderer/render_view_impl.h" |
| 9 #include "third_party/WebKit/public/web/WebAXObject.h" | 10 #include "third_party/WebKit/public/web/WebAXObject.h" |
| 10 #include "third_party/WebKit/public/web/WebDocument.h" | 11 #include "third_party/WebKit/public/web/WebDocument.h" |
| 11 #include "third_party/WebKit/public/web/WebFrame.h" | 12 #include "third_party/WebKit/public/web/WebFrame.h" |
| 12 #include "third_party/WebKit/public/web/WebView.h" | 13 #include "third_party/WebKit/public/web/WebView.h" |
| 13 | 14 |
| 14 using blink::WebAXObject; | 15 using blink::WebAXObject; |
| 15 using blink::WebDocument; | 16 using blink::WebDocument; |
| 16 using blink::WebFrame; | 17 using blink::WebFrame; |
| 17 using blink::WebView; | 18 using blink::WebView; |
| 18 | 19 |
| 19 namespace content { | 20 namespace content { |
| 20 | 21 |
| 21 RendererAccessibility::RendererAccessibility( | 22 RendererAccessibility::RendererAccessibility( |
| 22 RenderViewImpl* render_view) | 23 RenderFrameImpl* render_frame) |
| 23 : RenderViewObserver(render_view), | 24 : RenderFrameObserver(render_frame), |
| 24 render_view_(render_view) { | 25 render_frame_(render_frame) { |
| 25 } | 26 } |
| 26 | 27 |
| 27 RendererAccessibility::~RendererAccessibility() { | 28 RendererAccessibility::~RendererAccessibility() { |
| 28 } | 29 } |
| 29 | 30 |
| 30 WebDocument RendererAccessibility::GetMainDocument() { | 31 WebDocument RendererAccessibility::GetMainDocument() { |
| 31 WebView* view = render_view()->GetWebView(); | 32 WebView* view = render_frame_->render_view()->GetWebView(); |
| 32 WebFrame* main_frame = view ? view->mainFrame() : NULL; | 33 WebFrame* main_frame = view ? view->mainFrame() : NULL; |
|
jam
2014/05/28 23:17:41
does this make sense anymore now that this class i
| |
| 33 | 34 |
| 34 if (main_frame) | 35 if (main_frame) |
| 35 return main_frame->document(); | 36 return main_frame->document(); |
| 36 | 37 |
| 37 return WebDocument(); | 38 return WebDocument(); |
| 38 } | 39 } |
| 39 | 40 |
| 40 } // namespace content | 41 } // namespace content |
| OLD | NEW |