OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CONTENT_RENDERER_RENDERER_ACCESSIBILITY_H_ | 5 #ifndef CONTENT_RENDERER_RENDERER_ACCESSIBILITY_H_ |
6 #define CONTENT_RENDERER_RENDERER_ACCESSIBILITY_H_ | 6 #define CONTENT_RENDERER_RENDERER_ACCESSIBILITY_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/hash_tables.h" | 11 #include "base/hash_tables.h" |
12 #include "base/task.h" | 12 #include "base/task.h" |
13 #include "content/public/renderer/render_view_observer.h" | 13 #include "content/public/renderer/render_view_observer.h" |
14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAccessibilityNotif
ication.h" | 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAccessibilityNotif
ication.h" |
15 | 15 |
| 16 class RenderViewImpl; |
| 17 |
16 namespace WebKit { | 18 namespace WebKit { |
17 class WebAccessibilityObject; | 19 class WebAccessibilityObject; |
18 class WebDocument; | 20 class WebDocument; |
19 class WebNode; | 21 class WebNode; |
20 }; | 22 }; |
21 | 23 |
22 namespace webkit_glue { | 24 namespace webkit_glue { |
23 struct WebAccessibility; | 25 struct WebAccessibility; |
24 }; | 26 }; |
25 | 27 |
26 // RendererAccessibility belongs to the RenderView. It's responsible for | 28 // RendererAccessibility belongs to the RenderView. It's responsible for |
27 // sending a serialized representation of WebKit's accessibility tree from | 29 // sending a serialized representation of WebKit's accessibility tree from |
28 // the renderer to the browser and sending updates whenever it changes, and | 30 // the renderer to the browser and sending updates whenever it changes, and |
29 // handling requests from the browser to perform accessibility actions on | 31 // handling requests from the browser to perform accessibility actions on |
30 // nodes in the tree (e.g., change focus, or click on a button). | 32 // nodes in the tree (e.g., change focus, or click on a button). |
31 class RendererAccessibility : public content::RenderViewObserver { | 33 class RendererAccessibility : public content::RenderViewObserver { |
32 public: | 34 public: |
33 RendererAccessibility(RenderView* render_view); | 35 RendererAccessibility(RenderViewImpl* render_view); |
34 virtual ~RendererAccessibility(); | 36 virtual ~RendererAccessibility(); |
35 | 37 |
36 // RenderView::Observer implementation. | 38 // RenderView::Observer implementation. |
37 virtual bool OnMessageReceived(const IPC::Message& message); | 39 virtual bool OnMessageReceived(const IPC::Message& message); |
38 virtual void FocusedNodeChanged(const WebKit::WebNode& node); | 40 virtual void FocusedNodeChanged(const WebKit::WebNode& node); |
39 virtual void DidFinishLoad(WebKit::WebFrame* frame); | 41 virtual void DidFinishLoad(WebKit::WebFrame* frame); |
40 | 42 |
41 // Called when an accessibility notification occurs in WebKit. | 43 // Called when an accessibility notification occurs in WebKit. |
42 virtual void PostAccessibilityNotification( | 44 virtual void PostAccessibilityNotification( |
43 const WebKit::WebAccessibilityObject& obj, | 45 const WebKit::WebAccessibilityObject& obj, |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 // True if verbose logging of accessibility events is on. | 112 // True if verbose logging of accessibility events is on. |
111 bool logging_; | 113 bool logging_; |
112 | 114 |
113 // True if we've sent a load complete notification for this page already. | 115 // True if we've sent a load complete notification for this page already. |
114 bool sent_load_complete_; | 116 bool sent_load_complete_; |
115 | 117 |
116 DISALLOW_COPY_AND_ASSIGN(RendererAccessibility); | 118 DISALLOW_COPY_AND_ASSIGN(RendererAccessibility); |
117 }; | 119 }; |
118 | 120 |
119 #endif // CONTENT_RENDERER_RENDERER_ACCESSIBILITY_H_ | 121 #endif // CONTENT_RENDERER_RENDERER_ACCESSIBILITY_H_ |
OLD | NEW |