summaryrefslogtreecommitdiffstats
path: root/content/browser/web_contents/web_contents_impl.h
diff options
context:
space:
mode:
authormkwst@chromium.org <mkwst@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-18 12:30:45 +0000
committermkwst@chromium.org <mkwst@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-18 12:30:45 +0000
commit39d842cd75fbdbaf30e93cd9beff983cd3acb348 (patch)
treec78c63822d24adc90384b98b7cbe0c2e0d18a0ed /content/browser/web_contents/web_contents_impl.h
parentf98bb7f5ef1e6ce518b021826256beb9ac58335e (diff)
downloadchromium_src-39d842cd75fbdbaf30e93cd9beff983cd3acb348.zip
chromium_src-39d842cd75fbdbaf30e93cd9beff983cd3acb348.tar.gz
chromium_src-39d842cd75fbdbaf30e93cd9beff983cd3acb348.tar.bz2
Revert of Revert of Migrate accessibility from RenderView to RenderFrame. (https://codereview.chromium.org/407493002/)
Reason for revert: Reverting the revert. This didn't break the tree; it's still broken without the patch. :( Sorry for the noise! Original issue's description: > Revert of Migrate accessibility from RenderView to RenderFrame. (https://codereview.chromium.org/273423004/) > > Reason for revert: > Speculative revert to fix XP bots. > > XP bots started crashing http://build.chromium.org/p/chromium.win/builders/XP%20Tests%20%281%29/builds/32011 and http://build.chromium.org/p/chromium.win/builders/XP%20Tests%20%282%29/builds/34677 > > This CL is the most suspicious in the range. If it doesn't fix the bots, I'll unrevert it. > > Original issue's description: > > Migrate accessibility from RenderView to RenderFrame and RVH to RFH. > > > > In preparation for out-of-process iframes, move almost all accessibility > > functionality from RenderView to RenderFrame, and from RVHI and RWHI > > to RFHI. > > > > In addition, the accessibility mode is moved to WebContents, and changing > > the mode triggers changing it on all frames. > > > > BUG=368298 > > R=jam@chromium.org, kenrb@chromium.org, nick@chromium.org > > > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=283994 > > TBR=dmazzoni@chromium.org > NOTRY=true > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=284032 TBR=creis@chromium.org,nick@chromium.org,nasko@chromium.org,jam@chromium.org,dtseng@chromium.org,jschuh@chromium.org,tsepez@chromium.org,kenrb@chromium.org,dmazzoni@chromium.org NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/407493004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@284065 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/web_contents/web_contents_impl.h')
-rw-r--r--content/browser/web_contents/web_contents_impl.h38
1 files changed, 33 insertions, 5 deletions
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
index b001642..91b2d4b 100644
--- a/content/browser/web_contents/web_contents_impl.h
+++ b/content/browser/web_contents/web_contents_impl.h
@@ -23,6 +23,7 @@
#include "content/browser/frame_host/render_frame_host_manager.h"
#include "content/browser/renderer_host/render_view_host_delegate.h"
#include "content/browser/renderer_host/render_widget_host_delegate.h"
+#include "content/common/accessibility_mode_enums.h"
#include "content/common/content_export.h"
#include "content/public/browser/color_chooser.h"
#include "content/public/browser/notification_observer.h"
@@ -95,6 +96,8 @@ class CONTENT_EXPORT WebContentsImpl
const WebContents::CreateParams& params,
WebContentsImpl* opener);
+ static std::vector<WebContentsImpl*> GetAllWebContents();
+
// Returns the opener WebContentsImpl, if any. This can be set to null if the
// opener is closed or the page clears its window.opener.
WebContentsImpl* opener() const { return opener_; }
@@ -171,6 +174,19 @@ class CONTENT_EXPORT WebContentsImpl
bool should_normally_be_visible() { return should_normally_be_visible_; }
+ // Broadcasts the mode change to all frames.
+ void SetAccessibilityMode(AccessibilityMode mode);
+
+ // Adds the given accessibility mode to the current accessibility mode
+ // bitmap.
+ void AddAccessibilityMode(AccessibilityMode mode);
+
+ // Removes the given accessibility mode from the current accessibility
+ // mode bitmap, managing the bits that are shared with other modes such
+ // that a bit will only be turned off when all modes that depend on it
+ // have been removed.
+ void RemoveAccessibilityMode(AccessibilityMode mode);
+
// WebContents ------------------------------------------------------
virtual WebContentsDelegate* GetDelegate() OVERRIDE;
virtual void SetDelegate(WebContentsDelegate* delegate) OVERRIDE;
@@ -196,6 +212,9 @@ class CONTENT_EXPORT WebContentsImpl
virtual WebUI* GetCommittedWebUI() const OVERRIDE;
virtual void SetUserAgentOverride(const std::string& override) OVERRIDE;
virtual const std::string& GetUserAgentOverride() const OVERRIDE;
+ virtual void EnableTreeOnlyAccessibilityMode() OVERRIDE;
+ virtual bool IsTreeOnlyAccessibilityModeForTesting() const OVERRIDE;
+ virtual bool IsFullAccessibilityModeForTesting() const OVERRIDE;
#if defined(OS_WIN)
virtual void SetParentNativeViewAccessible(
gfx::NativeViewAccessible accessible_parent) OVERRIDE;
@@ -355,6 +374,12 @@ class CONTENT_EXPORT WebContentsImpl
const std::string& encoding) OVERRIDE;
virtual WebContents* GetAsWebContents() OVERRIDE;
virtual bool IsNeverVisible() OVERRIDE;
+ virtual AccessibilityMode GetAccessibilityMode() const OVERRIDE;
+ virtual void AccessibilityEventReceived(
+ const std::vector<AXEventNotificationDetails>& details) OVERRIDE;
+#if defined(OS_WIN)
+ virtual gfx::NativeViewAccessible GetParentNativeViewAccessible() OVERRIDE;
+#endif
// RenderViewHostDelegate ----------------------------------------------------
virtual RenderViewHostDelegateView* GetDelegateView() OVERRIDE;
@@ -443,8 +468,6 @@ class CONTENT_EXPORT WebContentsImpl
SiteInstance* instance) OVERRIDE;
virtual SessionStorageNamespaceMap GetSessionStorageNamespaceMap() OVERRIDE;
virtual FrameTree* GetFrameTree() OVERRIDE;
- virtual void AccessibilityEventReceived(
- const std::vector<AXEventNotificationDetails>& details) OVERRIDE;
// NavigatorDelegate ---------------------------------------------------------
@@ -509,9 +532,10 @@ class CONTENT_EXPORT WebContentsImpl
const blink::WebGestureEvent& event) OVERRIDE;
virtual void DidSendScreenRects(RenderWidgetHostImpl* rwh) OVERRIDE;
virtual void OnTouchEmulationEnabled(bool enabled) OVERRIDE;
-#if defined(OS_WIN)
- virtual gfx::NativeViewAccessible GetParentNativeViewAccessible() OVERRIDE;
-#endif
+ virtual BrowserAccessibilityManager* GetRootBrowserAccessibilityManager()
+ OVERRIDE;
+ virtual BrowserAccessibilityManager*
+ GetOrCreateRootBrowserAccessibilityManager() OVERRIDE;
// RenderFrameHostManager::Delegate ------------------------------------------
@@ -1154,6 +1178,10 @@ class CONTENT_EXPORT WebContentsImpl
scoped_ptr<ScreenOrientationDispatcherHost>
screen_orientation_dispatcher_host_;
+ // The accessibility mode for all frames. This is queried when each frame
+ // is created, and broadcast to all frames when it changes.
+ AccessibilityMode accessibility_mode_;
+
DISALLOW_COPY_AND_ASSIGN(WebContentsImpl);
};