diff options
author | dmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-26 18:14:30 +0000 |
---|---|---|
committer | dmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-26 18:14:30 +0000 |
commit | 956402189e20dcbe46db78346690a76dfb3ee6b4 (patch) | |
tree | 17533b547dfbcb9642a5755d2da54468b4c8699a /content/renderer/render_frame_impl.h | |
parent | 03924bb16abed54fd43c446396c21135071df7a9 (diff) | |
download | chromium_src-956402189e20dcbe46db78346690a76dfb3ee6b4.zip chromium_src-956402189e20dcbe46db78346690a76dfb3ee6b4.tar.gz chromium_src-956402189e20dcbe46db78346690a76dfb3ee6b4.tar.bz2 |
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
Review URL: https://codereview.chromium.org/273423004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285767 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer/render_frame_impl.h')
-rw-r--r-- | content/renderer/render_frame_impl.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h index 936f677..8b2c98d 100644 --- a/content/renderer/render_frame_impl.h +++ b/content/renderer/render_frame_impl.h @@ -14,6 +14,7 @@ #include "base/memory/weak_ptr.h" #include "base/observer_list.h" #include "base/process/process_handle.h" +#include "content/common/accessibility_mode_enums.h" #include "content/common/mojo/service_registry_impl.h" #include "content/public/common/javascript_message_type.h" #include "content/public/common/referrer.h" @@ -22,6 +23,7 @@ #include "content/renderer/render_frame_proxy.h" #include "content/renderer/renderer_webcookiejar_impl.h" #include "ipc/ipc_message.h" +#include "third_party/WebKit/public/web/WebAXObject.h" #include "third_party/WebKit/public/web/WebDataSource.h" #include "third_party/WebKit/public/web/WebFrameClient.h" #include "third_party/WebKit/public/web/WebHistoryCommitType.h" @@ -65,6 +67,7 @@ class MidiDispatcher; class NotificationProvider; class PepperPluginInstanceImpl; class PushMessagingDispatcher; +class RendererAccessibility; class RendererCdmManager; class RendererMediaPlayerManager; class RendererPpapiHost; @@ -148,6 +151,22 @@ class CONTENT_EXPORT RenderFrameImpl virtual void didStopLoading(); virtual void didChangeLoadProgress(double load_progress); + AccessibilityMode accessibility_mode() { + return accessibility_mode_; + } + + RendererAccessibility* renderer_accessibility() { + return renderer_accessibility_; + } + + void HandleWebAccessibilityEvent(const blink::WebAXObject& obj, + blink::WebAXEvent event); + + // TODO(dmazzoni): the only reason this is here is to plumb it through to + // RendererAccessibility. It should be part of RenderFrameObserver, once + // blink has a separate accessibility tree per frame. + void FocusedNodeChanged(const blink::WebNode& node); + #if defined(ENABLE_PLUGINS) // Notification that a PPAPI plugin has been created. void PepperPluginCreated(RendererPpapiHost* host); @@ -420,6 +439,7 @@ class CONTENT_EXPORT RenderFrameImpl private: friend class RenderFrameObserver; + friend class RendererAccessibilityTest; FRIEND_TEST_ALL_PREFIXES(RendererAccessibilityTest, AccessibilityMessagesQueueWhileSwappedOut); FRIEND_TEST_ALL_PREFIXES(RenderFrameImplTest, @@ -430,6 +450,8 @@ class CONTENT_EXPORT RenderFrameImpl FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, SendSwapOutACK); FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, SetEditableSelectionAndComposition); + FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, + OnSetAccessibilityMode); typedef std::map<GURL, double> HostZoomLevels; @@ -477,6 +499,7 @@ class CONTENT_EXPORT RenderFrameImpl void OnReload(bool ignore_cache); void OnTextSurroundingSelectionRequest(size_t max_length); void OnAddStyleSheetByURL(const std::string& url); + void OnSetAccessibilityMode(AccessibilityMode new_mode); #if defined(OS_MACOSX) void OnCopyToFindPboard(); #endif @@ -665,6 +688,13 @@ class CONTENT_EXPORT RenderFrameImpl // initialized. ScreenOrientationDispatcher* screen_orientation_dispatcher_; + // The current accessibility mode. + AccessibilityMode accessibility_mode_; + + // Only valid if |accessibility_mode_| is anything other than + // AccessibilityModeOff. + RendererAccessibility* renderer_accessibility_; + base::WeakPtrFactory<RenderFrameImpl> weak_factory_; DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); |