Commit a7516444 authored by Randy Rossi's avatar Randy Rossi Committed by Commit Bot

Move common accessibility IPC messages to extensions/common

These IPC extension messages are identical between chrome/chromecast.
Moving up to extensions/common

Bug: 837773
Test: Deploy ChromeOs manually (tidus)
Change-Id: I8884ea9726b69efb40c71614de11889bf01a2bb4
Reviewed-on: https://chromium-review.googlesource.com/c/1261976Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Reviewed-by: default avatarDominick Ng <dominickn@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Randy Rossi <rmrossi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#610442}
parent b19fcbad
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include "chrome/browser/extensions/api/automation_internal/automation_event_router.h" #include "chrome/browser/extensions/api/automation_internal/automation_event_router.h"
#include "chrome/browser/ui/aura/accessibility/automation_manager_aura.h" #include "chrome/browser/ui/aura/accessibility/automation_manager_aura.h"
#include "chrome/common/extensions/chrome_extension_messages.h" #include "chrome/common/extensions/chrome_extension_messages.h"
#include "extensions/common/extension_messages.h"
#include "ui/accessibility/platform/ax_android_constants.h" #include "ui/accessibility/platform/ax_android_constants.h"
#include "ui/aura/window.h" #include "ui/aura/window.h"
#include "ui/views/view.h" #include "ui/views/view.h"
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include "content/public/browser/render_process_host.h" #include "content/public/browser/render_process_host.h"
#include "extensions/browser/event_router.h" #include "extensions/browser/event_router.h"
#include "extensions/common/extension.h" #include "extensions/common/extension.h"
#include "extensions/common/extension_messages.h"
#include "ui/accessibility/ax_action_data.h" #include "ui/accessibility/ax_action_data.h"
#include "ui/accessibility/ax_enums.mojom.h" #include "ui/accessibility/ax_enums.mojom.h"
#include "ui/accessibility/ax_node_data.h" #include "ui/accessibility/ax_node_data.h"
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h" #include "content/public/browser/notification_registrar.h"
#include "extensions/common/extension_id.h" #include "extensions/common/extension_id.h"
#include "extensions/common/extension_messages.h"
#include "ui/accessibility/ax_tree_id.h" #include "ui/accessibility/ax_tree_id.h"
class Profile; class Profile;
......
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
#include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_delegate.h" #include "content/public/browser/web_contents_delegate.h"
#include "extensions/common/constants.h" #include "extensions/common/constants.h"
#include "extensions/common/extension_messages.h"
#include "extensions/common/mojo/app_window.mojom.h" #include "extensions/common/mojo/app_window.mojom.h"
#include "printing/buildflags/buildflags.h" #include "printing/buildflags/buildflags.h"
#include "services/service_manager/public/cpp/interface_provider.h" #include "services/service_manager/public/cpp/interface_provider.h"
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include "chrome/browser/extensions/api/automation_internal/automation_event_router.h" #include "chrome/browser/extensions/api/automation_internal/automation_event_router.h"
#include "chrome/common/extensions/chrome_extension_messages.h" #include "chrome/common/extensions/chrome_extension_messages.h"
#include "content/public/browser/render_frame_host.h" #include "content/public/browser/render_frame_host.h"
#include "extensions/common/extension_messages.h"
#include "ui/accessibility/ax_action_data.h" #include "ui/accessibility/ax_action_data.h"
#include "ui/accessibility/ax_enum_util.h" #include "ui/accessibility/ax_enum_util.h"
#include "ui/accessibility/ax_enums.mojom.h" #include "ui/accessibility/ax_enums.mojom.h"
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include "content/public/browser/render_frame_host.h" #include "content/public/browser/render_frame_host.h"
#include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents.h"
#include "content/public/test/browser_test_utils.h" #include "content/public/test/browser_test_utils.h"
#include "extensions/common/extension_messages.h"
#include "ui/accessibility/ax_node_data.h" #include "ui/accessibility/ax_node_data.h"
#include "ui/views/accessibility/view_accessibility.h" #include "ui/views/accessibility/view_accessibility.h"
#include "ui/views/view.h" #include "ui/views/view.h"
......
...@@ -31,85 +31,4 @@ ...@@ -31,85 +31,4 @@
// Messages sent from the browser to the renderer. // Messages sent from the browser to the renderer.
IPC_STRUCT_TRAITS_BEGIN(ui::AXNodeData)
IPC_STRUCT_TRAITS_MEMBER(id)
IPC_STRUCT_TRAITS_MEMBER(role)
IPC_STRUCT_TRAITS_MEMBER(state)
IPC_STRUCT_TRAITS_MEMBER(actions)
IPC_STRUCT_TRAITS_MEMBER(string_attributes)
IPC_STRUCT_TRAITS_MEMBER(int_attributes)
IPC_STRUCT_TRAITS_MEMBER(float_attributes)
IPC_STRUCT_TRAITS_MEMBER(bool_attributes)
IPC_STRUCT_TRAITS_MEMBER(intlist_attributes)
IPC_STRUCT_TRAITS_MEMBER(stringlist_attributes)
IPC_STRUCT_TRAITS_MEMBER(html_attributes)
IPC_STRUCT_TRAITS_MEMBER(child_ids)
IPC_STRUCT_TRAITS_MEMBER(relative_bounds)
IPC_STRUCT_TRAITS_END()
IPC_STRUCT_TRAITS_BEGIN(ui::AXTreeData)
IPC_STRUCT_TRAITS_MEMBER(tree_id)
IPC_STRUCT_TRAITS_MEMBER(parent_tree_id)
IPC_STRUCT_TRAITS_MEMBER(focused_tree_id)
IPC_STRUCT_TRAITS_MEMBER(url)
IPC_STRUCT_TRAITS_MEMBER(title)
IPC_STRUCT_TRAITS_MEMBER(mimetype)
IPC_STRUCT_TRAITS_MEMBER(doctype)
IPC_STRUCT_TRAITS_MEMBER(loaded)
IPC_STRUCT_TRAITS_MEMBER(loading_progress)
IPC_STRUCT_TRAITS_MEMBER(focus_id)
IPC_STRUCT_TRAITS_MEMBER(sel_anchor_object_id)
IPC_STRUCT_TRAITS_MEMBER(sel_anchor_offset)
IPC_STRUCT_TRAITS_MEMBER(sel_anchor_affinity)
IPC_STRUCT_TRAITS_MEMBER(sel_focus_object_id)
IPC_STRUCT_TRAITS_MEMBER(sel_focus_offset)
IPC_STRUCT_TRAITS_MEMBER(sel_focus_affinity)
IPC_STRUCT_TRAITS_END()
IPC_STRUCT_TRAITS_BEGIN(ui::AXTreeUpdate)
IPC_STRUCT_TRAITS_MEMBER(has_tree_data)
IPC_STRUCT_TRAITS_MEMBER(tree_data)
IPC_STRUCT_TRAITS_MEMBER(node_id_to_clear)
IPC_STRUCT_TRAITS_MEMBER(root_id)
IPC_STRUCT_TRAITS_MEMBER(nodes)
IPC_STRUCT_TRAITS_MEMBER(event_from)
IPC_STRUCT_TRAITS_END()
IPC_STRUCT_BEGIN(ExtensionMsg_AccessibilityEventBundleParams)
// ID of the accessibility tree that this event applies to.
IPC_STRUCT_MEMBER(ui::AXTreeID, tree_id)
// Zero or more updates to the accessibility tree to apply first.
IPC_STRUCT_MEMBER(std::vector<ui::AXTreeUpdate>, updates)
// Zero or more events to fire after the tree updates have been applied.
IPC_STRUCT_MEMBER(std::vector<ui::AXEvent>, events)
// The mouse location in screen coordinates.
IPC_STRUCT_MEMBER(gfx::Point, mouse_location)
IPC_STRUCT_END()
IPC_STRUCT_BEGIN(ExtensionMsg_AccessibilityLocationChangeParams)
// ID of the accessibility tree that this event applies to.
IPC_STRUCT_MEMBER(ui::AXTreeID, tree_id)
// ID of the object whose location is changing.
IPC_STRUCT_MEMBER(int, id)
// The object's new location info.
IPC_STRUCT_MEMBER(ui::AXRelativeBounds, new_location)
IPC_STRUCT_END()
// Forward an accessibility message to an extension process where an
// extension is using the automation API to listen for accessibility events.
IPC_MESSAGE_CONTROL2(ExtensionMsg_AccessibilityEventBundle,
ExtensionMsg_AccessibilityEventBundleParams /* events */,
bool /* is_active_profile */)
// Forward an accessibility location change message to an extension process
// where an extension is using the automation API to listen for
// accessibility events.
IPC_MESSAGE_CONTROL1(ExtensionMsg_AccessibilityLocationChange,
ExtensionMsg_AccessibilityLocationChangeParams)
#endif // CHROME_COMMON_EXTENSIONS_CHROME_EXTENSION_MESSAGES_H_ #endif // CHROME_COMMON_EXTENSIONS_CHROME_EXTENSION_MESSAGES_H_
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#include "base/no_destructor.h" #include "base/no_destructor.h"
#include "chrome/common/extensions/chrome_extension_messages.h" #include "chrome/common/extensions/chrome_extension_messages.h"
#include "chrome/renderer/extensions/automation_internal_custom_bindings.h" #include "chrome/renderer/extensions/automation_internal_custom_bindings.h"
#include "extensions/common/extension_messages.h"
#include "ui/accessibility/ax_node.h" #include "ui/accessibility/ax_node.h"
namespace extensions { namespace extensions {
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include "content/public/renderer/render_thread.h" #include "content/public/renderer/render_thread.h"
#include "content/public/renderer/render_view.h" #include "content/public/renderer/render_view.h"
#include "extensions/common/extension.h" #include "extensions/common/extension.h"
#include "extensions/common/extension_messages.h"
#include "extensions/common/manifest.h" #include "extensions/common/manifest.h"
#include "extensions/common/manifest_handlers/automation.h" #include "extensions/common/manifest_handlers/automation.h"
#include "extensions/common/manifest_handlers/background_info.h" #include "extensions/common/manifest_handlers/background_info.h"
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h" #include "content/public/browser/notification_registrar.h"
#include "extensions/common/extension_id.h" #include "extensions/common/extension_id.h"
#include "extensions/common/extension_messages.h"
namespace content { namespace content {
class BrowserContext; class BrowserContext;
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include "content/public/browser/ax_event_notification_details.h" #include "content/public/browser/ax_event_notification_details.h"
#include "content/public/browser/browser_context.h" #include "content/public/browser/browser_context.h"
#include "content/public/browser/render_frame_host.h" #include "content/public/browser/render_frame_host.h"
#include "extensions/common/extension_messages.h"
#include "ui/accessibility/ax_action_data.h" #include "ui/accessibility/ax_action_data.h"
#include "ui/accessibility/ax_enums.mojom.h" #include "ui/accessibility/ax_enums.mojom.h"
#include "ui/accessibility/ax_tree_id_registry.h" #include "ui/accessibility/ax_tree_id_registry.h"
......
...@@ -31,85 +31,4 @@ ...@@ -31,85 +31,4 @@
// Messages sent from the browser to the renderer. // Messages sent from the browser to the renderer.
IPC_STRUCT_TRAITS_BEGIN(ui::AXNodeData)
IPC_STRUCT_TRAITS_MEMBER(id)
IPC_STRUCT_TRAITS_MEMBER(role)
IPC_STRUCT_TRAITS_MEMBER(state)
IPC_STRUCT_TRAITS_MEMBER(actions)
IPC_STRUCT_TRAITS_MEMBER(string_attributes)
IPC_STRUCT_TRAITS_MEMBER(int_attributes)
IPC_STRUCT_TRAITS_MEMBER(float_attributes)
IPC_STRUCT_TRAITS_MEMBER(bool_attributes)
IPC_STRUCT_TRAITS_MEMBER(intlist_attributes)
IPC_STRUCT_TRAITS_MEMBER(stringlist_attributes)
IPC_STRUCT_TRAITS_MEMBER(html_attributes)
IPC_STRUCT_TRAITS_MEMBER(child_ids)
IPC_STRUCT_TRAITS_MEMBER(relative_bounds)
IPC_STRUCT_TRAITS_END()
IPC_STRUCT_TRAITS_BEGIN(ui::AXTreeData)
IPC_STRUCT_TRAITS_MEMBER(tree_id)
IPC_STRUCT_TRAITS_MEMBER(parent_tree_id)
IPC_STRUCT_TRAITS_MEMBER(focused_tree_id)
IPC_STRUCT_TRAITS_MEMBER(url)
IPC_STRUCT_TRAITS_MEMBER(title)
IPC_STRUCT_TRAITS_MEMBER(mimetype)
IPC_STRUCT_TRAITS_MEMBER(doctype)
IPC_STRUCT_TRAITS_MEMBER(loaded)
IPC_STRUCT_TRAITS_MEMBER(loading_progress)
IPC_STRUCT_TRAITS_MEMBER(focus_id)
IPC_STRUCT_TRAITS_MEMBER(sel_anchor_object_id)
IPC_STRUCT_TRAITS_MEMBER(sel_anchor_offset)
IPC_STRUCT_TRAITS_MEMBER(sel_anchor_affinity)
IPC_STRUCT_TRAITS_MEMBER(sel_focus_object_id)
IPC_STRUCT_TRAITS_MEMBER(sel_focus_offset)
IPC_STRUCT_TRAITS_MEMBER(sel_focus_affinity)
IPC_STRUCT_TRAITS_END()
IPC_STRUCT_TRAITS_BEGIN(ui::AXTreeUpdate)
IPC_STRUCT_TRAITS_MEMBER(has_tree_data)
IPC_STRUCT_TRAITS_MEMBER(tree_data)
IPC_STRUCT_TRAITS_MEMBER(node_id_to_clear)
IPC_STRUCT_TRAITS_MEMBER(root_id)
IPC_STRUCT_TRAITS_MEMBER(nodes)
IPC_STRUCT_TRAITS_MEMBER(event_from)
IPC_STRUCT_TRAITS_END()
IPC_STRUCT_BEGIN(ExtensionMsg_AccessibilityEventBundleParams)
// ID of the accessibility tree that this event applies to.
IPC_STRUCT_MEMBER(ui::AXTreeID, tree_id)
// Zero or more updates to the accessibility tree to apply first.
IPC_STRUCT_MEMBER(std::vector<ui::AXTreeUpdate>, updates)
// Zero or more events to fire after the tree updates have been applied.
IPC_STRUCT_MEMBER(std::vector<ui::AXEvent>, events)
// The mouse location in screen coordinates.
IPC_STRUCT_MEMBER(gfx::Point, mouse_location)
IPC_STRUCT_END()
IPC_STRUCT_BEGIN(ExtensionMsg_AccessibilityLocationChangeParams)
// ID of the accessibility tree that this event applies to.
IPC_STRUCT_MEMBER(ui::AXTreeID, tree_id)
// ID of the object whose location is changing.
IPC_STRUCT_MEMBER(int, id)
// The object's new location info.
IPC_STRUCT_MEMBER(ui::AXRelativeBounds, new_location)
IPC_STRUCT_END()
// Forward an accessibility message to an extension process where an
// extension is using the automation API to listen for accessibility events.
IPC_MESSAGE_CONTROL2(ExtensionMsg_AccessibilityEventBundle,
ExtensionMsg_AccessibilityEventBundleParams /* events */,
bool /* is_active_profile */)
// Forward an accessibility location change message to an extension process
// where an extension is using the automation API to listen for
// accessibility events.
IPC_MESSAGE_CONTROL1(ExtensionMsg_AccessibilityLocationChange,
ExtensionMsg_AccessibilityLocationChangeParams)
#endif // CHROMECAST_COMMON_EXTENSIONS_API_CAST_EXTENSION_MESSAGES_H_ #endif // CHROMECAST_COMMON_EXTENSIONS_API_CAST_EXTENSION_MESSAGES_H_
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#include "base/no_destructor.h" #include "base/no_destructor.h"
#include "chromecast/common/extensions_api/cast_extension_messages.h" #include "chromecast/common/extensions_api/cast_extension_messages.h"
#include "chromecast/renderer/extensions/automation_internal_custom_bindings.h" #include "chromecast/renderer/extensions/automation_internal_custom_bindings.h"
#include "extensions/common/extension_messages.h"
#include "ui/accessibility/ax_node.h" #include "ui/accessibility/ax_node.h"
namespace extensions { namespace extensions {
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include "content/public/renderer/render_thread.h" #include "content/public/renderer/render_thread.h"
#include "content/public/renderer/render_view.h" #include "content/public/renderer/render_view.h"
#include "extensions/common/extension.h" #include "extensions/common/extension.h"
#include "extensions/common/extension_messages.h"
#include "extensions/common/manifest.h" #include "extensions/common/manifest.h"
#include "extensions/common/manifest_handlers/automation.h" #include "extensions/common/manifest_handlers/automation.h"
#include "extensions/common/manifest_handlers/background_info.h" #include "extensions/common/manifest_handlers/background_info.h"
......
...@@ -1030,4 +1030,85 @@ IPC_MESSAGE_CONTROL2(ExtensionHostMsg_DidStopServiceWorkerContext, ...@@ -1030,4 +1030,85 @@ IPC_MESSAGE_CONTROL2(ExtensionHostMsg_DidStopServiceWorkerContext,
std::string /* extension_id */, std::string /* extension_id */,
int64_t /* service_worker_version_id */) int64_t /* service_worker_version_id */)
IPC_STRUCT_TRAITS_BEGIN(ui::AXNodeData)
IPC_STRUCT_TRAITS_MEMBER(id)
IPC_STRUCT_TRAITS_MEMBER(role)
IPC_STRUCT_TRAITS_MEMBER(state)
IPC_STRUCT_TRAITS_MEMBER(actions)
IPC_STRUCT_TRAITS_MEMBER(string_attributes)
IPC_STRUCT_TRAITS_MEMBER(int_attributes)
IPC_STRUCT_TRAITS_MEMBER(float_attributes)
IPC_STRUCT_TRAITS_MEMBER(bool_attributes)
IPC_STRUCT_TRAITS_MEMBER(intlist_attributes)
IPC_STRUCT_TRAITS_MEMBER(stringlist_attributes)
IPC_STRUCT_TRAITS_MEMBER(html_attributes)
IPC_STRUCT_TRAITS_MEMBER(child_ids)
IPC_STRUCT_TRAITS_MEMBER(relative_bounds)
IPC_STRUCT_TRAITS_END()
IPC_STRUCT_TRAITS_BEGIN(ui::AXTreeData)
IPC_STRUCT_TRAITS_MEMBER(tree_id)
IPC_STRUCT_TRAITS_MEMBER(parent_tree_id)
IPC_STRUCT_TRAITS_MEMBER(focused_tree_id)
IPC_STRUCT_TRAITS_MEMBER(url)
IPC_STRUCT_TRAITS_MEMBER(title)
IPC_STRUCT_TRAITS_MEMBER(mimetype)
IPC_STRUCT_TRAITS_MEMBER(doctype)
IPC_STRUCT_TRAITS_MEMBER(loaded)
IPC_STRUCT_TRAITS_MEMBER(loading_progress)
IPC_STRUCT_TRAITS_MEMBER(focus_id)
IPC_STRUCT_TRAITS_MEMBER(sel_anchor_object_id)
IPC_STRUCT_TRAITS_MEMBER(sel_anchor_offset)
IPC_STRUCT_TRAITS_MEMBER(sel_anchor_affinity)
IPC_STRUCT_TRAITS_MEMBER(sel_focus_object_id)
IPC_STRUCT_TRAITS_MEMBER(sel_focus_offset)
IPC_STRUCT_TRAITS_MEMBER(sel_focus_affinity)
IPC_STRUCT_TRAITS_END()
IPC_STRUCT_TRAITS_BEGIN(ui::AXTreeUpdate)
IPC_STRUCT_TRAITS_MEMBER(has_tree_data)
IPC_STRUCT_TRAITS_MEMBER(tree_data)
IPC_STRUCT_TRAITS_MEMBER(node_id_to_clear)
IPC_STRUCT_TRAITS_MEMBER(root_id)
IPC_STRUCT_TRAITS_MEMBER(nodes)
IPC_STRUCT_TRAITS_MEMBER(event_from)
IPC_STRUCT_TRAITS_END()
IPC_STRUCT_BEGIN(ExtensionMsg_AccessibilityEventBundleParams)
// ID of the accessibility tree that this event applies to.
IPC_STRUCT_MEMBER(ui::AXTreeID, tree_id)
// Zero or more updates to the accessibility tree to apply first.
IPC_STRUCT_MEMBER(std::vector<ui::AXTreeUpdate>, updates)
// Zero or more events to fire after the tree updates have been applied.
IPC_STRUCT_MEMBER(std::vector<ui::AXEvent>, events)
// The mouse location in screen coordinates.
IPC_STRUCT_MEMBER(gfx::Point, mouse_location)
IPC_STRUCT_END()
IPC_STRUCT_BEGIN(ExtensionMsg_AccessibilityLocationChangeParams)
// ID of the accessibility tree that this event applies to.
IPC_STRUCT_MEMBER(ui::AXTreeID, tree_id)
// ID of the object whose location is changing.
IPC_STRUCT_MEMBER(int, id)
// The object's new location info.
IPC_STRUCT_MEMBER(ui::AXRelativeBounds, new_location)
IPC_STRUCT_END()
// Forward an accessibility message to an extension process where an
// extension is using the automation API to listen for accessibility events.
IPC_MESSAGE_CONTROL2(ExtensionMsg_AccessibilityEventBundle,
ExtensionMsg_AccessibilityEventBundleParams /* events */,
bool /* is_active_profile */)
// Forward an accessibility location change message to an extension process
// where an extension is using the automation API to listen for
// accessibility events.
IPC_MESSAGE_CONTROL1(ExtensionMsg_AccessibilityLocationChange,
ExtensionMsg_AccessibilityLocationChangeParams)
#endif // EXTENSIONS_COMMON_EXTENSION_MESSAGES_H_ #endif // EXTENSIONS_COMMON_EXTENSION_MESSAGES_H_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment