summaryrefslogtreecommitdiffstats
path: root/content/common
diff options
context:
space:
mode:
authordmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-18 03:33:21 +0000
committerdmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-18 03:33:21 +0000
commitaded1c52e3de6dbbd56c68067c1023b50b01e4be (patch)
tree878cc59303f43757e8466db0647a8dc6d38ddf89 /content/common
parent25402eb26f2f05b5105523057f06532eaac58764 (diff)
downloadchromium_src-aded1c52e3de6dbbd56c68067c1023b50b01e4be.zip
chromium_src-aded1c52e3de6dbbd56c68067c1023b50b01e4be.tar.gz
chromium_src-aded1c52e3de6dbbd56c68067c1023b50b01e4be.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@283994 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common')
-rw-r--r--content/common/accessibility_mode_enums.h38
-rw-r--r--content/common/frame_message_enums.h2
-rw-r--r--content/common/frame_messages.h7
-rw-r--r--content/common/view_message_enums.h30
-rw-r--r--content/common/view_messages.h8
5 files changed, 46 insertions, 39 deletions
diff --git a/content/common/accessibility_mode_enums.h b/content/common/accessibility_mode_enums.h
new file mode 100644
index 0000000..ee51d6b
--- /dev/null
+++ b/content/common/accessibility_mode_enums.h
@@ -0,0 +1,38 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_COMMON_ACCESSIBILITY_MODE_ENUMS_H_
+#define CONTENT_COMMON_ACCESSIBILITY_MODE_ENUMS_H_
+
+// Note: keep enums in content/browser/resources/accessibility/accessibility.js
+// in sync with these two enums.
+enum AccessibilityModeFlag {
+ // Accessibility updates are processed to create platform trees and events are
+ // passed to platform APIs in the browser.
+ AccessibilityModeFlagPlatform = 1 << 0,
+
+ // Accessibility is on, and the full tree is computed. If this flag is off,
+ // only limited information about editable text nodes is sent to the browser
+ // process. Useful for implementing limited UIA on tablets.
+ AccessibilityModeFlagFullTree = 1 << 1,
+};
+
+enum AccessibilityMode {
+ // All accessibility is off.
+ AccessibilityModeOff = 0,
+
+ // Renderer accessibility is on, platform APIs are called, but only limited
+ // information is available (see AccessibilityModeFlagEditableTextOnly).
+ AccessibilityModeEditableTextOnly = AccessibilityModeFlagPlatform,
+
+ // Renderer accessibility is on, and platform APIs are called.
+ AccessibilityModeComplete =
+ AccessibilityModeFlagPlatform | AccessibilityModeFlagFullTree,
+
+ // Renderer accessibility is on, and events are passed to any extensions
+ // requesting automation, but not to platform accessibility.
+ AccessibilityModeTreeOnly = AccessibilityModeFlagFullTree,
+};
+
+#endif // CONTENT_COMMON_ACCESSIBILITY_MODE_ENUMS_H_
diff --git a/content/common/frame_message_enums.h b/content/common/frame_message_enums.h
index d2f9d8a..c459896 100644
--- a/content/common/frame_message_enums.h
+++ b/content/common/frame_message_enums.h
@@ -5,7 +5,7 @@
#ifndef CONTENT_COMMON_FRAME_MESSAGES_ENUMS_H_
#define CONTENT_COMMON_FRAME_MESSAGES_ENUMS_H_
-#include "ipc/ipc_message_macros.h"
+#include "content/common/accessibility_mode_enums.h"
struct FrameMsg_Navigate_Type {
public:
diff --git a/content/common/frame_messages.h b/content/common/frame_messages.h
index 66ab428..6f7bb5e 100644
--- a/content/common/frame_messages.h
+++ b/content/common/frame_messages.h
@@ -26,6 +26,9 @@
#define IPC_MESSAGE_START FrameMsgStart
+IPC_ENUM_TRAITS_MIN_MAX_VALUE(AccessibilityMode,
+ AccessibilityModeOff,
+ AccessibilityModeComplete)
IPC_ENUM_TRAITS_MIN_MAX_VALUE(content::JavaScriptMessageType,
content::JAVASCRIPT_MESSAGE_TYPE_ALERT,
content::JAVASCRIPT_MESSAGE_TYPE_PROMPT)
@@ -392,6 +395,10 @@ IPC_MESSAGE_ROUTED1(FrameMsg_TextSurroundingSelectionRequest,
// needed to support navigation transitions.
IPC_MESSAGE_ROUTED1(FrameMsg_AddStyleSheetByURL, std::string)
+// Change the accessibility mode in the renderer process.
+IPC_MESSAGE_ROUTED1(FrameMsg_SetAccessibilityMode,
+ AccessibilityMode)
+
// -----------------------------------------------------------------------------
// Messages sent from the renderer to the browser.
diff --git a/content/common/view_message_enums.h b/content/common/view_message_enums.h
index 37179e8..4d3d193 100644
--- a/content/common/view_message_enums.h
+++ b/content/common/view_message_enums.h
@@ -22,34 +22,4 @@ struct ViewHostMsg_UpdateRect_Flags {
}
};
-// Note: keep enums in content/browser/resources/accessibility/accessibility.js
-// in sync with these two enums.
-enum AccessibilityModeFlag {
- // Accessibility updates are processed to create platform trees and events are
- // passed to platform APIs in the browser.
- AccessibilityModeFlagPlatform = 1 << 0,
-
- // Accessibility is on, and the full tree is computed. If this flag is off,
- // only limited information about editable text nodes is sent to the browser
- // process. Useful for implementing limited UIA on tablets.
- AccessibilityModeFlagFullTree = 1 << 1,
-};
-
-enum AccessibilityMode {
- // All accessibility is off.
- AccessibilityModeOff = 0,
-
- // Renderer accessibility is on, platform APIs are called, but only limited
- // information is available (see AccessibilityModeFlagEditableTextOnly).
- AccessibilityModeEditableTextOnly = AccessibilityModeFlagPlatform,
-
- // Renderer accessibility is on, and platform APIs are called.
- AccessibilityModeComplete =
- AccessibilityModeFlagPlatform | AccessibilityModeFlagFullTree,
-
- // Renderer accessibility is on, and events are passed to any extensions
- // requesting automation, but not to platform accessibility.
- AccessibilityModeTreeOnly = AccessibilityModeFlagFullTree,
-};
-
#endif // CONTENT_COMMON_VIEW_MESSAGES_ENUMS_H_
diff --git a/content/common/view_messages.h b/content/common/view_messages.h
index f4a765a..e55e51e 100644
--- a/content/common/view_messages.h
+++ b/content/common/view_messages.h
@@ -68,7 +68,6 @@
#define IPC_MESSAGE_START ViewMsgStart
-IPC_ENUM_TRAITS(AccessibilityMode)
IPC_ENUM_TRAITS(blink::WebMediaPlayerAction::Type)
IPC_ENUM_TRAITS(blink::WebPluginAction::Type)
IPC_ENUM_TRAITS(blink::WebPopupType)
@@ -479,9 +478,6 @@ IPC_STRUCT_BEGIN(ViewMsg_New_Params)
// The properties of the screen associated with the view.
IPC_STRUCT_MEMBER(blink::WebScreenInfo, screen_info)
-
- // The accessibility mode of the renderer.
- IPC_STRUCT_MEMBER(AccessibilityMode, accessibility_mode)
IPC_STRUCT_END()
IPC_STRUCT_BEGIN(ViewMsg_PostMessage_Params)
@@ -869,10 +865,6 @@ IPC_MESSAGE_ROUTED2(ViewMsg_SavePageAsMHTML,
IPC_MESSAGE_CONTROL1(ViewMsg_TempCrashWithData,
GURL /* data */)
-// Change the accessibility mode in the renderer process.
-IPC_MESSAGE_ROUTED1(ViewMsg_SetAccessibilityMode,
- AccessibilityMode)
-
// An acknowledge to ViewHostMsg_MultipleTargetsTouched to notify the renderer
// process to release the magnified image.
IPC_MESSAGE_ROUTED1(ViewMsg_ReleaseDisambiguationPopupBitmap,