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

Unified Diff: content/renderer/render_frame_impl.h

Issue 273423004: Migrate accessibility from RenderView to RenderFrame. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Get rid of ForEachFrameAndPendingFrame Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/render_frame_impl.h
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index 166f8194993d47e26a01eb987ed76f7ce5194b37..1d50528efaab61a68d67acad999c37646f01bb9a 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/public/common/javascript_message_type.h"
#include "content/public/common/referrer.h"
#include "content/public/renderer/render_frame.h"
@@ -21,6 +22,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"
@@ -61,6 +63,7 @@ class ChildFrameCompositingHelper;
class MediaStreamRendererFactory;
class NotificationProvider;
class PepperPluginInstanceImpl;
+class RendererAccessibility;
class RendererPpapiHost;
class RenderFrameObserver;
class RenderViewImpl;
@@ -141,6 +144,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);
@@ -398,6 +417,7 @@ class CONTENT_EXPORT RenderFrameImpl
private:
friend class RenderFrameObserver;
+ friend class RendererAccessibilityTest;
FRIEND_TEST_ALL_PREFIXES(RendererAccessibilityTest,
AccessibilityMessagesQueueWhileSwappedOut);
FRIEND_TEST_ALL_PREFIXES(RenderFrameImplTest,
@@ -408,6 +428,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;
@@ -456,6 +478,7 @@ class CONTENT_EXPORT RenderFrameImpl
const std::vector<blink::WebCompositionUnderline>& underlines);
void OnExtendSelectionAndDelete(int before, int after);
void OnReload(bool ignore_cache);
+ void OnSetAccessibilityMode(AccessibilityMode new_mode);
#if defined(OS_MACOSX)
void OnCopyToFindPboard();
#endif
@@ -608,6 +631,13 @@ class CONTENT_EXPORT RenderFrameImpl
RendererMediaPlayerManager* media_player_manager_;
#endif
+ // 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);

Powered by Google App Engine
This is Rietveld 408576698