| 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_H_ | 5 #ifndef CONTENT_RENDERER_ACCESSIBILITY_RENDERER_ACCESSIBILITY_H_ |
| 6 #define CONTENT_RENDERER_ACCESSIBILITY_RENDERER_ACCESSIBILITY_H_ | 6 #define CONTENT_RENDERER_ACCESSIBILITY_RENDERER_ACCESSIBILITY_H_ |
| 7 | 7 |
| 8 #include "content/common/accessibility_messages.h" | 8 #include "content/common/accessibility_messages.h" |
| 9 #include "content/public/renderer/render_frame_observer.h" | 9 #include "content/public/renderer/render_frame_observer.h" |
| 10 #include "third_party/WebKit/public/web/WebAXObject.h" | 10 #include "third_party/WebKit/public/web/WebAXObject.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 // | 54 // |
| 55 // RendererAccessibilityFocusOnly - does not turn on Blink | 55 // RendererAccessibilityFocusOnly - does not turn on Blink |
| 56 // accessibility. Only sends a minimal accessible tree to the | 56 // accessibility. Only sends a minimal accessible tree to the |
| 57 // browser whenever focus changes. This mode is currently used | 57 // browser whenever focus changes. This mode is currently used |
| 58 // to support opening the on-screen keyboard in response to | 58 // to support opening the on-screen keyboard in response to |
| 59 // touch events on Windows 8 in Metro mode. | 59 // touch events on Windows 8 in Metro mode. |
| 60 // | 60 // |
| 61 class CONTENT_EXPORT RendererAccessibility : public RenderFrameObserver { | 61 class CONTENT_EXPORT RendererAccessibility : public RenderFrameObserver { |
| 62 public: | 62 public: |
| 63 explicit RendererAccessibility(RenderFrameImpl* render_frame); | 63 explicit RendererAccessibility(RenderFrameImpl* render_frame); |
| 64 virtual ~RendererAccessibility(); | 64 ~RendererAccessibility() override; |
| 65 | 65 |
| 66 // Called when an accessibility notification occurs in Blink. | 66 // Called when an accessibility notification occurs in Blink. |
| 67 virtual void HandleWebAccessibilityEvent( | 67 virtual void HandleWebAccessibilityEvent( |
| 68 const blink::WebAXObject& obj, blink::WebAXEvent event) = 0; | 68 const blink::WebAXObject& obj, blink::WebAXEvent event) = 0; |
| 69 virtual void FocusedNodeChanged(const blink::WebNode& node) = 0; | 69 virtual void FocusedNodeChanged(const blink::WebNode& node) = 0; |
| 70 | 70 |
| 71 // Gets the type of this RendererAccessibility object. Primarily intended for | 71 // Gets the type of this RendererAccessibility object. Primarily intended for |
| 72 // testing. | 72 // testing. |
| 73 virtual RendererAccessibilityType GetType() = 0; | 73 virtual RendererAccessibilityType GetType() = 0; |
| 74 | 74 |
| 75 protected: | 75 protected: |
| 76 // Returns the main top-level document for this page, or NULL if there's | 76 // Returns the main top-level document for this page, or NULL if there's |
| 77 // no view or frame. | 77 // no view or frame. |
| 78 blink::WebDocument GetMainDocument(); | 78 blink::WebDocument GetMainDocument(); |
| 79 | 79 |
| 80 // The RenderFrameImpl that owns us. | 80 // The RenderFrameImpl that owns us. |
| 81 RenderFrameImpl* render_frame_; | 81 RenderFrameImpl* render_frame_; |
| 82 | 82 |
| 83 DISALLOW_COPY_AND_ASSIGN(RendererAccessibility); | 83 DISALLOW_COPY_AND_ASSIGN(RendererAccessibility); |
| 84 }; | 84 }; |
| 85 | 85 |
| 86 } // namespace content | 86 } // namespace content |
| 87 | 87 |
| 88 #endif // CONTENT_RENDERER_ACCESSIBILITY_RENDERER_ACCESSIBILITY_H_ | 88 #endif // CONTENT_RENDERER_ACCESSIBILITY_RENDERER_ACCESSIBILITY_H_ |
| OLD | NEW |