diff options
87 files changed, 180 insertions, 122 deletions
@@ -37,7 +37,6 @@ include_rules = [ "+chrome/browser/extensions/unpacked_installer.h", "+chrome/common/extensions/api/app_runtime.h", "+chrome/common/extensions/api/app_window.h", - "+chrome/common/extensions/extension_messages.h", "+chrome/common/extensions/manifest_handlers/icons_handler.h", ] diff --git a/apps/app_window.cc b/apps/app_window.cc index e6f5a5e..3a7c0e5 100644 --- a/apps/app_window.cc +++ b/apps/app_window.cc @@ -19,7 +19,6 @@ #include "chrome/browser/extensions/extension_web_contents_observer.h" #include "chrome/browser/extensions/suggest_permission_util.h" #include "chrome/common/chrome_switches.h" -#include "chrome/common/extensions/extension_messages.h" #include "chrome/common/extensions/manifest_handlers/icons_handler.h" #include "components/web_modal/web_contents_modal_dialog_manager.h" #include "content/public/browser/browser_context.h" @@ -39,6 +38,7 @@ #include "extensions/browser/process_manager.h" #include "extensions/browser/view_type_utils.h" #include "extensions/common/extension.h" +#include "extensions/common/extension_messages.h" #include "third_party/skia/include/core/SkRegion.h" #include "ui/gfx/screen.h" diff --git a/apps/app_window_contents.cc b/apps/app_window_contents.cc index d50db9e..eb123b5 100644 --- a/apps/app_window_contents.cc +++ b/apps/app_window_contents.cc @@ -7,7 +7,6 @@ #include "apps/ui/native_app_window.h" #include "chrome/browser/chrome_notification_types.h" #include "chrome/common/extensions/api/app_window.h" -#include "chrome/common/extensions/extension_messages.h" #include "content/public/browser/browser_context.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/notification_details.h" @@ -18,6 +17,7 @@ #include "content/public/browser/site_instance.h" #include "content/public/browser/web_contents.h" #include "content/public/common/renderer_preferences.h" +#include "extensions/common/extension_messages.h" namespace app_window = extensions::api::app_window; diff --git a/apps/launcher.cc b/apps/launcher.cc index 599f5f9..4fe2461 100644 --- a/apps/launcher.cc +++ b/apps/launcher.cc @@ -18,7 +18,6 @@ #include "chrome/browser/extensions/extension_host.h" #include "chrome/browser/profiles/profile.h" #include "chrome/common/extensions/api/app_runtime.h" -#include "chrome/common/extensions/extension_messages.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/render_process_host.h" #include "content/public/browser/web_contents.h" @@ -28,6 +27,7 @@ #include "extensions/browser/lazy_background_task_queue.h" #include "extensions/browser/process_manager.h" #include "extensions/common/extension.h" +#include "extensions/common/extension_messages.h" #include "extensions/common/manifest_handlers/kiosk_mode_info.h" #include "net/base/mime_util.h" #include "net/base/net_util.h" diff --git a/chrome/browser/apps/app_url_redirector.cc b/chrome/browser/apps/app_url_redirector.cc index 5a87e75..e622f14 100644 --- a/chrome/browser/apps/app_url_redirector.cc +++ b/chrome/browser/apps/app_url_redirector.cc @@ -10,7 +10,6 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile_io_data.h" #include "chrome/common/extensions/api/url_handlers/url_handlers_parser.h" -#include "chrome/common/extensions/extension_messages.h" #include "components/navigation_interception/intercept_navigation_resource_throttle.h" #include "components/navigation_interception/navigation_params.h" #include "content/public/browser/browser_thread.h" @@ -20,6 +19,7 @@ #include "content/public/browser/web_contents.h" #include "extensions/browser/info_map.h" #include "extensions/common/extension.h" +#include "extensions/common/extension_messages.h" #include "extensions/common/extension_set.h" #include "net/url_request/url_request.h" diff --git a/chrome/browser/chromeos/accessibility/accessibility_manager.cc b/chrome/browser/chromeos/accessibility/accessibility_manager.cc index 27d8c19..8ea3307 100644 --- a/chrome/browser/chromeos/accessibility/accessibility_manager.cc +++ b/chrome/browser/chromeos/accessibility/accessibility_manager.cc @@ -36,7 +36,6 @@ #include "chrome/browser/profiles/profile_manager.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/extensions/api/experimental_accessibility.h" -#include "chrome/common/extensions/extension_messages.h" #include "chrome/common/extensions/manifest_handlers/content_scripts_handler.h" #include "chrome/common/pref_names.h" #include "chromeos/audio/chromeos_sounds.h" @@ -53,6 +52,7 @@ #include "extensions/browser/extension_system.h" #include "extensions/browser/file_reader.h" #include "extensions/common/extension.h" +#include "extensions/common/extension_messages.h" #include "extensions/common/extension_resource.h" #include "grit/browser_resources.h" #include "grit/generated_resources.h" diff --git a/chrome/browser/extensions/active_tab_permission_granter.cc b/chrome/browser/extensions/active_tab_permission_granter.cc index d7e00b0..b3106db 100644 --- a/chrome/browser/extensions/active_tab_permission_granter.cc +++ b/chrome/browser/extensions/active_tab_permission_granter.cc @@ -8,7 +8,6 @@ #include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/sessions/session_id.h" -#include "chrome/common/extensions/extension_messages.h" #include "content/public/browser/navigation_details.h" #include "content/public/browser/navigation_entry.h" #include "content/public/browser/notification_service.h" @@ -17,6 +16,7 @@ #include "content/public/browser/web_contents.h" #include "extensions/browser/extension_system.h" #include "extensions/common/extension.h" +#include "extensions/common/extension_messages.h" #include "extensions/common/permissions/permission_set.h" #include "extensions/common/permissions/permissions_data.h" #include "extensions/common/user_script.h" diff --git a/chrome/browser/extensions/api/alarms/alarms_api_unittest.cc b/chrome/browser/extensions/api/alarms/alarms_api_unittest.cc index 8c3b6121..69da965 100644 --- a/chrome/browser/extensions/api/alarms/alarms_api_unittest.cc +++ b/chrome/browser/extensions/api/alarms/alarms_api_unittest.cc @@ -12,9 +12,9 @@ #include "chrome/browser/extensions/extension_function_test_utils.h" #include "chrome/browser/profiles/profile_manager.h" #include "chrome/browser/ui/browser.h" -#include "chrome/common/extensions/extension_messages.h" #include "content/public/browser/web_contents.h" #include "content/public/test/mock_render_process_host.h" +#include "extensions/common/extension_messages.h" #include "ipc/ipc_test_sink.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/chrome/browser/extensions/api/declarative_content/content_rules_registry.cc b/chrome/browser/extensions/api/declarative_content/content_rules_registry.cc index d1b315c..b86fe9d 100644 --- a/chrome/browser/extensions/api/declarative_content/content_rules_registry.cc +++ b/chrome/browser/extensions/api/declarative_content/content_rules_registry.cc @@ -11,13 +11,13 @@ #include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/extension_tab_util.h" #include "chrome/browser/profiles/profile.h" -#include "chrome/common/extensions/extension_messages.h" #include "content/public/browser/navigation_details.h" #include "content/public/browser/notification_service.h" #include "content/public/browser/notification_source.h" #include "content/public/browser/render_process_host.h" #include "content/public/browser/web_contents.h" #include "extensions/browser/extension_system.h" +#include "extensions/common/extension_messages.h" using url_matcher::URLMatcherConditionSet; diff --git a/chrome/browser/extensions/api/execute_code_function.cc b/chrome/browser/extensions/api/execute_code_function.cc index 63cb338..9a7ec7d 100644 --- a/chrome/browser/extensions/api/execute_code_function.cc +++ b/chrome/browser/extensions/api/execute_code_function.cc @@ -9,10 +9,10 @@ #include "chrome/browser/extensions/script_executor.h" #include "chrome/common/extensions/api/i18n/default_locale_handler.h" #include "chrome/common/extensions/extension_file_util.h" -#include "chrome/common/extensions/extension_messages.h" #include "chrome/common/extensions/message_bundle.h" #include "extensions/browser/file_reader.h" #include "extensions/common/error_utils.h" +#include "extensions/common/extension_messages.h" #include "net/base/net_util.h" #include "ui/base/resource/resource_bundle.h" diff --git a/chrome/browser/extensions/api/messaging/extension_message_port.cc b/chrome/browser/extensions/api/messaging/extension_message_port.cc index 894fab4..7b8775a 100644 --- a/chrome/browser/extensions/api/messaging/extension_message_port.cc +++ b/chrome/browser/extensions/api/messaging/extension_message_port.cc @@ -6,10 +6,10 @@ #include "chrome/browser/extensions/extension_host.h" #include "chrome/browser/profiles/profile.h" -#include "chrome/common/extensions/extension_messages.h" #include "content/public/browser/render_process_host.h" #include "extensions/browser/extension_system.h" #include "extensions/browser/process_manager.h" +#include "extensions/common/extension_messages.h" #include "extensions/common/manifest_handlers/background_info.h" namespace extensions { diff --git a/chrome/browser/extensions/api/messaging/message_service.cc b/chrome/browser/extensions/api/messaging/message_service.cc index 182c3c7..7f5416e 100644 --- a/chrome/browser/extensions/api/messaging/message_service.cc +++ b/chrome/browser/extensions/api/messaging/message_service.cc @@ -23,7 +23,6 @@ #include "chrome/browser/extensions/extension_util.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/tab_contents/tab_util.h" -#include "chrome/common/extensions/extension_messages.h" #include "chrome/common/extensions/manifest_handlers/externally_connectable.h" #include "content/public/browser/notification_service.h" #include "content/public/browser/render_process_host.h" @@ -37,6 +36,7 @@ #include "extensions/browser/lazy_background_task_queue.h" #include "extensions/browser/process_manager.h" #include "extensions/common/extension.h" +#include "extensions/common/extension_messages.h" #include "extensions/common/manifest_constants.h" #include "extensions/common/manifest_handlers/background_info.h" #include "extensions/common/manifest_handlers/incognito_info.h" diff --git a/chrome/browser/extensions/api/page_capture/page_capture_api.cc b/chrome/browser/extensions/api/page_capture/page_capture_api.cc index 9454b2a..fec85b0 100644 --- a/chrome/browser/extensions/api/page_capture/page_capture_api.cc +++ b/chrome/browser/extensions/api/page_capture/page_capture_api.cc @@ -10,7 +10,6 @@ #include "base/file_util.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/extensions/extension_tab_util.h" -#include "chrome/common/extensions/extension_messages.h" #include "content/public/browser/child_process_security_policy.h" #include "content/public/browser/notification_details.h" #include "content/public/browser/notification_source.h" @@ -18,6 +17,7 @@ #include "content/public/browser/render_process_host.h" #include "content/public/browser/render_view_host.h" #include "content/public/browser/web_contents.h" +#include "extensions/common/extension_messages.h" using content::BrowserThread; using content::ChildProcessSecurityPolicy; diff --git a/chrome/browser/extensions/api/tabs/ash_panel_contents.cc b/chrome/browser/extensions/api/tabs/ash_panel_contents.cc index 5173171..f0c3cdd 100644 --- a/chrome/browser/extensions/api/tabs/ash_panel_contents.cc +++ b/chrome/browser/extensions/api/tabs/ash_panel_contents.cc @@ -14,11 +14,11 @@ #include "chrome/browser/extensions/window_controller_list.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/sessions/session_tab_helper.h" -#include "chrome/common/extensions/extension_messages.h" #include "content/public/browser/browser_context.h" #include "content/public/browser/site_instance.h" #include "content/public/browser/web_contents.h" #include "extensions/common/extension.h" +#include "extensions/common/extension_messages.h" #include "ui/gfx/image/image.h" using apps::AppWindow; diff --git a/chrome/browser/extensions/api/tabs/tabs_api.cc b/chrome/browser/extensions/api/tabs/tabs_api.cc index 0a1c36d..6ad203e 100644 --- a/chrome/browser/extensions/api/tabs/tabs_api.cc +++ b/chrome/browser/extensions/api/tabs/tabs_api.cc @@ -55,7 +55,6 @@ #include "chrome/common/extensions/extension_constants.h" #include "chrome/common/extensions/extension_file_util.h" #include "chrome/common/extensions/extension_l10n_util.h" -#include "chrome/common/extensions/extension_messages.h" #include "chrome/common/extensions/message_bundle.h" #include "chrome/common/pref_names.h" #include "chrome/common/url_constants.h" @@ -75,6 +74,7 @@ #include "extensions/common/constants.h" #include "extensions/common/error_utils.h" #include "extensions/common/extension.h" +#include "extensions/common/extension_messages.h" #include "extensions/common/manifest_constants.h" #include "extensions/common/manifest_handlers/incognito_info.h" #include "extensions/common/permissions/permissions_data.h" diff --git a/chrome/browser/extensions/api/web_request/web_request_api.cc b/chrome/browser/extensions/api/web_request/web_request_api.cc index 462419d..4b5cb21 100644 --- a/chrome/browser/extensions/api/web_request/web_request_api.cc +++ b/chrome/browser/extensions/api/web_request/web_request_api.cc @@ -38,7 +38,6 @@ #include "chrome/browser/renderer_host/chrome_render_message_filter.h" #include "chrome/common/extensions/api/web_request.h" #include "chrome/common/extensions/extension_constants.h" -#include "chrome/common/extensions/extension_messages.h" #include "chrome/common/url_constants.h" #include "content/public/browser/browser_message_filter.h" #include "content/public/browser/browser_thread.h" @@ -54,6 +53,7 @@ #include "extensions/common/error_utils.h" #include "extensions/common/event_filtering_info.h" #include "extensions/common/extension.h" +#include "extensions/common/extension_messages.h" #include "extensions/common/extension_set.h" #include "extensions/common/features/feature.h" #include "extensions/common/permissions/permissions_data.h" diff --git a/chrome/browser/extensions/api/web_request/web_request_api_unittest.cc b/chrome/browser/extensions/api/web_request/web_request_api_unittest.cc index 0f82492..cafc124 100644 --- a/chrome/browser/extensions/api/web_request/web_request_api_unittest.cc +++ b/chrome/browser/extensions/api/web_request/web_request_api_unittest.cc @@ -30,7 +30,6 @@ #include "chrome/browser/net/about_protocol_handler.h" #include "chrome/browser/net/chrome_network_delegate.h" #include "chrome/common/extensions/api/web_request.h" -#include "chrome/common/extensions/extension_messages.h" #include "chrome/common/pref_names.h" #include "chrome/test/base/testing_browser_process.h" #include "chrome/test/base/testing_pref_service_syncable.h" @@ -38,6 +37,7 @@ #include "chrome/test/base/testing_profile_manager.h" #include "content/public/common/url_constants.h" #include "content/public/test/test_browser_thread_bundle.h" +#include "extensions/common/extension_messages.h" #include "extensions/common/features/feature.h" #include "net/base/auth.h" #include "net/base/capturing_net_log.h" diff --git a/chrome/browser/extensions/extension_function_dispatcher.cc b/chrome/browser/extensions/extension_function_dispatcher.cc index d61e3f3..a442099 100644 --- a/chrome/browser/extensions/extension_function_dispatcher.cc +++ b/chrome/browser/extensions/extension_function_dispatcher.cc @@ -14,7 +14,6 @@ #include "build/build_config.h" #include "chrome/browser/external_protocol/external_protocol_handler.h" #include "chrome/browser/renderer_host/chrome_render_message_filter.h" -#include "chrome/common/extensions/extension_messages.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/render_frame_host.h" #include "content/public/browser/render_process_host.h" @@ -32,6 +31,7 @@ #include "extensions/browser/process_map.h" #include "extensions/browser/quota_service.h" #include "extensions/common/extension_api.h" +#include "extensions/common/extension_messages.h" #include "extensions/common/extension_set.h" #include "ipc/ipc_message.h" #include "ipc/ipc_message_macros.h" diff --git a/chrome/browser/extensions/extension_host.cc b/chrome/browser/extensions/extension_host.cc index cd1cef6..0f6a6a5 100644 --- a/chrome/browser/extensions/extension_host.cc +++ b/chrome/browser/extensions/extension_host.cc @@ -22,7 +22,6 @@ #include "chrome/browser/media/media_capture_devices_dispatcher.h" #include "chrome/common/chrome_constants.h" #include "chrome/common/extensions/extension_constants.h" -#include "chrome/common/extensions/extension_messages.h" #include "chrome/common/render_messages.h" #include "chrome/common/url_constants.h" #include "content/public/browser/browser_context.h" @@ -44,6 +43,7 @@ #include "extensions/browser/runtime_data.h" #include "extensions/browser/view_type_utils.h" #include "extensions/common/extension.h" +#include "extensions/common/extension_messages.h" #include "extensions/common/extension_urls.h" #include "extensions/common/feature_switch.h" #include "extensions/common/manifest_handlers/background_info.h" diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc index 4d5120c..a61fec9 100644 --- a/chrome/browser/extensions/extension_service.cc +++ b/chrome/browser/extensions/extension_service.cc @@ -57,7 +57,6 @@ #include "chrome/common/crash_keys.h" #include "chrome/common/extensions/extension_constants.h" #include "chrome/common/extensions/extension_file_util.h" -#include "chrome/common/extensions/extension_messages.h" #include "chrome/common/extensions/features/feature_channel.h" #include "chrome/common/extensions/manifest_handlers/app_isolation_info.h" #include "chrome/common/extensions/manifest_url_handler.h" @@ -88,6 +87,7 @@ #include "extensions/common/constants.h" #include "extensions/common/error_utils.h" #include "extensions/common/extension.h" +#include "extensions/common/extension_messages.h" #include "extensions/common/extensions_client.h" #include "extensions/common/feature_switch.h" #include "extensions/common/manifest.h" diff --git a/chrome/browser/extensions/extension_view_host.cc b/chrome/browser/extensions/extension_view_host.cc index a2c38cc..9eb6d79 100644 --- a/chrome/browser/extensions/extension_view_host.cc +++ b/chrome/browser/extensions/extension_view_host.cc @@ -11,7 +11,6 @@ #include "chrome/browser/platform_util.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_dialogs.h" -#include "chrome/common/extensions/extension_messages.h" #include "components/web_modal/web_contents_modal_dialog_manager.h" #include "content/public/browser/notification_source.h" #include "content/public/browser/render_frame_host.h" @@ -20,6 +19,7 @@ #include "content/public/browser/web_contents_view.h" #include "extensions/browser/extension_system.h" #include "extensions/browser/runtime_data.h" +#include "extensions/common/extension_messages.h" #include "grit/browser_resources.h" #include "ui/base/resource/resource_bundle.h" #include "ui/events/keycodes/keyboard_codes.h" diff --git a/chrome/browser/extensions/extension_web_contents_observer.cc b/chrome/browser/extensions/extension_web_contents_observer.cc index b817d3c..dc79821 100644 --- a/chrome/browser/extensions/extension_web_contents_observer.cc +++ b/chrome/browser/extensions/extension_web_contents_observer.cc @@ -9,7 +9,6 @@ #include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/common/extensions/api/messaging/message.h" -#include "chrome/common/extensions/extension_messages.h" #include "chrome/common/render_messages.h" #include "chrome/common/url_constants.h" #include "content/public/browser/child_process_security_policy.h" @@ -21,6 +20,7 @@ #include "extensions/browser/extension_system.h" #include "extensions/browser/view_type_utils.h" #include "extensions/common/constants.h" +#include "extensions/common/extension_messages.h" #include "extensions/common/extension_urls.h" DEFINE_WEB_CONTENTS_USER_DATA_KEY(extensions::ExtensionWebContentsObserver); diff --git a/chrome/browser/extensions/permissions_updater.cc b/chrome/browser/extensions/permissions_updater.cc index 266fea9..9dc8f82 100644 --- a/chrome/browser/extensions/permissions_updater.cc +++ b/chrome/browser/extensions/permissions_updater.cc @@ -11,7 +11,6 @@ #include "chrome/browser/extensions/api/permissions/permissions_api_helpers.h" #include "chrome/browser/profiles/profile.h" #include "chrome/common/extensions/api/permissions.h" -#include "chrome/common/extensions/extension_messages.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" #include "content/public/browser/notification_service.h" @@ -20,6 +19,7 @@ #include "extensions/browser/extension_prefs.h" #include "extensions/browser/extension_system.h" #include "extensions/common/extension.h" +#include "extensions/common/extension_messages.h" #include "extensions/common/permissions/permissions_data.h" using content::RenderProcessHost; diff --git a/chrome/browser/extensions/script_executor.cc b/chrome/browser/extensions/script_executor.cc index 9436250..703a35b 100644 --- a/chrome/browser/extensions/script_executor.cc +++ b/chrome/browser/extensions/script_executor.cc @@ -7,10 +7,10 @@ #include "base/callback.h" #include "base/logging.h" #include "base/pickle.h" -#include "chrome/common/extensions/extension_messages.h" #include "content/public/browser/render_view_host.h" #include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents_observer.h" +#include "extensions/common/extension_messages.h" #include "ipc/ipc_message.h" #include "ipc/ipc_message_macros.h" diff --git a/chrome/browser/extensions/suggest_permission_util.cc b/chrome/browser/extensions/suggest_permission_util.cc index 1c47450..ff9823a 100644 --- a/chrome/browser/extensions/suggest_permission_util.cc +++ b/chrome/browser/extensions/suggest_permission_util.cc @@ -5,12 +5,12 @@ #include "chrome/browser/extensions/suggest_permission_util.h" #include "chrome/browser/profiles/profile.h" -#include "chrome/common/extensions/extension_messages.h" #include "content/public/browser/render_view_host.h" #include "content/public/common/console_message_level.h" #include "extensions/browser/extension_system.h" #include "extensions/browser/process_manager.h" #include "extensions/common/extension.h" +#include "extensions/common/extension_messages.h" #include "extensions/common/permissions/permissions_info.h" using content::CONSOLE_MESSAGE_LEVEL_WARNING; diff --git a/chrome/browser/extensions/tab_helper.cc b/chrome/browser/extensions/tab_helper.cc index 75455a7..5bc94af 100644 --- a/chrome/browser/extensions/tab_helper.cc +++ b/chrome/browser/extensions/tab_helper.cc @@ -36,9 +36,9 @@ #include "chrome/browser/ui/web_applications/web_app_ui.h" #include "chrome/browser/web_applications/web_app.h" #include "chrome/common/chrome_switches.h" +#include "chrome/common/extensions/chrome_extension_messages.h" #include "chrome/common/extensions/extension_constants.h" #include "chrome/common/extensions/extension_icon_set.h" -#include "chrome/common/extensions/extension_messages.h" #include "chrome/common/extensions/manifest_handlers/app_launch_info.h" #include "chrome/common/extensions/manifest_handlers/icons_handler.h" #include "chrome/common/render_messages.h" @@ -60,6 +60,7 @@ #include "extensions/browser/extension_registry.h" #include "extensions/browser/extension_system.h" #include "extensions/common/extension.h" +#include "extensions/common/extension_messages.h" #include "extensions/common/extension_resource.h" #include "extensions/common/extension_urls.h" #include "extensions/common/feature_switch.h" @@ -386,7 +387,7 @@ void TabHelper::DidNavigateMainFrame( bool TabHelper::OnMessageReceived(const IPC::Message& message) { bool handled = true; IPC_BEGIN_MESSAGE_MAP(TabHelper, message) - IPC_MESSAGE_HANDLER(ExtensionHostMsg_DidGetApplicationInfo, + IPC_MESSAGE_HANDLER(ChromeExtensionHostMsg_DidGetApplicationInfo, OnDidGetApplicationInfo) IPC_MESSAGE_HANDLER(ExtensionHostMsg_InlineWebstoreInstall, OnInlineWebstoreInstall) @@ -719,7 +720,7 @@ WebContents* TabHelper::GetAssociatedWebContents() const { } void TabHelper::GetApplicationInfo(int32 page_id) { - Send(new ExtensionMsg_GetApplicationInfo(routing_id(), page_id)); + Send(new ChromeExtensionMsg_GetApplicationInfo(routing_id(), page_id)); } void TabHelper::Observe(int type, diff --git a/chrome/browser/extensions/user_script_master.h b/chrome/browser/extensions/user_script_master.h index ddcc1f5b..c764992 100644 --- a/chrome/browser/extensions/user_script_master.h +++ b/chrome/browser/extensions/user_script_master.h @@ -14,10 +14,10 @@ #include "base/memory/scoped_ptr.h" #include "base/memory/shared_memory.h" #include "base/strings/string_piece.h" -#include "chrome/common/extensions/extension_messages.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" +#include "extensions/common/extension_messages.h" #include "extensions/common/extension_set.h" #include "extensions/common/user_script.h" diff --git a/chrome/browser/notifications/balloon_host.cc b/chrome/browser/notifications/balloon_host.cc index ce754a5..1740384 100644 --- a/chrome/browser/notifications/balloon_host.cc +++ b/chrome/browser/notifications/balloon_host.cc @@ -16,7 +16,6 @@ #include "chrome/browser/ui/browser_tabstrip.h" #include "chrome/browser/ui/host_desktop.h" #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" -#include "chrome/common/extensions/extension_messages.h" #include "chrome/common/render_messages.h" #include "chrome/common/url_constants.h" #include "content/public/browser/navigation_controller.h" @@ -29,6 +28,7 @@ #include "content/public/common/bindings_policy.h" #include "content/public/common/renderer_preferences.h" #include "extensions/browser/view_type_utils.h" +#include "extensions/common/extension_messages.h" #include "ipc/ipc_message.h" using content::SiteInstance; diff --git a/chrome/browser/renderer_host/chrome_render_message_filter.cc b/chrome/browser/renderer_host/chrome_render_message_filter.cc index b6a8cb0..a077fd9 100644 --- a/chrome/browser/renderer_host/chrome_render_message_filter.cc +++ b/chrome/browser/renderer_host/chrome_render_message_filter.cc @@ -25,13 +25,13 @@ #include "chrome/browser/task_manager/task_manager.h" #include "chrome/common/extensions/api/i18n/default_locale_handler.h" #include "chrome/common/extensions/extension_file_util.h" -#include "chrome/common/extensions/extension_messages.h" #include "chrome/common/extensions/message_bundle.h" #include "chrome/common/render_messages.h" #include "content/public/browser/notification_service.h" #include "content/public/browser/render_process_host.h" #include "extensions/browser/extension_system.h" #include "extensions/common/constants.h" +#include "extensions/common/extension_messages.h" #if defined(USE_TCMALLOC) #include "chrome/browser/browser_about_handler.h" diff --git a/chrome/browser/renderer_host/pepper/pepper_extensions_common_message_filter.cc b/chrome/browser/renderer_host/pepper/pepper_extensions_common_message_filter.cc index d3d3154..b96d125 100644 --- a/chrome/browser/renderer_host/pepper/pepper_extensions_common_message_filter.cc +++ b/chrome/browser/renderer_host/pepper/pepper_extensions_common_message_filter.cc @@ -11,13 +11,13 @@ #include "chrome/browser/extensions/extension_function_dispatcher.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile_manager.h" -#include "chrome/common/extensions/extension_messages.h" #include "content/public/browser/browser_ppapi_host.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/render_frame_host.h" #include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents_observer.h" #include "extensions/common/constants.h" +#include "extensions/common/extension_messages.h" #include "ipc/ipc_message.h" #include "ipc/ipc_message_macros.h" #include "ppapi/c/pp_errors.h" diff --git a/chrome/browser/sessions/session_tab_helper.cc b/chrome/browser/sessions/session_tab_helper.cc index da4115b..8435649 100644 --- a/chrome/browser/sessions/session_tab_helper.cc +++ b/chrome/browser/sessions/session_tab_helper.cc @@ -8,10 +8,10 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/sessions/session_service.h" #include "chrome/browser/sessions/session_service_factory.h" -#include "chrome/common/extensions/extension_messages.h" #include "content/public/browser/notification_service.h" #include "content/public/browser/render_view_host.h" #include "content/public/browser/web_contents.h" +#include "extensions/common/extension_messages.h" DEFINE_WEB_CONTENTS_USER_DATA_KEY(SessionTabHelper); diff --git a/chrome/browser/speech/extension_api/tts_engine_extension_api.cc b/chrome/browser/speech/extension_api/tts_engine_extension_api.cc index f80b6bd..8d21679 100644 --- a/chrome/browser/speech/extension_api/tts_engine_extension_api.cc +++ b/chrome/browser/speech/extension_api/tts_engine_extension_api.cc @@ -15,7 +15,6 @@ #include "chrome/browser/speech/extension_api/tts_extension_api_constants.h" #include "chrome/browser/speech/tts_controller.h" #include "chrome/common/extensions/api/speech/tts_engine_manifest_handler.h" -#include "chrome/common/extensions/extension_messages.h" #include "content/public/browser/render_process_host.h" #include "content/public/browser/render_view_host.h" #include "content/public/common/console_message_level.h" @@ -23,6 +22,7 @@ #include "extensions/browser/extension_system.h" #include "extensions/browser/process_manager.h" #include "extensions/common/extension.h" +#include "extensions/common/extension_messages.h" #include "extensions/common/extension_set.h" #include "net/base/network_change_notifier.h" diff --git a/chrome/browser/themes/theme_syncable_service_unittest.cc b/chrome/browser/themes/theme_syncable_service_unittest.cc index d75d60e..8f0a2a3 100644 --- a/chrome/browser/themes/theme_syncable_service_unittest.cc +++ b/chrome/browser/themes/theme_syncable_service_unittest.cc @@ -14,11 +14,11 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/themes/theme_service.h" #include "chrome/browser/themes/theme_service_factory.h" -#include "chrome/common/extensions/extension_messages.h" #include "chrome/common/extensions/manifest_url_handler.h" #include "chrome/test/base/testing_profile.h" #include "content/public/test/test_browser_thread.h" #include "extensions/common/extension.h" +#include "extensions/common/extension_messages.h" #include "extensions/common/manifest_constants.h" #include "extensions/common/permissions/api_permission_set.h" #include "extensions/common/permissions/permission_set.h" diff --git a/chrome/browser/ui/ash/ash_keyboard_controller_proxy.cc b/chrome/browser/ui/ash/ash_keyboard_controller_proxy.cc index a36bd86..a2437d6 100644 --- a/chrome/browser/ui/ash/ash_keyboard_controller_proxy.cc +++ b/chrome/browser/ui/ash/ash_keyboard_controller_proxy.cc @@ -14,7 +14,6 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile_manager.h" #include "chrome/common/extensions/api/virtual_keyboard_private.h" -#include "chrome/common/extensions/extension_messages.h" #include "content/public/browser/site_instance.h" #include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents_view.h" @@ -22,6 +21,7 @@ #include "extensions/browser/extension_system.h" #include "extensions/browser/view_type_utils.h" #include "extensions/common/constants.h" +#include "extensions/common/extension_messages.h" #include "ipc/ipc_message_macros.h" #include "ui/aura/client/aura_constants.h" #include "ui/aura/window.h" diff --git a/chrome/browser/ui/panels/panel_host.cc b/chrome/browser/ui/panels/panel_host.cc index 59be3ae..b50a976 100644 --- a/chrome/browser/ui/panels/panel_host.cc +++ b/chrome/browser/ui/panels/panel_host.cc @@ -17,7 +17,6 @@ #include "chrome/browser/ui/browser_navigator.h" #include "chrome/browser/ui/panels/panel.h" #include "chrome/browser/ui/prefs/prefs_tab_helper.h" -#include "chrome/common/extensions/extension_messages.h" #include "content/public/browser/invalidate_type.h" #include "content/public/browser/navigation_controller.h" #include "content/public/browser/notification_service.h" @@ -28,6 +27,7 @@ #include "content/public/browser/user_metrics.h" #include "content/public/browser/web_contents.h" #include "extensions/browser/view_type_utils.h" +#include "extensions/common/extension_messages.h" #include "ipc/ipc_message.h" #include "ipc/ipc_message_macros.h" #include "ui/gfx/image/image.h" diff --git a/chrome/browser/ui/webui/sync_internals_ui.cc b/chrome/browser/ui/webui/sync_internals_ui.cc index baf4061..4268b3f 100644 --- a/chrome/browser/ui/webui/sync_internals_ui.cc +++ b/chrome/browser/ui/webui/sync_internals_ui.cc @@ -6,10 +6,10 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/webui/sync_internals_message_handler.h" -#include "chrome/common/extensions/extension_messages.h" #include "chrome/common/url_constants.h" #include "content/public/browser/web_ui.h" #include "content/public/browser/web_ui_data_source.h" +#include "extensions/common/extension_messages.h" #include "grit/sync_internals_resources.h" #include "ui/base/resource/resource_bundle.h" diff --git a/chrome/browser/web_applications/web_app_unittest.cc b/chrome/browser/web_applications/web_app_unittest.cc index 791cfee..e2a0e6e 100644 --- a/chrome/browser/web_applications/web_app_unittest.cc +++ b/chrome/browser/web_applications/web_app_unittest.cc @@ -10,7 +10,7 @@ #include "chrome/browser/extensions/tab_helper.h" #include "chrome/browser/favicon/favicon_tab_helper.h" #include "chrome/browser/ui/web_applications/web_app_ui.h" -#include "chrome/common/extensions/extension_messages.h" +#include "chrome/common/extensions/chrome_extension_messages.h" #include "chrome/test/base/chrome_render_view_host_test_harness.h" #include "content/public/test/test_renderer_host.h" #include "testing/gtest/include/gtest/gtest.h" @@ -42,7 +42,7 @@ TEST_F(WebApplicationTest, MAYBE_GetShortcutInfoForTab) { RenderViewHostTester::TestOnMessageReceived( rvh(), - ExtensionHostMsg_DidGetApplicationInfo(0, 0, web_app_info)); + ChromeExtensionHostMsg_DidGetApplicationInfo(0, 0, web_app_info)); ShellIntegration::ShortcutInfo info; web_app::GetShortcutInfoForTab(web_contents(), &info); diff --git a/chrome/chrome_common.gypi b/chrome/chrome_common.gypi index 2f90b58..59609c0 100644 --- a/chrome/chrome_common.gypi +++ b/chrome/chrome_common.gypi @@ -160,6 +160,7 @@ 'common/extensions/api/system_indicator/system_indicator_handler.h', 'common/extensions/api/url_handlers/url_handlers_parser.cc', 'common/extensions/api/url_handlers/url_handlers_parser.h', + 'common/extensions/chrome_extension_messages.h', 'common/extensions/chrome_extensions_client.cc', 'common/extensions/chrome_extensions_client.h', 'common/extensions/chrome_manifest_handlers.cc', @@ -175,8 +176,6 @@ 'common/extensions/extension_icon_set.h', 'common/extensions/extension_l10n_util.cc', 'common/extensions/extension_l10n_util.h', - 'common/extensions/extension_messages.cc', - 'common/extensions/extension_messages.h', 'common/extensions/extension_process_policy.cc', 'common/extensions/extension_process_policy.h', 'common/extensions/features/api_feature.cc', diff --git a/chrome/common/common_message_generator.h b/chrome/common/common_message_generator.h index 8de637d..fe88a92 100644 --- a/chrome/common/common_message_generator.h +++ b/chrome/common/common_message_generator.h @@ -8,7 +8,7 @@ #include "chrome/common/benchmarking_messages.h" #include "chrome/common/cast_messages.h" #include "chrome/common/chrome_utility_messages.h" -#include "chrome/common/extensions/extension_messages.h" +#include "chrome/common/extensions/chrome_extension_messages.h" #include "chrome/common/prerender_messages.h" #include "chrome/common/render_messages.h" #include "chrome/common/safe_browsing/safebrowsing_messages.h" diff --git a/chrome/common/extensions/api/bluetooth/bluetooth_manifest_permission.cc b/chrome/common/extensions/api/bluetooth/bluetooth_manifest_permission.cc index 0f7399a..4588b6a 100644 --- a/chrome/common/extensions/api/bluetooth/bluetooth_manifest_permission.cc +++ b/chrome/common/extensions/api/bluetooth/bluetooth_manifest_permission.cc @@ -10,9 +10,9 @@ #include "base/values.h" #include "chrome/common/extensions/api/bluetooth/bluetooth_manifest_data.h" #include "chrome/common/extensions/api/manifest_types.h" -#include "chrome/common/extensions/extension_messages.h" #include "device/bluetooth/bluetooth_utils.h" #include "extensions/common/error_utils.h" +#include "extensions/common/extension_messages.h" #include "extensions/common/manifest_constants.h" #include "grit/generated_resources.h" #include "ipc/ipc_message.h" diff --git a/chrome/common/extensions/api/sockets/sockets_manifest_permission.cc b/chrome/common/extensions/api/sockets/sockets_manifest_permission.cc index 269ed94..143ec9b 100644 --- a/chrome/common/extensions/api/sockets/sockets_manifest_permission.cc +++ b/chrome/common/extensions/api/sockets/sockets_manifest_permission.cc @@ -10,8 +10,8 @@ #include "base/values.h" #include "chrome/common/extensions/api/manifest_types.h" #include "chrome/common/extensions/api/sockets/sockets_manifest_data.h" -#include "chrome/common/extensions/extension_messages.h" #include "extensions/common/error_utils.h" +#include "extensions/common/extension_messages.h" #include "extensions/common/manifest_constants.h" #include "grit/generated_resources.h" #include "ipc/ipc_message.h" diff --git a/chrome/common/extensions/api/sockets/sockets_manifest_permission_unittest.cc b/chrome/common/extensions/api/sockets/sockets_manifest_permission_unittest.cc index 6025f65..9be7daa 100644 --- a/chrome/common/extensions/api/sockets/sockets_manifest_permission_unittest.cc +++ b/chrome/common/extensions/api/sockets/sockets_manifest_permission_unittest.cc @@ -8,7 +8,7 @@ #include "base/pickle.h" #include "base/values.h" #include "chrome/common/extensions/api/sockets/sockets_manifest_permission.h" -#include "chrome/common/extensions/extension_messages.h" +#include "extensions/common/extension_messages.h" #include "extensions/common/manifest_constants.h" #include "ipc/ipc_message.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/chrome/common/extensions/chrome_extension_messages.h b/chrome/common/extensions/chrome_extension_messages.h new file mode 100644 index 0000000..e25e901 --- /dev/null +++ b/chrome/common/extensions/chrome_extension_messages.h @@ -0,0 +1,41 @@ +// 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. + +// Chrome-specific IPC messages for extensions. +// Extension-related messages that aren't specific to Chrome live in +// extensions/common/extension_messages.h. +// +// Multiply-included message file, hence no include guard. + +#include "chrome/common/web_application_info.h" +#include "ipc/ipc_message_macros.h" + +#define IPC_MESSAGE_START ChromeExtensionMsgStart + +IPC_STRUCT_TRAITS_BEGIN(WebApplicationInfo::IconInfo) + IPC_STRUCT_TRAITS_MEMBER(url) + IPC_STRUCT_TRAITS_MEMBER(width) + IPC_STRUCT_TRAITS_MEMBER(height) + IPC_STRUCT_TRAITS_MEMBER(data) +IPC_STRUCT_TRAITS_END() + +IPC_STRUCT_TRAITS_BEGIN(WebApplicationInfo) + IPC_STRUCT_TRAITS_MEMBER(title) + IPC_STRUCT_TRAITS_MEMBER(description) + IPC_STRUCT_TRAITS_MEMBER(app_url) + IPC_STRUCT_TRAITS_MEMBER(icons) +IPC_STRUCT_TRAITS_END() + +// Messages sent from the browser to the renderer. + +// Requests application info for the page. The renderer responds back with +// ExtensionHostMsg_DidGetApplicationInfo. +IPC_MESSAGE_ROUTED1(ChromeExtensionMsg_GetApplicationInfo, + int32 /* page_id */) + +// Messages sent from the renderer to the browser. + +IPC_MESSAGE_ROUTED2(ChromeExtensionHostMsg_DidGetApplicationInfo, + int32 /* page_id */, + WebApplicationInfo) diff --git a/chrome/common/extensions/extension_file_util.cc b/chrome/common/extensions/extension_file_util.cc index f743629..8b053bd 100644 --- a/chrome/common/extensions/extension_file_util.cc +++ b/chrome/common/extensions/extension_file_util.cc @@ -22,12 +22,12 @@ #include "chrome/common/extensions/api/extension_action/action_info.h" #include "chrome/common/extensions/extension_icon_set.h" #include "chrome/common/extensions/extension_l10n_util.h" -#include "chrome/common/extensions/extension_messages.h" #include "chrome/common/extensions/manifest_handlers/icons_handler.h" #include "chrome/common/extensions/manifest_handlers/theme_handler.h" #include "chrome/common/extensions/message_bundle.h" #include "extensions/common/constants.h" #include "extensions/common/extension.h" +#include "extensions/common/extension_messages.h" #include "extensions/common/extension_resource.h" #include "extensions/common/install_warning.h" #include "extensions/common/manifest.h" diff --git a/chrome/common/extensions/manifest_handlers/settings_overrides_handler.cc b/chrome/common/extensions/manifest_handlers/settings_overrides_handler.cc index 255ab71..772c6e2 100644 --- a/chrome/common/extensions/manifest_handlers/settings_overrides_handler.cc +++ b/chrome/common/extensions/manifest_handlers/settings_overrides_handler.cc @@ -9,9 +9,9 @@ #include "base/strings/stringprintf.h" #include "base/strings/utf_string_conversions.h" #include "base/values.h" -#include "chrome/common/extensions/extension_messages.h" #include "chrome/common/extensions/permissions/settings_override_permission.h" #include "extensions/common/error_utils.h" +#include "extensions/common/extension_messages.h" #include "extensions/common/feature_switch.h" #include "extensions/common/manifest_constants.h" #include "extensions/common/permissions/api_permission_set.h" diff --git a/chrome/common/extensions/manifest_handlers/ui_overrides_handler.cc b/chrome/common/extensions/manifest_handlers/ui_overrides_handler.cc index f495f7a..095fe4a 100644 --- a/chrome/common/extensions/manifest_handlers/ui_overrides_handler.cc +++ b/chrome/common/extensions/manifest_handlers/ui_overrides_handler.cc @@ -8,8 +8,8 @@ #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" #include "base/values.h" -#include "chrome/common/extensions/extension_messages.h" #include "extensions/common/error_utils.h" +#include "extensions/common/extension_messages.h" #include "extensions/common/feature_switch.h" #include "extensions/common/manifest_constants.h" #include "extensions/common/permissions/manifest_permission.h" diff --git a/chrome/common/extensions/permissions/set_disjunction_permission.h b/chrome/common/extensions/permissions/set_disjunction_permission.h index f018e13..b05917f 100644 --- a/chrome/common/extensions/permissions/set_disjunction_permission.h +++ b/chrome/common/extensions/permissions/set_disjunction_permission.h @@ -11,7 +11,7 @@ #include "base/memory/scoped_ptr.h" #include "base/values.h" -#include "chrome/common/extensions/extension_messages.h" +#include "extensions/common/extension_messages.h" #include "extensions/common/permissions/api_permission.h" #include "ipc/ipc_message.h" #include "ipc/ipc_message_utils.h" diff --git a/chrome/renderer/chrome_mock_render_thread.cc b/chrome/renderer/chrome_mock_render_thread.cc index 633c22e..fa208d9 100644 --- a/chrome/renderer/chrome_mock_render_thread.cc +++ b/chrome/renderer/chrome_mock_render_thread.cc @@ -7,11 +7,11 @@ #include <vector> #include "base/values.h" -#include "chrome/common/extensions/extension_messages.h" #include "chrome/renderer/mock_printer.h" +#include "extensions/common/extension_messages.h" #include "ipc/ipc_sync_message.h" -#include "printing/print_job_constants.h" #include "printing/page_range.h" +#include "printing/print_job_constants.h" #include "testing/gtest/include/gtest/gtest.h" #if defined(OS_CHROMEOS) diff --git a/chrome/renderer/extensions/api_activity_logger.cc b/chrome/renderer/extensions/api_activity_logger.cc index 4bd1b98..80f25bd 100644 --- a/chrome/renderer/extensions/api_activity_logger.cc +++ b/chrome/renderer/extensions/api_activity_logger.cc @@ -4,12 +4,12 @@ #include <string> #include "base/bind.h" -#include "chrome/common/extensions/extension_messages.h" #include "chrome/renderer/chrome_render_process_observer.h" #include "chrome/renderer/extensions/activity_log_converter_strategy.h" #include "chrome/renderer/extensions/api_activity_logger.h" #include "content/public/renderer/render_thread.h" #include "content/public/renderer/v8_value_converter.h" +#include "extensions/common/extension_messages.h" using content::V8ValueConverter; diff --git a/chrome/renderer/extensions/app_bindings.cc b/chrome/renderer/extensions/app_bindings.cc index 087fb4e..26252bd 100644 --- a/chrome/renderer/extensions/app_bindings.cc +++ b/chrome/renderer/extensions/app_bindings.cc @@ -11,13 +11,13 @@ #include "base/values.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/extensions/extension_constants.h" -#include "chrome/common/extensions/extension_messages.h" #include "chrome/renderer/extensions/chrome_v8_context.h" #include "chrome/renderer/extensions/console.h" #include "chrome/renderer/extensions/dispatcher.h" #include "chrome/renderer/extensions/extension_helper.h" #include "content/public/renderer/render_view.h" #include "content/public/renderer/v8_value_converter.h" +#include "extensions/common/extension_messages.h" #include "extensions/common/extension_set.h" #include "extensions/common/manifest.h" #include "grit/renderer_resources.h" diff --git a/chrome/renderer/extensions/app_window_custom_bindings.cc b/chrome/renderer/extensions/app_window_custom_bindings.cc index d8c6e0b..d32bba8 100644 --- a/chrome/renderer/extensions/app_window_custom_bindings.cc +++ b/chrome/renderer/extensions/app_window_custom_bindings.cc @@ -8,7 +8,6 @@ #include "base/command_line.h" #include "chrome/common/chrome_switches.h" -#include "chrome/common/extensions/extension_messages.h" #include "chrome/renderer/extensions/chrome_v8_context.h" #include "chrome/renderer/extensions/dispatcher.h" #include "chrome/renderer/extensions/scoped_persistent.h" @@ -17,6 +16,7 @@ #include "content/public/renderer/render_view_observer.h" #include "content/public/renderer/render_view_visitor.h" #include "content/public/renderer/v8_value_converter.h" +#include "extensions/common/extension_messages.h" #include "grit/renderer_resources.h" #include "third_party/WebKit/public/web/WebFrame.h" #include "third_party/WebKit/public/web/WebView.h" diff --git a/chrome/renderer/extensions/content_watcher.cc b/chrome/renderer/extensions/content_watcher.cc index 4b96b7fe..a7c00e6 100644 --- a/chrome/renderer/extensions/content_watcher.cc +++ b/chrome/renderer/extensions/content_watcher.cc @@ -4,9 +4,9 @@ #include "chrome/renderer/extensions/content_watcher.h" -#include "chrome/common/extensions/extension_messages.h" #include "content/public/renderer/render_view.h" #include "content/public/renderer/render_view_visitor.h" +#include "extensions/common/extension_messages.h" #include "third_party/WebKit/public/web/WebDocument.h" #include "third_party/WebKit/public/web/WebElement.h" #include "third_party/WebKit/public/web/WebFrame.h" diff --git a/chrome/renderer/extensions/context_menus_custom_bindings.cc b/chrome/renderer/extensions/context_menus_custom_bindings.cc index f70359c..f7a80fd 100644 --- a/chrome/renderer/extensions/context_menus_custom_bindings.cc +++ b/chrome/renderer/extensions/context_menus_custom_bindings.cc @@ -5,8 +5,8 @@ #include "chrome/renderer/extensions/context_menus_custom_bindings.h" #include "base/bind.h" -#include "chrome/common/extensions/extension_messages.h" #include "content/public/renderer/render_thread.h" +#include "extensions/common/extension_messages.h" #include "grit/renderer_resources.h" #include "v8/include/v8.h" diff --git a/chrome/renderer/extensions/dispatcher.cc b/chrome/renderer/extensions/dispatcher.cc index 4244232..c3752b6 100644 --- a/chrome/renderer/extensions/dispatcher.cc +++ b/chrome/renderer/extensions/dispatcher.cc @@ -19,7 +19,6 @@ #include "chrome/common/chrome_version_info.h" #include "chrome/common/crash_keys.h" #include "chrome/common/extensions/api/messaging/message.h" -#include "chrome/common/extensions/extension_messages.h" #include "chrome/common/extensions/features/feature_channel.h" #include "chrome/common/extensions/manifest_handlers/externally_connectable.h" #include "chrome/common/extensions/message_bundle.h" @@ -74,6 +73,7 @@ #include "extensions/common/constants.h" #include "extensions/common/extension.h" #include "extensions/common/extension_api.h" +#include "extensions/common/extension_messages.h" #include "extensions/common/extension_urls.h" #include "extensions/common/features/feature.h" #include "extensions/common/features/feature_provider.h" diff --git a/chrome/renderer/extensions/dom_activity_logger.cc b/chrome/renderer/extensions/dom_activity_logger.cc index 5ff2471..7527c8d 100644 --- a/chrome/renderer/extensions/dom_activity_logger.cc +++ b/chrome/renderer/extensions/dom_activity_logger.cc @@ -6,11 +6,11 @@ #include "base/logging.h" #include "chrome/common/extensions/dom_action_types.h" -#include "chrome/common/extensions/extension_messages.h" #include "chrome/renderer/chrome_render_process_observer.h" #include "chrome/renderer/extensions/activity_log_converter_strategy.h" #include "content/public/renderer/render_thread.h" #include "content/public/renderer/v8_value_converter.h" +#include "extensions/common/extension_messages.h" #include "third_party/WebKit/public/platform/WebString.h" #include "third_party/WebKit/public/platform/WebURL.h" #include "third_party/WebKit/public/web/WebDOMActivityLogger.h" diff --git a/chrome/renderer/extensions/event_bindings.cc b/chrome/renderer/extensions/event_bindings.cc index 130ffbd..71ce6fb 100644 --- a/chrome/renderer/extensions/event_bindings.cc +++ b/chrome/renderer/extensions/event_bindings.cc @@ -14,7 +14,6 @@ #include "base/lazy_instance.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop/message_loop.h" -#include "chrome/common/extensions/extension_messages.h" #include "chrome/common/extensions/value_counter.h" #include "chrome/common/url_constants.h" #include "chrome/renderer/extensions/chrome_v8_context.h" @@ -28,6 +27,7 @@ #include "content/public/renderer/v8_value_converter.h" #include "extensions/common/event_filter.h" #include "extensions/common/extension.h" +#include "extensions/common/extension_messages.h" #include "extensions/common/manifest_handlers/background_info.h" #include "extensions/common/view_type.h" #include "grit/renderer_resources.h" diff --git a/chrome/renderer/extensions/extension_frame_helper.cc b/chrome/renderer/extensions/extension_frame_helper.cc index b6a48cf..3fca946 100644 --- a/chrome/renderer/extensions/extension_frame_helper.cc +++ b/chrome/renderer/extensions/extension_frame_helper.cc @@ -4,10 +4,10 @@ #include "chrome/renderer/extensions/extension_frame_helper.h" -#include "chrome/common/extensions/extension_messages.h" #include "chrome/renderer/extensions/console.h" #include "chrome/renderer/extensions/dispatcher.h" #include "content/public/renderer/render_frame.h" +#include "extensions/common/extension_messages.h" #include "third_party/WebKit/public/web/WebConsoleMessage.h" #include "third_party/WebKit/public/web/WebFrame.h" diff --git a/chrome/renderer/extensions/extension_helper.cc b/chrome/renderer/extensions/extension_helper.cc index 69249b1..6d9cf1f 100644 --- a/chrome/renderer/extensions/extension_helper.cc +++ b/chrome/renderer/extensions/extension_helper.cc @@ -13,8 +13,8 @@ #include "base/strings/utf_string_conversions.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/extensions/api/messaging/message.h" +#include "chrome/common/extensions/chrome_extension_messages.h" #include "chrome/common/extensions/extension_constants.h" -#include "chrome/common/extensions/extension_messages.h" #include "chrome/common/render_messages.h" #include "chrome/common/url_constants.h" #include "chrome/renderer/extensions/chrome_v8_context.h" @@ -27,6 +27,7 @@ #include "content/public/renderer/render_view.h" #include "content/public/renderer/render_view_visitor.h" #include "extensions/common/constants.h" +#include "extensions/common/extension_messages.h" #include "third_party/WebKit/public/platform/WebURLRequest.h" #include "third_party/WebKit/public/web/WebConsoleMessage.h" #include "third_party/WebKit/public/web/WebDocument.h" @@ -162,7 +163,8 @@ bool ExtensionHelper::OnMessageReceived(const IPC::Message& message) { IPC_MESSAGE_HANDLER(ExtensionMsg_DispatchOnDisconnect, OnExtensionDispatchOnDisconnect) IPC_MESSAGE_HANDLER(ExtensionMsg_ExecuteCode, OnExecuteCode) - IPC_MESSAGE_HANDLER(ExtensionMsg_GetApplicationInfo, OnGetApplicationInfo) + IPC_MESSAGE_HANDLER(ChromeExtensionMsg_GetApplicationInfo, + OnGetApplicationInfo) IPC_MESSAGE_HANDLER(ExtensionMsg_SetTabId, OnSetTabId) IPC_MESSAGE_HANDLER(ExtensionMsg_UpdateBrowserWindowId, OnUpdateBrowserWindowId) @@ -340,7 +342,7 @@ void ExtensionHelper::OnGetApplicationInfo(int page_id) { } } - Send(new ExtensionHostMsg_DidGetApplicationInfo( + Send(new ChromeExtensionHostMsg_DidGetApplicationInfo( routing_id(), page_id, app_info)); } diff --git a/chrome/renderer/extensions/extension_localization_peer.cc b/chrome/renderer/extensions/extension_localization_peer.cc index 789b0e6..251bf80 100644 --- a/chrome/renderer/extensions/extension_localization_peer.cc +++ b/chrome/renderer/extensions/extension_localization_peer.cc @@ -6,10 +6,10 @@ #include "base/memory/scoped_ptr.h" #include "base/strings/string_util.h" -#include "chrome/common/extensions/extension_messages.h" #include "chrome/common/extensions/message_bundle.h" #include "chrome/common/url_constants.h" #include "extensions/common/constants.h" +#include "extensions/common/extension_messages.h" #include "grit/generated_resources.h" #include "net/base/net_errors.h" #include "net/http/http_response_headers.h" diff --git a/chrome/renderer/extensions/i18n_custom_bindings.cc b/chrome/renderer/extensions/i18n_custom_bindings.cc index eb10b40..cbedf4d 100644 --- a/chrome/renderer/extensions/i18n_custom_bindings.cc +++ b/chrome/renderer/extensions/i18n_custom_bindings.cc @@ -5,10 +5,10 @@ #include "chrome/renderer/extensions/i18n_custom_bindings.h" #include "base/bind.h" -#include "chrome/common/extensions/extension_messages.h" #include "chrome/common/extensions/message_bundle.h" #include "content/public/renderer/render_thread.h" #include "content/public/renderer/render_view.h" +#include "extensions/common/extension_messages.h" #include "grit/renderer_resources.h" #include "v8/include/v8.h" diff --git a/chrome/renderer/extensions/messaging_bindings.cc b/chrome/renderer/extensions/messaging_bindings.cc index 8c3bad9..c7524ae 100644 --- a/chrome/renderer/extensions/messaging_bindings.cc +++ b/chrome/renderer/extensions/messaging_bindings.cc @@ -14,7 +14,6 @@ #include "base/message_loop/message_loop.h" #include "base/values.h" #include "chrome/common/extensions/api/messaging/message.h" -#include "chrome/common/extensions/extension_messages.h" #include "chrome/common/extensions/manifest_handlers/externally_connectable.h" #include "chrome/common/extensions/message_bundle.h" #include "chrome/common/url_constants.h" @@ -27,6 +26,7 @@ #include "content/public/renderer/render_thread.h" #include "content/public/renderer/render_view.h" #include "content/public/renderer/v8_value_converter.h" +#include "extensions/common/extension_messages.h" #include "grit/renderer_resources.h" #include "third_party/WebKit/public/web/WebScopedMicrotaskSuppression.h" #include "third_party/WebKit/public/web/WebScopedUserGesture.h" diff --git a/chrome/renderer/extensions/module_system.cc b/chrome/renderer/extensions/module_system.cc index b37e8b9..b050a9a 100644 --- a/chrome/renderer/extensions/module_system.cc +++ b/chrome/renderer/extensions/module_system.cc @@ -11,12 +11,12 @@ #include "base/strings/string_util.h" #include "base/strings/stringprintf.h" #include "chrome/common/chrome_switches.h" -#include "chrome/common/extensions/extension_messages.h" #include "chrome/common/extensions/features/feature_channel.h" #include "chrome/renderer/extensions/chrome_v8_context.h" #include "chrome/renderer/extensions/console.h" #include "chrome/renderer/extensions/safe_builtins.h" #include "content/public/renderer/render_view.h" +#include "extensions/common/extension_messages.h" #include "third_party/WebKit/public/web/WebFrame.h" #include "third_party/WebKit/public/web/WebScopedMicrotaskSuppression.h" diff --git a/chrome/renderer/extensions/page_capture_custom_bindings.cc b/chrome/renderer/extensions/page_capture_custom_bindings.cc index d001874..d0a2334 100644 --- a/chrome/renderer/extensions/page_capture_custom_bindings.cc +++ b/chrome/renderer/extensions/page_capture_custom_bindings.cc @@ -6,8 +6,8 @@ #include "base/bind.h" #include "base/strings/utf_string_conversions.h" -#include "chrome/common/extensions/extension_messages.h" #include "content/public/renderer/render_view.h" +#include "extensions/common/extension_messages.h" #include "grit/renderer_resources.h" #include "third_party/WebKit/public/web/WebBlob.h" #include "v8/include/v8.h" diff --git a/chrome/renderer/extensions/renderer_permissions_policy_delegate_unittest.cc b/chrome/renderer/extensions/renderer_permissions_policy_delegate_unittest.cc index 18c028c..ff80d40 100644 --- a/chrome/renderer/extensions/renderer_permissions_policy_delegate_unittest.cc +++ b/chrome/renderer/extensions/renderer_permissions_policy_delegate_unittest.cc @@ -5,13 +5,13 @@ #include "base/command_line.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/extensions/extension_constants.h" -#include "chrome/common/extensions/extension_messages.h" #include "chrome/renderer/extensions/dispatcher.h" #include "chrome/renderer/extensions/renderer_permissions_policy_delegate.h" #include "content/public/test/mock_render_process_host.h" #include "content/public/test/mock_render_thread.h" #include "extensions/common/extension.h" #include "extensions/common/extension_builder.h" +#include "extensions/common/extension_messages.h" #include "extensions/common/permissions/permissions_data.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/chrome/renderer/extensions/request_sender.cc b/chrome/renderer/extensions/request_sender.cc index c01e0ba..597f3fb 100644 --- a/chrome/renderer/extensions/request_sender.cc +++ b/chrome/renderer/extensions/request_sender.cc @@ -5,10 +5,10 @@ #include "chrome/renderer/extensions/request_sender.h" #include "base/values.h" -#include "chrome/common/extensions/extension_messages.h" #include "chrome/renderer/extensions/chrome_v8_context.h" #include "chrome/renderer/extensions/dispatcher.h" #include "content/public/renderer/render_view.h" +#include "extensions/common/extension_messages.h" #include "third_party/WebKit/public/web/WebDocument.h" #include "third_party/WebKit/public/web/WebFrame.h" #include "third_party/WebKit/public/web/WebUserGestureIndicator.h" diff --git a/chrome/renderer/extensions/runtime_custom_bindings.cc b/chrome/renderer/extensions/runtime_custom_bindings.cc index 06b2588..ac6fb40 100644 --- a/chrome/renderer/extensions/runtime_custom_bindings.cc +++ b/chrome/renderer/extensions/runtime_custom_bindings.cc @@ -7,7 +7,6 @@ #include "base/bind.h" #include "base/memory/scoped_ptr.h" #include "base/values.h" -#include "chrome/common/extensions/extension_messages.h" #include "chrome/renderer/extensions/api_activity_logger.h" #include "chrome/renderer/extensions/chrome_v8_context.h" #include "chrome/renderer/extensions/dispatcher.h" @@ -15,6 +14,7 @@ #include "content/public/renderer/render_view.h" #include "content/public/renderer/v8_value_converter.h" #include "extensions/common/extension.h" +#include "extensions/common/extension_messages.h" #include "extensions/common/features/feature.h" #include "extensions/common/features/feature_provider.h" #include "extensions/common/manifest.h" diff --git a/chrome/renderer/extensions/tabs_custom_bindings.cc b/chrome/renderer/extensions/tabs_custom_bindings.cc index 84db118..471bae6 100644 --- a/chrome/renderer/extensions/tabs_custom_bindings.cc +++ b/chrome/renderer/extensions/tabs_custom_bindings.cc @@ -7,8 +7,8 @@ #include <string> #include "base/bind.h" -#include "chrome/common/extensions/extension_messages.h" #include "content/public/renderer/render_view.h" +#include "extensions/common/extension_messages.h" #include "grit/renderer_resources.h" #include "v8/include/v8.h" diff --git a/chrome/renderer/extensions/user_script_scheduler.cc b/chrome/renderer/extensions/user_script_scheduler.cc index 58a1b4e..b4cf64f 100644 --- a/chrome/renderer/extensions/user_script_scheduler.cc +++ b/chrome/renderer/extensions/user_script_scheduler.cc @@ -7,7 +7,6 @@ #include "base/bind.h" #include "base/logging.h" #include "base/message_loop/message_loop.h" -#include "chrome/common/extensions/extension_messages.h" #include "chrome/renderer/chrome_render_process_observer.h" #include "chrome/renderer/extensions/chrome_v8_context.h" #include "chrome/renderer/extensions/dispatcher.h" @@ -18,6 +17,7 @@ #include "content/public/renderer/render_view.h" #include "content/public/renderer/v8_value_converter.h" #include "extensions/common/error_utils.h" +#include "extensions/common/extension_messages.h" #include "extensions/common/manifest_constants.h" #include "extensions/common/permissions/permissions_data.h" #include "third_party/WebKit/public/platform/WebString.h" diff --git a/chrome/renderer/extensions/user_script_slave.cc b/chrome/renderer/extensions/user_script_slave.cc index 3c00daf..8c7ca5e 100644 --- a/chrome/renderer/extensions/user_script_slave.cc +++ b/chrome/renderer/extensions/user_script_slave.cc @@ -13,7 +13,6 @@ #include "base/pickle.h" #include "base/strings/stringprintf.h" #include "base/timer/elapsed_timer.h" -#include "chrome/common/extensions/extension_messages.h" #include "chrome/common/url_constants.h" #include "chrome/renderer/chrome_render_process_observer.h" #include "chrome/renderer/extensions/dom_activity_logger.h" @@ -22,6 +21,7 @@ #include "content/public/renderer/render_thread.h" #include "content/public/renderer/render_view.h" #include "extensions/common/extension.h" +#include "extensions/common/extension_messages.h" #include "extensions/common/extension_set.h" #include "extensions/common/manifest_handlers/csp_info.h" #include "extensions/common/permissions/permissions_data.h" diff --git a/chrome/renderer/extensions/webstore_bindings.cc b/chrome/renderer/extensions/webstore_bindings.cc index 85ecbf2..21f3b22 100644 --- a/chrome/renderer/extensions/webstore_bindings.cc +++ b/chrome/renderer/extensions/webstore_bindings.cc @@ -6,10 +6,10 @@ #include "base/strings/string_util.h" #include "chrome/common/extensions/extension_constants.h" -#include "chrome/common/extensions/extension_messages.h" #include "chrome/renderer/extensions/chrome_v8_context.h" #include "content/public/renderer/render_view.h" #include "extensions/common/extension.h" +#include "extensions/common/extension_messages.h" #include "grit/renderer_resources.h" #include "third_party/WebKit/public/web/WebDocument.h" #include "third_party/WebKit/public/web/WebElement.h" diff --git a/extensions/DEPS b/extensions/DEPS index e89d729..0e342b0 100644 --- a/extensions/DEPS +++ b/extensions/DEPS @@ -12,12 +12,6 @@ specific_include_rules = { "+content/public/test", ], # Temporary includes for tests. - "^api_permission_set_unittest\.cc$": [ - "+chrome/common/extensions/extension_messages.h", - ], - "^manifest_permission_set_unittest\.cc$": [ - "+chrome/common/extensions/extension_messages.h", - ], "^permissions_data_unittest\.cc$": [ "+chrome/common/chrome_version_info.h", "+chrome/common/extensions/extension_test_util.h", diff --git a/extensions/browser/DEPS b/extensions/browser/DEPS index 3f59f38..b8eaeb3 100644 --- a/extensions/browser/DEPS +++ b/extensions/browser/DEPS @@ -22,7 +22,6 @@ include_rules = [ "+chrome/browser/extensions/extension_service.h", "+chrome/browser/renderer_host/chrome_render_message_filter.h", "+chrome/common/extensions/api/sockets/sockets_manifest_data.h", - "+chrome/common/extensions/extension_messages.h", "+chrome/common/extensions/features/feature_channel.h", "+chrome/common/extensions/permissions", "+grit/generated_resources.h", diff --git a/extensions/browser/event_router.cc b/extensions/browser/event_router.cc index 58cbf24..abce70c 100644 --- a/extensions/browser/event_router.cc +++ b/extensions/browser/event_router.cc @@ -13,7 +13,6 @@ #include "base/values.h" #include "chrome/browser/chrome_notification_types.h" #include "chrome/browser/extensions/extension_host.h" -#include "chrome/common/extensions/extension_messages.h" #include "content/public/browser/notification_service.h" #include "content/public/browser/render_process_host.h" #include "extensions/browser/api_activity_monitor.h" @@ -26,6 +25,7 @@ #include "extensions/browser/process_map.h" #include "extensions/common/extension.h" #include "extensions/common/extension_api.h" +#include "extensions/common/extension_messages.h" #include "extensions/common/extension_urls.h" #include "extensions/common/manifest_handlers/background_info.h" #include "extensions/common/manifest_handlers/incognito_info.h" diff --git a/extensions/browser/extension_function.cc b/extensions/browser/extension_function.cc index 8c7c752..e16d895 100644 --- a/extensions/browser/extension_function.cc +++ b/extensions/browser/extension_function.cc @@ -9,7 +9,6 @@ #include "chrome/browser/extensions/extension_function_dispatcher.h" #include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/renderer_host/chrome_render_message_filter.h" -#include "chrome/common/extensions/extension_messages.h" #include "content/public/browser/notification_source.h" #include "content/public/browser/notification_types.h" #include "content/public/browser/render_frame_host.h" @@ -17,6 +16,7 @@ #include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents_observer.h" #include "extensions/common/extension_api.h" +#include "extensions/common/extension_messages.h" using content::BrowserThread; using content::RenderViewHost; diff --git a/extensions/browser/extension_message_filter.cc b/extensions/browser/extension_message_filter.cc index ea5bfa7..bcd5621 100644 --- a/extensions/browser/extension_message_filter.cc +++ b/extensions/browser/extension_message_filter.cc @@ -4,13 +4,13 @@ #include "extensions/browser/extension_message_filter.h" -#include "chrome/common/extensions/extension_messages.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/render_process_host.h" #include "content/public/browser/resource_dispatcher_host.h" #include "extensions/browser/event_router.h" #include "extensions/browser/extension_system.h" #include "extensions/browser/process_manager.h" +#include "extensions/common/extension_messages.h" #include "ipc/ipc_message_macros.h" using content::BrowserThread; diff --git a/extensions/browser/lazy_background_task_queue.cc b/extensions/browser/lazy_background_task_queue.cc index 2b38ce9..dde744f 100644 --- a/extensions/browser/lazy_background_task_queue.cc +++ b/extensions/browser/lazy_background_task_queue.cc @@ -7,7 +7,6 @@ #include "base/callback.h" #include "chrome/browser/chrome_notification_types.h" #include "chrome/browser/extensions/extension_host.h" -#include "chrome/common/extensions/extension_messages.h" #include "content/public/browser/browser_context.h" #include "content/public/browser/notification_service.h" #include "content/public/browser/render_process_host.h" @@ -20,6 +19,7 @@ #include "extensions/browser/process_manager.h" #include "extensions/browser/process_map.h" #include "extensions/common/extension.h" +#include "extensions/common/extension_messages.h" #include "extensions/common/manifest_handlers/background_info.h" #include "extensions/common/view_type.h" diff --git a/extensions/browser/process_manager.cc b/extensions/browser/process_manager.cc index db0a76d..73b7a90 100644 --- a/extensions/browser/process_manager.cc +++ b/extensions/browser/process_manager.cc @@ -16,7 +16,6 @@ #include "chrome/browser/chrome_notification_types.h" #include "chrome/browser/extensions/api/runtime/runtime_api.h" #include "chrome/browser/extensions/extension_host.h" -#include "chrome/common/extensions/extension_messages.h" #include "content/public/browser/browser_context.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/devtools_agent_host.h" @@ -36,6 +35,7 @@ #include "extensions/browser/extensions_browser_client.h" #include "extensions/browser/view_type_utils.h" #include "extensions/common/extension.h" +#include "extensions/common/extension_messages.h" #include "extensions/common/manifest_handlers/background_info.h" #include "extensions/common/manifest_handlers/incognito_info.h" #include "extensions/common/one_shot_event.h" diff --git a/extensions/browser/renderer_startup_helper.cc b/extensions/browser/renderer_startup_helper.cc index ab278ac..e0fdbf1 100644 --- a/extensions/browser/renderer_startup_helper.cc +++ b/extensions/browser/renderer_startup_helper.cc @@ -6,7 +6,6 @@ #include "base/values.h" #include "chrome/browser/extensions/extension_function_dispatcher.h" -#include "chrome/common/extensions/extension_messages.h" #include "chrome/common/extensions/features/feature_channel.h" #include "components/browser_context_keyed_service/browser_context_dependency_manager.h" #include "content/public/browser/notification_service.h" @@ -14,6 +13,7 @@ #include "content/public/browser/render_process_host.h" #include "extensions/browser/extension_registry.h" #include "extensions/browser/extensions_browser_client.h" +#include "extensions/common/extension_messages.h" #include "extensions/common/extension_set.h" #include "extensions/common/extensions_client.h" #include "ui/base/webui/web_ui_util.h" diff --git a/extensions/common/DEPS b/extensions/common/DEPS index 01823a9..b739e1d 100644 --- a/extensions/common/DEPS +++ b/extensions/common/DEPS @@ -9,6 +9,8 @@ include_rules = [ # # TODO(benwells): Remove these. http://crbug.com/162530 "+chrome/common/extensions/api/generated_schemas.h", + "+chrome/common/extensions/api/messaging/message.h", + "+chrome/common/extensions/permissions", "+grit/chromium_strings.h", "+grit/common_resources.h", "+grit/extensions_api_resources.h", diff --git a/extensions/common/extension_message_generator.cc b/extensions/common/extension_message_generator.cc new file mode 100644 index 0000000..b066c4f --- /dev/null +++ b/extensions/common/extension_message_generator.cc @@ -0,0 +1,34 @@ +// 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. + +// Get basic type definitions. +#define IPC_MESSAGE_IMPL +#include "extensions/common/extension_message_generator.h" + +// Generate constructors. +#include "ipc/struct_constructor_macros.h" +#include "extensions/common/extension_message_generator.h" + +// Generate destructors. +#include "ipc/struct_destructor_macros.h" +#include "extensions/common/extension_message_generator.h" + +// Generate param traits write methods. +#include "ipc/param_traits_write_macros.h" +namespace IPC { +#include "extensions/common/extension_message_generator.h" +} // namespace IPC + +// Generate param traits read methods. +#include "ipc/param_traits_read_macros.h" +namespace IPC { +#include "extensions/common/extension_message_generator.h" +} // namespace IPC + +// Generate param traits log methods. +#include "ipc/param_traits_log_macros.h" +namespace IPC { +#include "extensions/common/extension_message_generator.h" +} // namespace IPC + diff --git a/extensions/common/extension_message_generator.h b/extensions/common/extension_message_generator.h new file mode 100644 index 0000000..0735924 --- /dev/null +++ b/extensions/common/extension_message_generator.h @@ -0,0 +1,7 @@ +// 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. + +// Multiply-included file, hence no include guard. + +#include "extensions/common/extension_messages.h" diff --git a/chrome/common/extensions/extension_messages.cc b/extensions/common/extension_messages.cc index 978acb2..d71fdd0 100644 --- a/chrome/common/extensions/extension_messages.cc +++ b/extensions/common/extension_messages.cc @@ -1,10 +1,9 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// 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. -#include "chrome/common/extensions/extension_messages.h" +#include "extensions/common/extension_messages.h" -#include "chrome/common/extensions/extension_constants.h" #include "content/public/common/common_param_traits.h" #include "extensions/common/extension.h" #include "extensions/common/manifest.h" diff --git a/chrome/common/extensions/extension_messages.h b/extensions/common/extension_messages.h index e43b3c8..a3b414f 100644 --- a/chrome/common/extensions/extension_messages.h +++ b/extensions/common/extension_messages.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// 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. @@ -14,7 +14,6 @@ #include "chrome/common/extensions/permissions/media_galleries_permission_data.h" #include "chrome/common/extensions/permissions/socket_permission_data.h" #include "chrome/common/extensions/permissions/usb_device_permission_data.h" -#include "chrome/common/web_application_info.h" #include "content/public/common/common_param_traits.h" #include "content/public/common/socket_permission_request.h" #include "extensions/common/draggable_region.h" @@ -160,20 +159,6 @@ IPC_STRUCT_BEGIN(ExtensionMsg_UpdatePermissions_Params) IPC_STRUCT_MEMBER(extensions::URLPatternSet, scriptable_hosts) IPC_STRUCT_END() -IPC_STRUCT_TRAITS_BEGIN(WebApplicationInfo::IconInfo) - IPC_STRUCT_TRAITS_MEMBER(url) - IPC_STRUCT_TRAITS_MEMBER(width) - IPC_STRUCT_TRAITS_MEMBER(height) - IPC_STRUCT_TRAITS_MEMBER(data) -IPC_STRUCT_TRAITS_END() - -IPC_STRUCT_TRAITS_BEGIN(WebApplicationInfo) - IPC_STRUCT_TRAITS_MEMBER(title) - IPC_STRUCT_TRAITS_MEMBER(description) - IPC_STRUCT_TRAITS_MEMBER(app_url) - IPC_STRUCT_TRAITS_MEMBER(icons) -IPC_STRUCT_TRAITS_END() - IPC_STRUCT_TRAITS_BEGIN(extensions::DraggableRegion) IPC_STRUCT_TRAITS_MEMBER(draggable) IPC_STRUCT_TRAITS_MEMBER(bounds) @@ -209,8 +194,8 @@ IPC_STRUCT_TRAITS_BEGIN(extensions::Message) IPC_STRUCT_TRAITS_END() // Singly-included section for custom IPC traits. -#ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_MESSAGES_H_ -#define CHROME_COMMON_EXTENSIONS_EXTENSION_MESSAGES_H_ +#ifndef EXTENSIONS_COMMON_EXTENSION_MESSAGES_H_ +#define EXTENSIONS_COMMON_EXTENSION_MESSAGES_H_ // IPC_MESSAGE macros choke on extra , in the std::map, when expanding. We need // to typedef it to avoid that. @@ -310,7 +295,7 @@ struct ParamTraits<ExtensionMsg_Loaded_Params> { } // namespace IPC -#endif // CHROME_COMMON_EXTENSIONS_EXTENSION_MESSAGES_H_ +#endif // EXTENSIONS_COMMON_EXTENSION_MESSAGES_H_ // Messages sent from the browser to the renderer. @@ -377,11 +362,6 @@ IPC_MESSAGE_ROUTED1(ExtensionMsg_ExecuteCode, IPC_MESSAGE_CONTROL1(ExtensionMsg_UpdateUserScripts, base::SharedMemoryHandle) -// Requests application info for the page. The renderer responds back with -// ExtensionHostMsg_DidGetApplicationInfo. -IPC_MESSAGE_ROUTED1(ExtensionMsg_GetApplicationInfo, - int32 /*page_id*/) - // Tell the render view which browser window it's being attached to. IPC_MESSAGE_ROUTED1(ExtensionMsg_UpdateBrowserWindowId, int /* id of browser window */) @@ -599,10 +579,6 @@ IPC_MESSAGE_ROUTED3(ExtensionHostMsg_ContentScriptsExecuting, int32 /* page_id of the _topmost_ frame */, GURL /* url of the _topmost_ frame */) -IPC_MESSAGE_ROUTED2(ExtensionHostMsg_DidGetApplicationInfo, - int32 /* page_id */, - WebApplicationInfo) - // Sent by the renderer to implement chrome.webstore.install(). IPC_MESSAGE_ROUTED4(ExtensionHostMsg_InlineWebstoreInstall, int32 /* install id */, diff --git a/extensions/common/permissions/api_permission_set_unittest.cc b/extensions/common/permissions/api_permission_set_unittest.cc index abeb9ab..f57f882 100644 --- a/extensions/common/permissions/api_permission_set_unittest.cc +++ b/extensions/common/permissions/api_permission_set_unittest.cc @@ -4,7 +4,7 @@ #include "base/pickle.h" #include "base/values.h" -#include "chrome/common/extensions/extension_messages.h" +#include "extensions/common/extension_messages.h" #include "extensions/common/permissions/api_permission_set.h" #include "extensions/common/permissions/permissions_info.h" #include "ipc/ipc_message.h" diff --git a/extensions/common/permissions/manifest_permission_set_unittest.cc b/extensions/common/permissions/manifest_permission_set_unittest.cc index a0191c3..d40c097 100644 --- a/extensions/common/permissions/manifest_permission_set_unittest.cc +++ b/extensions/common/permissions/manifest_permission_set_unittest.cc @@ -4,7 +4,7 @@ #include "base/pickle.h" #include "base/values.h" -#include "chrome/common/extensions/extension_messages.h" +#include "extensions/common/extension_messages.h" #include "extensions/common/permissions/manifest_permission.h" #include "extensions/common/permissions/manifest_permission_set.h" #include "ipc/ipc_message.h" diff --git a/extensions/extensions.gyp b/extensions/extensions.gyp index b49999b..9e4a741 100644 --- a/extensions/extensions.gyp +++ b/extensions/extensions.gyp @@ -49,6 +49,10 @@ 'common/extension_api.cc', 'common/extension_api.h', 'common/extension_api_stub.cc', + 'common/extension_message_generator.cc', + 'common/extension_message_generator.h', + 'common/extension_messages.cc', + 'common/extension_messages.h', 'common/extension_paths.cc', 'common/extension_paths.h', 'common/extension_resource.cc', diff --git a/ipc/ipc_message_start.h b/ipc/ipc_message_start.h index 10024fc..10e7368 100644 --- a/ipc/ipc_message_start.h +++ b/ipc/ipc_message_start.h @@ -98,6 +98,7 @@ enum IPCMessageStart { CdmMsgStart, ScreenOrientationMsgStart, MediaStreamTrackMetricsHostMsgStart, + ChromeExtensionMsgStart, LastIPCMsgStart // Must come last. }; |