Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(536)

Side by Side Diff: content/renderer/accessibility/renderer_accessibility.h

Issue 23651003: Use Blink accessibility enums in Chromium (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_view_observer.h" 9 #include "content/public/renderer/render_view_observer.h"
10 #include "third_party/WebKit/public/web/WebAccessibilityNotification.h" 10 #include "third_party/WebKit/public/web/WebAXObject.h"
11 11
12 namespace WebKit { 12 namespace WebKit {
13 class WebAccessibilityObject;
14 class WebDocument; 13 class WebDocument;
15 }; 14 };
16 15
17 namespace content { 16 namespace content {
18 class RenderViewImpl; 17 class RenderViewImpl;
19 18
20 // The browser process implement native accessibility APIs, allowing 19 // The browser process implement native accessibility APIs, allowing
21 // assistive technology (e.g., screen readers, magnifiers) to access and 20 // assistive technology (e.g., screen readers, magnifiers) to access and
22 // control the web contents with high-level APIs. These APIs are also used 21 // control the web contents with high-level APIs. These APIs are also used
23 // by automation tools, and Windows 8 uses them to determine when the 22 // by automation tools, and Windows 8 uses them to determine when the
(...skipping 24 matching lines...) Expand all
48 // touch events on Windows 8 in Metro mode. 47 // touch events on Windows 8 in Metro mode.
49 // 48 //
50 // What both subclasses have in common is that they are responsible for 49 // What both subclasses have in common is that they are responsible for
51 // 50 //
52 class CONTENT_EXPORT RendererAccessibility : public RenderViewObserver { 51 class CONTENT_EXPORT RendererAccessibility : public RenderViewObserver {
53 public: 52 public:
54 explicit RendererAccessibility(RenderViewImpl* render_view); 53 explicit RendererAccessibility(RenderViewImpl* render_view);
55 virtual ~RendererAccessibility(); 54 virtual ~RendererAccessibility();
56 55
57 // Called when an accessibility notification occurs in WebKit. 56 // Called when an accessibility notification occurs in WebKit.
58 virtual void HandleWebAccessibilityNotification( 57 virtual void HandleWebAccessibilityEvent(
59 const WebKit::WebAccessibilityObject& obj, 58 const WebKit::WebAXObject& obj, WebKit::WebAXEvent event) = 0;
60 WebKit::WebAccessibilityNotification notification) = 0;
61 59
62 protected: 60 protected:
63 // Returns the main top-level document for this page, or NULL if there's 61 // Returns the main top-level document for this page, or NULL if there's
64 // no view or frame. 62 // no view or frame.
65 WebKit::WebDocument GetMainDocument(); 63 WebKit::WebDocument GetMainDocument();
66 64
67 #ifndef NDEBUG 65 #ifndef NDEBUG
68 const std::string AccessibilityNotificationToString( 66 const std::string AccessibilityEventToString(WebKit::WebAXEvent event);
69 AccessibilityNotification notification);
70 #endif 67 #endif
71 68
72 // The RenderViewImpl that owns us. 69 // The RenderViewImpl that owns us.
73 RenderViewImpl* render_view_; 70 RenderViewImpl* render_view_;
74 71
75 // True if verbose logging of accessibility events is on. 72 // True if verbose logging of accessibility events is on.
76 bool logging_; 73 bool logging_;
77 74
78 DISALLOW_COPY_AND_ASSIGN(RendererAccessibility); 75 DISALLOW_COPY_AND_ASSIGN(RendererAccessibility);
79 }; 76 };
80 77
81 } // namespace content 78 } // namespace content
82 79
83 #endif // CONTENT_RENDERER_ACCESSIBILITY_RENDERER_ACCESSIBILITY_H_ 80 #endif // CONTENT_RENDERER_ACCESSIBILITY_RENDERER_ACCESSIBILITY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698