summaryrefslogtreecommitdiffstats
path: root/chrome/browser/renderer_host/render_widget_host.h
diff options
context:
space:
mode:
authorjcivelli@chromium.org <jcivelli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-10 00:22:56 +0000
committerjcivelli@chromium.org <jcivelli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-10 00:22:56 +0000
commitf017d8da88460724e9405c3c61e346ecca36a1a2 (patch)
tree38f6f689a5099d49ca7c491395c8bb53a7787456 /chrome/browser/renderer_host/render_widget_host.h
parentead48028cab08493a3a5c897bcf779602d1cbe85 (diff)
downloadchromium_src-f017d8da88460724e9405c3c61e346ecca36a1a2.zip
chromium_src-f017d8da88460724e9405c3c61e346ecca36a1a2.tar.gz
chromium_src-f017d8da88460724e9405c3c61e346ecca36a1a2.tar.bz2
Relanding 49339
It was unjustly reverted due to flaky unit-test failure. Original review: http://codereview.chromium.org/2358003 TBR=ctguil@chromium.org Review URL: http://codereview.chromium.org/2720003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49344 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host/render_widget_host.h')
-rw-r--r--chrome/browser/renderer_host/render_widget_host.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/chrome/browser/renderer_host/render_widget_host.h b/chrome/browser/renderer_host/render_widget_host.h
index ab64ef7..27bb5dd 100644
--- a/chrome/browser/renderer_host/render_widget_host.h
+++ b/chrome/browser/renderer_host/render_widget_host.h
@@ -6,6 +6,8 @@
#define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_
#include <deque>
+#include <string>
+#include <vector>
#include "app/surface/transport_dib.h"
#include "base/gtest_prod_util.h"
@@ -370,6 +372,14 @@ class RenderWidgetHost : public IPC::Channel::Listener,
// Requests a snapshot of an accessible DOM tree from the renderer.
void RequestAccessibilityTree();
+ // Aid for determining when an accessibility tree request can be made. Set by
+ // TabContents to true on document load and to false on page nativigation.
+ void SetDocumentLoaded(bool document_loaded);
+
+ // Enable renderer accessibility. This should only be called when a
+ // screenreader is detected.
+ void EnableRendererAccessibility();
+
// Relays a request from assistive technology to set focus to the
// node with this accessibility object id.
void SetAccessibilityFocus(int acc_obj_id);
@@ -530,6 +540,10 @@ class RenderWidgetHost : public IPC::Channel::Listener,
// input messages to be coalesced.
void ProcessWheelAck();
+ // True if renderer accessibility is enabled. This should only be set when a
+ // screenreader is detected as it can potentially slow down Chrome.
+ static bool renderer_accessible_;
+
// The View associated with the RenderViewHost. The lifetime of this object
// is associated with the lifetime of the Render process. If the Renderer
// crashes, its View is destroyed and this pointer becomes NULL, even though
@@ -667,6 +681,14 @@ class RenderWidgetHost : public IPC::Channel::Listener,
// changed.
bool suppress_next_char_events_;
+ // Keep track of if we have a loaded document so that we can request an
+ // accessibility tree on demand when renderer accessibility is enabled.
+ bool document_loaded_;
+
+ // Keep track of if we've already requested the accessibility tree so
+ // we don't do it more than once.
+ bool requested_accessibility_tree_;
+
// Optional video YUV layer for used for out-of-process compositing.
scoped_ptr<VideoLayer> video_layer_;