| 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 #ifndef CONTENT_RENDERER_ACCESSIBILITY_RENDERER_ACCESSIBILITY_COMPLETE_H_ | 5 #ifndef CONTENT_RENDERER_ACCESSIBILITY_RENDERER_ACCESSIBILITY_COMPLETE_H_ |
| 6 #define CONTENT_RENDERER_ACCESSIBILITY_RENDERER_ACCESSIBILITY_COMPLETE_H_ | 6 #define CONTENT_RENDERER_ACCESSIBILITY_RENDERER_ACCESSIBILITY_COMPLETE_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 // complete accessibility support for assistive technology (as opposed to | 30 // complete accessibility support for assistive technology (as opposed to |
| 31 // partial support - see RendererAccessibilityFocusOnly). | 31 // partial support - see RendererAccessibilityFocusOnly). |
| 32 // | 32 // |
| 33 // This version turns on Blink's accessibility code and sends | 33 // This version turns on Blink's accessibility code and sends |
| 34 // a serialized representation of that tree whenever it changes. It also | 34 // a serialized representation of that tree whenever it changes. It also |
| 35 // handles requests from the browser to perform accessibility actions on | 35 // handles requests from the browser to perform accessibility actions on |
| 36 // nodes in the tree (e.g., change focus, or click on a button). | 36 // nodes in the tree (e.g., change focus, or click on a button). |
| 37 class CONTENT_EXPORT RendererAccessibilityComplete | 37 class CONTENT_EXPORT RendererAccessibilityComplete |
| 38 : public RendererAccessibility { | 38 : public RendererAccessibility { |
| 39 public: | 39 public: |
| 40 explicit RendererAccessibilityComplete(RenderViewImpl* render_view); | 40 explicit RendererAccessibilityComplete(RenderFrameImpl* render_frame); |
| 41 virtual ~RendererAccessibilityComplete(); | 41 virtual ~RendererAccessibilityComplete(); |
| 42 | 42 |
| 43 // RenderView::Observer implementation. | 43 // RenderFrameObserver implementation. |
| 44 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 44 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 45 virtual void FocusedNodeChanged(const blink::WebNode& node) OVERRIDE; | |
| 46 virtual void DidFinishLoad(blink::WebLocalFrame* frame) OVERRIDE; | |
| 47 | 45 |
| 48 // RendererAccessibility. | 46 // RendererAccessibility. |
| 49 virtual void HandleWebAccessibilityEvent( | 47 virtual void HandleWebAccessibilityEvent( |
| 50 const blink::WebAXObject& obj, blink::WebAXEvent event) OVERRIDE; | 48 const blink::WebAXObject& obj, blink::WebAXEvent event) OVERRIDE; |
| 51 virtual RendererAccessibilityType GetType() OVERRIDE; | 49 virtual RendererAccessibilityType GetType() OVERRIDE; |
| 50 virtual void FocusedNodeChanged(const blink::WebNode& node) OVERRIDE; |
| 52 | 51 |
| 53 void HandleAXEvent(const blink::WebAXObject& obj, ui::AXEvent event); | 52 void HandleAXEvent(const blink::WebAXObject& obj, ui::AXEvent event); |
| 54 | 53 |
| 55 protected: | 54 protected: |
| 56 // Send queued events from the renderer to the browser. | 55 // Send queued events from the renderer to the browser. |
| 57 void SendPendingAccessibilityEvents(); | 56 void SendPendingAccessibilityEvents(); |
| 58 | 57 |
| 59 // Check the entire accessibility tree to see if any nodes have | 58 // Check the entire accessibility tree to see if any nodes have |
| 60 // changed location, by comparing their locations to the cached | 59 // changed location, by comparing their locations to the cached |
| 61 // versions. If any have moved, send an IPC with the new locations. | 60 // versions. If any have moved, send an IPC with the new locations. |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 | 95 |
| 97 // Set if we are waiting for an accessibility event ack. | 96 // Set if we are waiting for an accessibility event ack. |
| 98 bool ack_pending_; | 97 bool ack_pending_; |
| 99 | 98 |
| 100 DISALLOW_COPY_AND_ASSIGN(RendererAccessibilityComplete); | 99 DISALLOW_COPY_AND_ASSIGN(RendererAccessibilityComplete); |
| 101 }; | 100 }; |
| 102 | 101 |
| 103 #endif // CONTENT_RENDERER_ACCESSIBILITY_RENDERER_ACCESSIBILITY_COMPLETE_H_ | 102 #endif // CONTENT_RENDERER_ACCESSIBILITY_RENDERER_ACCESSIBILITY_COMPLETE_H_ |
| 104 | 103 |
| 105 } // namespace content | 104 } // namespace content |
| OLD | NEW |