summaryrefslogtreecommitdiffstats
path: root/chromium/content/renderer/accessibility/renderer_accessibility.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/content/renderer/accessibility/renderer_accessibility.h')
-rw-r--r--chromium/content/renderer/accessibility/renderer_accessibility.h31
1 files changed, 19 insertions, 12 deletions
diff --git a/chromium/content/renderer/accessibility/renderer_accessibility.h b/chromium/content/renderer/accessibility/renderer_accessibility.h
index cc157ff0671..9ddb6ed4405 100644
--- a/chromium/content/renderer/accessibility/renderer_accessibility.h
+++ b/chromium/content/renderer/accessibility/renderer_accessibility.h
@@ -16,6 +16,18 @@ class WebDocument;
namespace content {
class RenderViewImpl;
+enum RendererAccessibilityType {
+ // Turns on Blink accessibility and provides a full accessibility
+ // implementation for when assistive technology is running.
+ RendererAccessibilityTypeComplete,
+
+ // Does not turn on Blink accessibility. Only sends a minimal accessible tree
+ // to the browser whenever focus changes. This mode is currently used to
+ // support opening the on-screen keyboard in response to touch events on
+ // Windows 8 in Metro mode.
+ RendererAccessibilityTypeFocusOnly
+};
+
// The browser process implement native accessibility APIs, allowing
// assistive technology (e.g., screen readers, magnifiers) to access and
// control the web contents with high-level APIs. These APIs are also used
@@ -36,42 +48,37 @@ class RenderViewImpl;
// This base class just contains common code and will not do anything by itself.
// The two subclasses are:
//
-// RendererAccessibilityComplete - turns on WebKit accessibility and
+// RendererAccessibilityComplete - turns on Blink accessibility and
// provides a full accessibility implementation for when
// assistive technology is running.
//
-// RendererAccessibilityFocusOnly - does not turn on WebKit
+// RendererAccessibilityFocusOnly - does not turn on Blink
// accessibility. Only sends a minimal accessible tree to the
// browser whenever focus changes. This mode is currently used
// to support opening the on-screen keyboard in response to
// touch events on Windows 8 in Metro mode.
//
-// What both subclasses have in common is that they are responsible for
-//
class CONTENT_EXPORT RendererAccessibility : public RenderViewObserver {
public:
explicit RendererAccessibility(RenderViewImpl* render_view);
virtual ~RendererAccessibility();
- // Called when an accessibility notification occurs in WebKit.
+ // Called when an accessibility notification occurs in Blink.
virtual void HandleWebAccessibilityEvent(
const blink::WebAXObject& obj, blink::WebAXEvent event) = 0;
+ // Gets the type of this RendererAccessibility object. Primarily intended for
+ // testing.
+ virtual RendererAccessibilityType GetType() = 0;
+
protected:
// Returns the main top-level document for this page, or NULL if there's
// no view or frame.
blink::WebDocument GetMainDocument();
-#ifndef NDEBUG
- const std::string AccessibilityEventToString(blink::WebAXEvent event);
-#endif
-
// The RenderViewImpl that owns us.
RenderViewImpl* render_view_;
- // True if verbose logging of accessibility events is on.
- bool logging_;
-
DISALLOW_COPY_AND_ASSIGN(RendererAccessibility);
};