From a8ba6369d632006245574b26a2b4ee8cc21ca25f Mon Sep 17 00:00:00 2001 From: "erg@google.com" Date: Wed, 10 Nov 2010 20:02:25 +0000 Subject: Part 2 of reapplying r64637. Move the automation message files from chrome/test/automation to chrome/common/. This requires a temporary override to chrome/common/DEPS until Part 3 lands. BUG=51409 TEST=compiles Review URL: http://codereview.chromium.org/4758001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65695 0039d316-1c4b-4281-b951-d872f2087c98 --- ceee/ie/plugin/bho/browser_helper_object.cc | 2 +- ceee/ie/plugin/toolband/tool_band.cc | 2 +- chrome/browser/automation/automation_provider.cc | 2 +- chrome/browser/automation/automation_provider.h | 2 +- .../browser/automation/automation_provider_gtk.cc | 2 +- .../browser/automation/automation_provider_json.cc | 2 +- .../browser/automation/automation_provider_mac.mm | 2 +- .../automation/automation_provider_observers.cc | 2 +- .../automation/automation_provider_observers.h | 2 +- .../browser/automation/automation_provider_win.cc | 2 +- .../automation_resource_message_filter.cc | 2 +- .../automation/automation_resource_tracker.cc | 2 +- .../automation/chrome_frame_automation_provider.cc | 2 +- .../browser/automation/extension_port_container.cc | 2 +- .../automation/testing_automation_provider.cc | 2 +- .../testing_automation_provider_views.cc | 2 +- chrome/browser/automation/ui_controls_linux.cc | 2 +- .../automation/url_request_automation_job.cc | 2 +- chrome/browser/extensions/extension_uitest.cc | 2 +- chrome/browser/external_tab_container_win.cc | 2 +- chrome/chrome.gyp | 4 - chrome/chrome_browser.gypi | 6 - chrome/chrome_common.gypi | 3 + chrome/chrome_tests.gypi | 2 +- chrome/common/DEPS | 9 + chrome/common/automation_constants.h | 36 + chrome/common/automation_messages.cc | 9 + chrome/common/automation_messages.h | 644 +++++++++ chrome/common/automation_messages_internal.h | 1451 ++++++++++++++++++++ chrome/test/automation/autocomplete_edit_proxy.cc | 4 +- chrome/test/automation/automation_constants.h | 46 - .../test/automation/automation_handle_tracker.cc | 2 +- chrome/test/automation/automation_messages.cc | 9 - chrome/test/automation/automation_messages.h | 645 --------- .../test/automation/automation_messages_internal.h | 1451 -------------------- chrome/test/automation/automation_proxy.cc | 4 +- chrome/test/automation/automation_proxy.h | 2 +- chrome/test/automation/automation_proxy_uitest.cc | 2 +- chrome/test/automation/browser_proxy.cc | 4 +- chrome/test/automation/extension_proxy.cc | 2 +- chrome/test/automation/extension_proxy.h | 2 +- chrome/test/automation/tab_proxy.cc | 3 +- chrome/test/automation/tab_proxy.h | 2 +- chrome/test/automation/window_proxy.cc | 4 +- chrome/test/pyautolib/pyautolib.i | 5 +- chrome/test/reliability/page_load_test.cc | 2 +- chrome/test/ui/ui_test.cc | 2 +- chrome_frame/cfproxy.h | 2 +- chrome_frame/cfproxy_proxy.cc | 2 +- chrome_frame/cfproxy_support.cc | 2 +- chrome_frame/cfproxy_test.cc | 2 +- chrome_frame/chrome_frame_delegate.h | 2 +- chrome_frame/external_tab.cc | 2 +- chrome_frame/external_tab.h | 4 +- chrome_frame/external_tab_test.cc | 2 +- chrome_frame/plugin_url_request.cc | 2 +- chrome_frame/test/net/test_automation_provider.cc | 2 +- chrome_frame/test/reliability/page_load_test.cc | 2 +- ipc/ipc_message_impl_macros.h | 2 +- ipc/ipc_message_macros.h | 4 +- 60 files changed, 2208 insertions(+), 2217 deletions(-) create mode 100644 chrome/common/automation_messages.cc create mode 100644 chrome/common/automation_messages.h create mode 100644 chrome/common/automation_messages_internal.h delete mode 100644 chrome/test/automation/automation_constants.h delete mode 100644 chrome/test/automation/automation_messages.cc delete mode 100644 chrome/test/automation/automation_messages.h delete mode 100644 chrome/test/automation/automation_messages_internal.h diff --git a/ceee/ie/plugin/bho/browser_helper_object.cc b/ceee/ie/plugin/bho/browser_helper_object.cc index cc2be5e..570e67f 100644 --- a/ceee/ie/plugin/bho/browser_helper_object.cc +++ b/ceee/ie/plugin/bho/browser_helper_object.cc @@ -28,8 +28,8 @@ #include "ceee/ie/plugin/scripting/script_host.h" #include "chrome/browser/automation/extension_automation_constants.h" #include "chrome/browser/extensions/extension_tabs_module_constants.h" +#include "chrome/common/automation_constants.h" #include "chrome/common/url_constants.h" -#include "chrome/test/automation/automation_constants.h" #include "googleurl/src/gurl.h" #include "broker_lib.h" // NOLINT diff --git a/ceee/ie/plugin/toolband/tool_band.cc b/ceee/ie/plugin/toolband/tool_band.cc index e3ea63c..eee6488 100644 --- a/ceee/ie/plugin/toolband/tool_band.cc +++ b/ceee/ie/plugin/toolband/tool_band.cc @@ -19,8 +19,8 @@ #include "ceee/ie/common/extension_manifest.h" #include "ceee/ie/common/ceee_module_util.h" #include "ceee/ie/plugin/bho/tool_band_visibility.h" +#include "chrome/common/automation_constants.h" #include "chrome/common/chrome_switches.h" -#include "chrome/test/automation/automation_constants.h" #include "chrome_frame/com_message_event.h" _ATL_FUNC_INFO ToolBand::handler_type_idispatch_ = diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc index cbbc786..17c3b32 100644 --- a/chrome/browser/automation/automation_provider.cc +++ b/chrome/browser/automation/automation_provider.cc @@ -85,6 +85,7 @@ #include "chrome/browser/tab_contents/tab_contents_view.h" #include "chrome/browser/translate/translate_infobar_delegate.h" #include "chrome/common/automation_constants.h" +#include "chrome/common/automation_messages.h" #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_switches.h" @@ -95,7 +96,6 @@ #include "chrome/common/notification_service.h" #include "chrome/common/pref_names.h" #include "chrome/common/url_constants.h" -#include "chrome/test/automation/automation_messages.h" #include "chrome/test/automation/tab_proxy.h" #include "net/proxy/proxy_service.h" #include "net/proxy/proxy_config_service_fixed.h" diff --git a/chrome/browser/automation/automation_provider.h b/chrome/browser/automation/automation_provider.h index 280d916..c17aadf 100644 --- a/chrome/browser/automation/automation_provider.h +++ b/chrome/browser/automation/automation_provider.h @@ -23,9 +23,9 @@ #include "chrome/browser/autofill/field_types.h" #include "chrome/browser/cancelable_request.h" #include "chrome/browser/tab_contents/navigation_entry.h" +#include "chrome/common/automation_constants.h" #include "chrome/common/content_settings.h" #include "chrome/common/notification_observer.h" -#include "chrome/test/automation/automation_constants.h" #include "ipc/ipc_message.h" #include "ipc/ipc_channel.h" #if defined(OS_WIN) diff --git a/chrome/browser/automation/automation_provider_gtk.cc b/chrome/browser/automation/automation_provider_gtk.cc index 37c4fb8..bf6a15c 100644 --- a/chrome/browser/automation/automation_provider_gtk.cc +++ b/chrome/browser/automation/automation_provider_gtk.cc @@ -13,7 +13,7 @@ #include "chrome/browser/gtk/browser_window_gtk.h" #include "chrome/browser/gtk/gtk_util.h" #include "chrome/browser/gtk/view_id_util.h" -#include "chrome/test/automation/automation_messages.h" +#include "chrome/common/automation_messages.h" #include "gfx/point.h" #include "gfx/rect.h" diff --git a/chrome/browser/automation/automation_provider_json.cc b/chrome/browser/automation/automation_provider_json.cc index c58b622..16fd8d4 100644 --- a/chrome/browser/automation/automation_provider_json.cc +++ b/chrome/browser/automation/automation_provider_json.cc @@ -8,7 +8,7 @@ #include "base/json/string_escape.h" #include "chrome/browser/autocomplete/autocomplete_match.h" #include "chrome/browser/automation/automation_provider.h" -#include "chrome/test/automation/automation_messages.h" +#include "chrome/common/automation_messages.h" namespace { diff --git a/chrome/browser/automation/automation_provider_mac.mm b/chrome/browser/automation/automation_provider_mac.mm index 99c1bdb..451e7f1 100644 --- a/chrome/browser/automation/automation_provider_mac.mm +++ b/chrome/browser/automation/automation_provider_mac.mm @@ -14,7 +14,7 @@ #include "chrome/browser/cocoa/tab_window_controller.h" #include "chrome/browser/view_ids.h" #import "chrome/browser/cocoa/browser_window_controller.h" -#include "chrome/test/automation/automation_messages.h" +#include "chrome/common/automation_messages.h" #include "gfx/point.h" #include "gfx/rect.h" #include "grit/generated_resources.h" diff --git a/chrome/browser/automation/automation_provider_observers.cc b/chrome/browser/automation/automation_provider_observers.cc index d5fb64f..2241f69 100644 --- a/chrome/browser/automation/automation_provider_observers.cc +++ b/chrome/browser/automation/automation_provider_observers.cc @@ -35,9 +35,9 @@ #include "chrome/browser/tab_contents/tab_contents.h" #include "chrome/browser/translate/page_translated_details.h" #include "chrome/browser/translate/translate_infobar_delegate.h" +#include "chrome/common/automation_constants.h" #include "chrome/common/extensions/extension.h" #include "chrome/common/notification_service.h" -#include "chrome/test/automation/automation_constants.h" #include "gfx/rect.h" #if defined(OS_CHROMEOS) diff --git a/chrome/browser/automation/automation_provider_observers.h b/chrome/browser/automation/automation_provider_observers.h index 7b76638..708d0c4 100644 --- a/chrome/browser/automation/automation_provider_observers.h +++ b/chrome/browser/automation/automation_provider_observers.h @@ -21,10 +21,10 @@ #include "chrome/browser/password_manager/password_store.h" #include "chrome/browser/search_engines/template_url_model_observer.h" #include "chrome/browser/tabs/tab_strip_model.h" +#include "chrome/common/automation_messages.h" #include "chrome/common/notification_observer.h" #include "chrome/common/notification_registrar.h" #include "chrome/common/notification_type.h" -#include "chrome/test/automation/automation_messages.h" class AutocompleteEditModel; class AutomationProvider; diff --git a/chrome/browser/automation/automation_provider_win.cc b/chrome/browser/automation/automation_provider_win.cc index a988a2f..56fe617 100644 --- a/chrome/browser/automation/automation_provider_win.cc +++ b/chrome/browser/automation/automation_provider_win.cc @@ -22,8 +22,8 @@ #include "chrome/browser/renderer_host/render_view_host.h" #include "chrome/browser/tab_contents/tab_contents.h" #include "chrome/browser/views/bookmark_bar_view.h" +#include "chrome/common/automation_messages.h" #include "chrome/common/page_zoom.h" -#include "chrome/test/automation/automation_messages.h" #include "views/focus/accelerator_handler.h" #include "views/widget/root_view.h" #include "views/widget/widget_win.h" diff --git a/chrome/browser/automation/automation_resource_message_filter.cc b/chrome/browser/automation/automation_resource_message_filter.cc index ecbbddc..98461d7 100644 --- a/chrome/browser/automation/automation_resource_message_filter.cc +++ b/chrome/browser/automation/automation_resource_message_filter.cc @@ -15,8 +15,8 @@ #include "chrome/browser/net/url_request_slow_download_job.h" #include "chrome/browser/net/url_request_slow_http_job.h" #include "chrome/browser/renderer_host/resource_message_filter.h" +#include "chrome/common/automation_messages.h" #include "chrome/common/chrome_paths.h" -#include "chrome/test/automation/automation_messages.h" #include "googleurl/src/gurl.h" #include "net/base/net_errors.h" #include "net/url_request/url_request_filter.h" diff --git a/chrome/browser/automation/automation_resource_tracker.cc b/chrome/browser/automation/automation_resource_tracker.cc index a82265d..49797c6e 100644 --- a/chrome/browser/automation/automation_resource_tracker.cc +++ b/chrome/browser/automation/automation_resource_tracker.cc @@ -4,8 +4,8 @@ #include "chrome/browser/automation/automation_resource_tracker.h" +#include "chrome/common/automation_messages.h" #include "chrome/common/notification_service.h" -#include "chrome/test/automation/automation_messages.h" AutomationResourceTrackerImpl::AutomationResourceTrackerImpl( IPC::Message::Sender* sender) diff --git a/chrome/browser/automation/chrome_frame_automation_provider.cc b/chrome/browser/automation/chrome_frame_automation_provider.cc index b3ea659..4de788a 100644 --- a/chrome/browser/automation/chrome_frame_automation_provider.cc +++ b/chrome/browser/automation/chrome_frame_automation_provider.cc @@ -5,7 +5,7 @@ #include "chrome/browser/automation/chrome_frame_automation_provider.h" #include "chrome/browser/profile.h" #include "chrome/browser/profile_manager.h" -#include "chrome/test/automation/automation_messages.h" +#include "chrome/common/automation_messages.h" #include "ipc/ipc_message.h" #include "ipc/ipc_channel.h" diff --git a/chrome/browser/automation/extension_port_container.cc b/chrome/browser/automation/extension_port_container.cc index f5a1d75..baf6517 100644 --- a/chrome/browser/automation/extension_port_container.cc +++ b/chrome/browser/automation/extension_port_container.cc @@ -15,9 +15,9 @@ #include "chrome/browser/profile.h" #include "chrome/browser/renderer_host/render_process_host.h" #include "chrome/browser/renderer_host/render_view_host.h" +#include "chrome/common/automation_messages.h" #include "chrome/common/notification_service.h" #include "chrome/common/render_messages.h" -#include "chrome/test/automation/automation_messages.h" // TODO(siggi): Find a more structured way to read and write JSON messages. diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc index 4c2fcce..1b8b5b9 100644 --- a/chrome/browser/automation/testing_automation_provider.cc +++ b/chrome/browser/automation/testing_automation_provider.cc @@ -66,7 +66,7 @@ #include "chrome/browser/notifications/balloon_collection.h" #include "chrome/browser/notifications/notification.h" #include "chrome/browser/notifications/notification_ui_manager.h" -#include "chrome/test/automation/automation_messages.h" +#include "chrome/common/automation_messages.h" #include "net/base/cookie_store.h" #include "net/url_request/url_request_context.h" #include "views/event.h" diff --git a/chrome/browser/automation/testing_automation_provider_views.cc b/chrome/browser/automation/testing_automation_provider_views.cc index 6048cd8..f8631cf 100644 --- a/chrome/browser/automation/testing_automation_provider_views.cc +++ b/chrome/browser/automation/testing_automation_provider_views.cc @@ -9,7 +9,7 @@ #include "chrome/browser/browser_window.h" #include "chrome/browser/views/frame/browser_view.h" #include "chrome/browser/views/toolbar_view.h" -#include "chrome/test/automation/automation_messages.h" +#include "chrome/common/automation_messages.h" #include "gfx/point.h" #include "views/controls/menu/menu_wrapper.h" #include "views/view.h" diff --git a/chrome/browser/automation/ui_controls_linux.cc b/chrome/browser/automation/ui_controls_linux.cc index a2dd0ae..21cd0dd 100644 --- a/chrome/browser/automation/ui_controls_linux.cc +++ b/chrome/browser/automation/ui_controls_linux.cc @@ -13,7 +13,7 @@ #include "base/message_loop.h" #include "chrome/browser/automation/ui_controls_internal.h" #include "chrome/browser/gtk/gtk_util.h" -#include "chrome/test/automation/automation_constants.h" +#include "chrome/common/automation_constants.h" #if defined(TOOLKIT_VIEWS) #include "views/view.h" diff --git a/chrome/browser/automation/url_request_automation_job.cc b/chrome/browser/automation/url_request_automation_job.cc index fc4bd63..1b73b68 100644 --- a/chrome/browser/automation/url_request_automation_job.cc +++ b/chrome/browser/automation/url_request_automation_job.cc @@ -11,7 +11,7 @@ #include "chrome/browser/renderer_host/render_view_host.h" #include "chrome/browser/renderer_host/resource_dispatcher_host.h" #include "chrome/browser/renderer_host/resource_dispatcher_host_request_info.h" -#include "chrome/test/automation/automation_messages.h" +#include "chrome/common/automation_messages.h" #include "net/base/cookie_monster.h" #include "net/base/io_buffer.h" #include "net/base/net_errors.h" diff --git a/chrome/browser/extensions/extension_uitest.cc b/chrome/browser/extensions/extension_uitest.cc index f074c9b..8688806 100644 --- a/chrome/browser/extensions/extension_uitest.cc +++ b/chrome/browser/extensions/extension_uitest.cc @@ -8,9 +8,9 @@ #include "base/values.h" #include "chrome/browser/automation/extension_automation_constants.h" #include "chrome/browser/extensions/extension_tabs_module_constants.h" +#include "chrome/common/automation_messages.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/extensions/extension.h" -#include "chrome/test/automation/automation_messages.h" #include "chrome/test/automation/automation_proxy_uitest.h" #include "chrome/test/automation/tab_proxy.h" #include "chrome/test/ui/ui_test.h" diff --git a/chrome/browser/external_tab_container_win.cc b/chrome/browser/external_tab_container_win.cc index 88a1da7..41b0a99 100644 --- a/chrome/browser/external_tab_container_win.cc +++ b/chrome/browser/external_tab_container_win.cc @@ -32,6 +32,7 @@ #include "chrome/browser/views/page_info_bubble_view.h" #include "chrome/browser/views/tab_contents/render_view_context_menu_views.h" #include "chrome/browser/views/tab_contents/tab_contents_container.h" +#include "chrome/common/automation_messages.h" #include "chrome/common/bindings_policy.h" #include "chrome/common/chrome_constants.h" #include "chrome/common/render_messages.h" @@ -40,7 +41,6 @@ #include "chrome/common/notification_service.h" #include "chrome/common/page_transition_types.h" #include "chrome/common/url_constants.h" -#include "chrome/test/automation/automation_messages.h" #include "grit/generated_resources.h" #include "grit/locale_settings.h" #include "views/grid_layout.h" diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp index 5212da2..e148da9 100644 --- a/chrome/chrome.gyp +++ b/chrome/chrome.gyp @@ -1789,12 +1789,8 @@ 'sources': [ 'test/automation/autocomplete_edit_proxy.cc', 'test/automation/autocomplete_edit_proxy.h', - 'test/automation/automation_constants.h', 'test/automation/automation_handle_tracker.cc', 'test/automation/automation_handle_tracker.h', - 'test/automation/automation_messages.cc', - 'test/automation/automation_messages.h', - 'test/automation/automation_messages_internal.h', 'test/automation/automation_proxy.cc', 'test/automation/automation_proxy.h', 'test/automation/browser_proxy.cc', diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi index e1133aa..4966c6c 100644 --- a/chrome/chrome_browser.gypi +++ b/chrome/chrome_browser.gypi @@ -3365,12 +3365,6 @@ 'browser/zygote_host_linux.cc', 'browser/zygote_main_linux.cc', - # TODO(erg): http://crbug.com/51409 These files are also specified as - # part of the automation project, but we need these definitions here, - # too, due to usage in our automation provider. - 'test/automation/automation_messages.cc', - 'test/automation/automation_messages.h', - # These files are generated by GRIT. '<(grit_out_dir)/grit/bookmark_manager_resources_map.cc', '<(grit_out_dir)/grit/shared_resources_map.cc', diff --git a/chrome/chrome_common.gypi b/chrome/chrome_common.gypi index 4c17aaf..fec40f0 100644 --- a/chrome/chrome_common.gypi +++ b/chrome/chrome_common.gypi @@ -224,6 +224,9 @@ 'common/appcache/appcache_dispatcher.h', 'common/automation_constants.cc', 'common/automation_constants.h', + 'common/automation_messages.cc', + 'common/automation_messages.h', + 'common/automation_messages_internal.h', 'common/child_process_host.cc', 'common/child_process_host.h', 'common/chrome_descriptors.h', diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi index 32601de..9472bd1 100644 --- a/chrome/chrome_tests.gypi +++ b/chrome/chrome_tests.gypi @@ -7,9 +7,9 @@ 'pyautolib_sources': [ 'app/chrome_command_ids.h', 'app/chrome_dll_resource.h', + 'common/automation_constants.h', 'common/pref_names.cc', 'common/pref_names.h', - 'test/automation/automation_constants.h', 'test/automation/browser_proxy.cc', 'test/automation/browser_proxy.h', 'test/automation/tab_proxy.cc', diff --git a/chrome/common/DEPS b/chrome/common/DEPS index 18175ac..26ce642 100644 --- a/chrome/common/DEPS +++ b/chrome/common/DEPS @@ -17,6 +17,15 @@ include_rules = [ "+third_party/sqlite", "+third_party/zlib", + # TODO(erg): A previous version of this patch moved everything needed from + # tab_contents/ to chrome/common/ but failed on the buildbot (but not locally + # or on the trybots). Temporarily add this suppression as I commit what was a + # very large patch piecewise, removing it with the final patch that will move + # the files again and remove this override. + # + # (Also: the only thing used from these headers are enums.) + "+chrome/browser/tab_contents", + # FIXME - refactor code and remove these dependencies "+chrome/installer", ] diff --git a/chrome/common/automation_constants.h b/chrome/common/automation_constants.h index 6959af7..13b120e 100644 --- a/chrome/common/automation_constants.h +++ b/chrome/common/automation_constants.h @@ -15,6 +15,42 @@ extern const char kJSONProxyNoProxy[]; extern const char kJSONProxyPacUrl[]; extern const char kJSONProxyBypassList[]; extern const char kJSONProxyServer[]; + +// Amount of time to wait before querying the browser. +static const int kSleepTime = 250; } +// Used by AutomationProxy, declared here so that other headers don't need +// to include automation_proxy.h. +enum AutomationLaunchResult { + AUTOMATION_LAUNCH_RESULT_INVALID = -1, + AUTOMATION_SUCCESS, + AUTOMATION_TIMEOUT, + AUTOMATION_VERSION_MISMATCH, + AUTOMATION_CREATE_TAB_FAILED, + AUTOMATION_SERVER_CRASHED, +}; + +enum AutomationMsg_NavigationResponseValues { + AUTOMATION_MSG_NAVIGATION_ERROR = 0, + AUTOMATION_MSG_NAVIGATION_SUCCESS, + AUTOMATION_MSG_NAVIGATION_AUTH_NEEDED, +}; + +enum AutomationMsg_ExtensionResponseValues { + AUTOMATION_MSG_EXTENSION_INSTALL_SUCCEEDED = 0, + AUTOMATION_MSG_EXTENSION_INSTALL_FAILED +}; + +// Used in the AutomationMsg_GetExtensionProperty to identify which extension +// property should be retrieved, instead of having separate messages for each +// property. +enum AutomationMsg_ExtensionProperty { + AUTOMATION_MSG_EXTENSION_ID = 0, + AUTOMATION_MSG_EXTENSION_NAME, + AUTOMATION_MSG_EXTENSION_VERSION, + AUTOMATION_MSG_EXTENSION_BROWSER_ACTION_INDEX, +}; + + #endif // CHROME_COMMON_AUTOMATION_CONSTANTS_H__ diff --git a/chrome/common/automation_messages.cc b/chrome/common/automation_messages.cc new file mode 100644 index 0000000..df6d0e2 --- /dev/null +++ b/chrome/common/automation_messages.cc @@ -0,0 +1,9 @@ +// Copyright (c) 2010 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/automation_messages.h" + +#define MESSAGES_INTERNAL_IMPL_FILE \ + "chrome/common/automation_messages_internal.h" +#include "ipc/ipc_message_impl_macros.h" diff --git a/chrome/common/automation_messages.h b/chrome/common/automation_messages.h new file mode 100644 index 0000000..bc77704 --- /dev/null +++ b/chrome/common/automation_messages.h @@ -0,0 +1,644 @@ +// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_COMMON_AUTOMATION_MESSAGES_H__ +#define CHROME_COMMON_AUTOMATION_MESSAGES_H__ +#pragma once + +#include + +#include "base/basictypes.h" +#include "chrome/common/automation_constants.h" +#include "chrome/common/common_param_traits.h" +#include "chrome/browser/tab_contents/navigation_entry.h" +#include "chrome/browser/tab_contents/security_style.h" +#include "gfx/rect.h" +#include "net/base/upload_data.h" + +struct AutomationMsg_Find_Params { + // Unused value, which exists only for backwards compat. + int unused; + + // The word(s) to find on the page. + string16 search_string; + + // Whether to search forward or backward within the page. + bool forward; + + // Whether search should be Case sensitive. + bool match_case; + + // Whether this operation is first request (Find) or a follow-up (FindNext). + bool find_next; +}; + +namespace IPC { + +template <> +struct ParamTraits { + typedef AutomationMsg_Find_Params param_type; + static void Write(Message* m, const param_type& p) { + WriteParam(m, p.unused); + WriteParam(m, p.search_string); + WriteParam(m, p.forward); + WriteParam(m, p.match_case); + WriteParam(m, p.find_next); + } + static bool Read(const Message* m, void** iter, param_type* p) { + return + ReadParam(m, iter, &p->unused) && + ReadParam(m, iter, &p->search_string) && + ReadParam(m, iter, &p->forward) && + ReadParam(m, iter, &p->match_case) && + ReadParam(m, iter, &p->find_next); + } + static void Log(const param_type& p, std::string* l) { + l->append(""); + } +}; + +template <> +struct ParamTraits { + typedef AutomationMsg_NavigationResponseValues param_type; + static void Write(Message* m, const param_type& p) { + m->WriteInt(p); + } + static bool Read(const Message* m, void** iter, param_type* p) { + int type; + if (!m->ReadInt(iter, &type)) + return false; + *p = static_cast(type); + return true; + } + static void Log(const param_type& p, std::string* l) { + std::string control; + switch (p) { + case AUTOMATION_MSG_NAVIGATION_ERROR: + control = "AUTOMATION_MSG_NAVIGATION_ERROR"; + break; + case AUTOMATION_MSG_NAVIGATION_SUCCESS: + control = "AUTOMATION_MSG_NAVIGATION_SUCCESS"; + break; + case AUTOMATION_MSG_NAVIGATION_AUTH_NEEDED: + control = "AUTOMATION_MSG_NAVIGATION_AUTH_NEEDED"; + break; + default: + control = "UNKNOWN"; + break; + } + + LogParam(control, l); + } +}; + +template <> +struct ParamTraits { + typedef AutomationMsg_ExtensionResponseValues param_type; + static void Write(Message* m, const param_type& p) { + m->WriteInt(p); + } + static bool Read(const Message* m, void** iter, param_type* p) { + int type; + if (!m->ReadInt(iter, &type)) + return false; + *p = static_cast(type); + return true; + } + static void Log(const param_type& p, std::string* l) { + std::string control; + switch (p) { + case AUTOMATION_MSG_EXTENSION_INSTALL_SUCCEEDED: + control = "AUTOMATION_MSG_EXTENSION_INSTALL_SUCCEEDED"; + break; + case AUTOMATION_MSG_EXTENSION_INSTALL_FAILED: + control = "AUTOMATION_MSG_EXTENSION_INSTALL_FAILED"; + break; + default: + control = "UNKNOWN"; + break; + } + + LogParam(control, l); + } +}; + +template <> +struct ParamTraits { + typedef AutomationMsg_ExtensionProperty param_type; + static void Write(Message* m, const param_type& p) { + m->WriteInt(p); + } + static bool Read(const Message* m, void** iter, param_type* p) { + int type; + if (!m->ReadInt(iter, &type)) + return false; + *p = static_cast(type); + return true; + } + static void Log(const param_type& p, std::string* l) { + std::string control; + switch (p) { + case AUTOMATION_MSG_EXTENSION_ID: + control = "AUTOMATION_MSG_EXTENSION_ID"; + break; + case AUTOMATION_MSG_EXTENSION_NAME: + control = "AUTOMATION_MSG_EXTENSION_NAME"; + break; + case AUTOMATION_MSG_EXTENSION_VERSION: + control = "AUTOMATION_MSG_EXTENSION_VERSION"; + break; + case AUTOMATION_MSG_EXTENSION_BROWSER_ACTION_INDEX: + control = "AUTOMATION_MSG_EXTENSION_BROWSER_ACTION_INDEX"; + break; + default: + control = "UNKNOWN"; + break; + } + + LogParam(control, l); + } +}; + +template <> +struct ParamTraits { + typedef SecurityStyle param_type; + static void Write(Message* m, const param_type& p) { + m->WriteInt(p); + } + static bool Read(const Message* m, void** iter, param_type* p) { + int type; + if (!m->ReadInt(iter, &type)) + return false; + *p = static_cast(type); + return true; + } + static void Log(const param_type& p, std::string* l) { + std::string control; + switch (p) { + case SECURITY_STYLE_UNKNOWN: + control = "SECURITY_STYLE_UNKNOWN"; + break; + case SECURITY_STYLE_UNAUTHENTICATED: + control = "SECURITY_STYLE_UNAUTHENTICATED"; + break; + case SECURITY_STYLE_AUTHENTICATION_BROKEN: + control = "SECURITY_STYLE_AUTHENTICATION_BROKEN"; + break; + case SECURITY_STYLE_AUTHENTICATED: + control = "SECURITY_STYLE_AUTHENTICATED"; + break; + default: + control = "UNKNOWN"; + break; + } + + LogParam(control, l); + } +}; + +template <> +struct ParamTraits { + typedef NavigationEntry::PageType param_type; + static void Write(Message* m, const param_type& p) { + m->WriteInt(p); + } + static bool Read(const Message* m, void** iter, param_type* p) { + int type; + if (!m->ReadInt(iter, &type)) + return false; + *p = static_cast(type); + return true; + } + static void Log(const param_type& p, std::string* l) { + std::string control; + switch (p) { + case NavigationEntry::NORMAL_PAGE: + control = "NORMAL_PAGE"; + break; + case NavigationEntry::ERROR_PAGE: + control = "ERROR_PAGE"; + break; + case NavigationEntry::INTERSTITIAL_PAGE: + control = "INTERSTITIAL_PAGE"; + break; + default: + control = "UNKNOWN"; + break; + } + + LogParam(control, l); + } +}; + +#if defined(OS_WIN) +struct Reposition_Params { + HWND window; + HWND window_insert_after; + int left; + int top; + int width; + int height; + int flags; + bool set_parent; + HWND parent_window; +}; + +// Traits for SetWindowPos_Params structure to pack/unpack. +template <> +struct ParamTraits { + typedef Reposition_Params param_type; + static void Write(Message* m, const param_type& p) { + WriteParam(m, p.window); + WriteParam(m, p.window_insert_after); + WriteParam(m, p.left); + WriteParam(m, p.top); + WriteParam(m, p.width); + WriteParam(m, p.height); + WriteParam(m, p.flags); + WriteParam(m, p.set_parent); + WriteParam(m, p.parent_window); + } + static bool Read(const Message* m, void** iter, param_type* p) { + return ReadParam(m, iter, &p->window) && + ReadParam(m, iter, &p->window_insert_after) && + ReadParam(m, iter, &p->left) && + ReadParam(m, iter, &p->top) && + ReadParam(m, iter, &p->width) && + ReadParam(m, iter, &p->height) && + ReadParam(m, iter, &p->flags) && + ReadParam(m, iter, &p->set_parent) && + ReadParam(m, iter, &p->parent_window); + } + static void Log(const param_type& p, std::string* l) { + l->append("("); + LogParam(p.window, l); + l->append(", "); + LogParam(p.window_insert_after, l); + l->append(", "); + LogParam(p.left, l); + l->append(", "); + LogParam(p.top, l); + l->append(", "); + LogParam(p.width, l); + l->append(", "); + LogParam(p.height, l); + l->append(", "); + LogParam(p.flags, l); + l->append(", "); + LogParam(p.set_parent, l); + l->append(", "); + LogParam(p.parent_window, l); + l->append(")"); + } +}; +#endif // defined(OS_WIN) + +struct AutomationURLRequest { + std::string url; + std::string method; + std::string referrer; + std::string extra_request_headers; + scoped_refptr upload_data; + int resource_type; // see webkit/glue/resource_type.h + int load_flags; // see net/base/load_flags.h +}; + +// Traits for AutomationURLRequest structure to pack/unpack. +template <> +struct ParamTraits { + typedef AutomationURLRequest param_type; + static void Write(Message* m, const param_type& p) { + WriteParam(m, p.url); + WriteParam(m, p.method); + WriteParam(m, p.referrer); + WriteParam(m, p.extra_request_headers); + WriteParam(m, p.upload_data); + WriteParam(m, p.resource_type); + WriteParam(m, p.load_flags); + } + static bool Read(const Message* m, void** iter, param_type* p) { + return ReadParam(m, iter, &p->url) && + ReadParam(m, iter, &p->method) && + ReadParam(m, iter, &p->referrer) && + ReadParam(m, iter, &p->extra_request_headers) && + ReadParam(m, iter, &p->upload_data) && + ReadParam(m, iter, &p->resource_type) && + ReadParam(m, iter, &p->load_flags); + } + static void Log(const param_type& p, std::string* l) { + l->append("("); + LogParam(p.url, l); + l->append(", "); + LogParam(p.method, l); + l->append(", "); + LogParam(p.referrer, l); + l->append(", "); + LogParam(p.extra_request_headers, l); + l->append(", "); + LogParam(p.upload_data, l); + l->append(", "); + LogParam(p.resource_type, l); + l->append(", "); + LogParam(p.load_flags, l); + l->append(")"); + } +}; + +struct AutomationURLResponse { + std::string mime_type; + std::string headers; + int64 content_length; + base::Time last_modified; + std::string redirect_url; + int redirect_status; +}; + +// Traits for AutomationURLResponse structure to pack/unpack. +template <> +struct ParamTraits { + typedef AutomationURLResponse param_type; + static void Write(Message* m, const param_type& p) { + WriteParam(m, p.mime_type); + WriteParam(m, p.headers); + WriteParam(m, p.content_length); + WriteParam(m, p.last_modified); + WriteParam(m, p.redirect_url); + WriteParam(m, p.redirect_status); + } + static bool Read(const Message* m, void** iter, param_type* p) { + return ReadParam(m, iter, &p->mime_type) && + ReadParam(m, iter, &p->headers) && + ReadParam(m, iter, &p->content_length) && + ReadParam(m, iter, &p->last_modified) && + ReadParam(m, iter, &p->redirect_url) && + ReadParam(m, iter, &p->redirect_status); + } + static void Log(const param_type& p, std::string* l) { + l->append("("); + LogParam(p.mime_type, l); + l->append(", "); + LogParam(p.headers, l); + l->append(", "); + LogParam(p.content_length, l); + l->append(", "); + LogParam(p.last_modified, l); + l->append(", "); + LogParam(p.redirect_url, l); + l->append(", "); + LogParam(p.redirect_status, l); + l->append(")"); + } +}; + +struct ExternalTabSettings { + gfx::NativeWindow parent; + gfx::Rect dimensions; + unsigned int style; + bool is_off_the_record; + bool load_requests_via_automation; + bool handle_top_level_requests; + GURL initial_url; + GURL referrer; + bool infobars_enabled; + bool route_all_top_level_navigations; +}; + +// Traits for ExternalTabSettings structure to pack/unpack. +template <> +struct ParamTraits { + typedef ExternalTabSettings param_type; + static void Write(Message* m, const param_type& p) { + WriteParam(m, p.parent); + WriteParam(m, p.dimensions); + WriteParam(m, p.style); + WriteParam(m, p.is_off_the_record); + WriteParam(m, p.load_requests_via_automation); + WriteParam(m, p.handle_top_level_requests); + WriteParam(m, p.initial_url); + WriteParam(m, p.referrer); + WriteParam(m, p.infobars_enabled); + WriteParam(m, p.route_all_top_level_navigations); + } + static bool Read(const Message* m, void** iter, param_type* p) { + return ReadParam(m, iter, &p->parent) && + ReadParam(m, iter, &p->dimensions) && + ReadParam(m, iter, &p->style) && + ReadParam(m, iter, &p->is_off_the_record) && + ReadParam(m, iter, &p->load_requests_via_automation) && + ReadParam(m, iter, &p->handle_top_level_requests) && + ReadParam(m, iter, &p->initial_url) && + ReadParam(m, iter, &p->referrer) && + ReadParam(m, iter, &p->infobars_enabled) && + ReadParam(m, iter, &p->route_all_top_level_navigations); + } + static void Log(const param_type& p, std::string* l) { + l->append("("); + LogParam(p.parent, l); + l->append(", "); + LogParam(p.dimensions, l); + l->append(", "); + LogParam(p.style, l); + l->append(", "); + LogParam(p.is_off_the_record, l); + l->append(", "); + LogParam(p.load_requests_via_automation, l); + l->append(", "); + LogParam(p.handle_top_level_requests, l); + l->append(", "); + LogParam(p.initial_url, l); + l->append(", "); + LogParam(p.referrer, l); + l->append(", "); + LogParam(p.infobars_enabled, l); + l->append(", "); + LogParam(p.route_all_top_level_navigations, l); + l->append(")"); + } +}; + +struct NavigationInfo { + int navigation_type; + int relative_offset; + int navigation_index; + std::wstring title; + GURL url; + GURL referrer; + SecurityStyle security_style; + bool displayed_insecure_content; + bool ran_insecure_content; +}; + +// Traits for NavigationInfo structure to pack/unpack. +template <> +struct ParamTraits { + typedef NavigationInfo param_type; + static void Write(Message* m, const param_type& p) { + WriteParam(m, p.navigation_type); + WriteParam(m, p.relative_offset); + WriteParam(m, p.navigation_index); + WriteParam(m, p.title); + WriteParam(m, p.url); + WriteParam(m, p.referrer); + WriteParam(m, p.security_style); + WriteParam(m, p.displayed_insecure_content); + WriteParam(m, p.ran_insecure_content); + } + static bool Read(const Message* m, void** iter, param_type* p) { + return ReadParam(m, iter, &p->navigation_type) && + ReadParam(m, iter, &p->relative_offset) && + ReadParam(m, iter, &p->navigation_index) && + ReadParam(m, iter, &p->title) && + ReadParam(m, iter, &p->url) && + ReadParam(m, iter, &p->referrer) && + ReadParam(m, iter, &p->security_style) && + ReadParam(m, iter, &p->displayed_insecure_content) && + ReadParam(m, iter, &p->ran_insecure_content); + } + static void Log(const param_type& p, std::string* l) { + l->append("("); + LogParam(p.navigation_type, l); + l->append(", "); + LogParam(p.relative_offset, l); + l->append(", "); + LogParam(p.navigation_index, l); + l->append(", "); + LogParam(p.title, l); + l->append(", "); + LogParam(p.url, l); + l->append(", "); + LogParam(p.referrer, l); + l->append(", "); + LogParam(p.security_style, l); + l->append(", "); + LogParam(p.displayed_insecure_content, l); + l->append(", "); + LogParam(p.ran_insecure_content, l); + l->append(")"); + } +}; + +// A stripped down version of ContextMenuParams in webkit/glue/context_menu.h. +struct MiniContextMenuParams { + // The x coordinate for displaying the menu. + int screen_x; + + // The y coordinate for displaying the menu. + int screen_y; + + // This is the URL of the link that encloses the node the context menu was + // invoked on. + GURL link_url; + + // The link URL to be used ONLY for "copy link address". We don't validate + // this field in the frontend process. + GURL unfiltered_link_url; + + // This is the source URL for the element that the context menu was + // invoked on. Example of elements with source URLs are img, audio, and + // video. + GURL src_url; + + // This is the URL of the top level page that the context menu was invoked + // on. + GURL page_url; + + // This is the URL of the subframe that the context menu was invoked on. + GURL frame_url; +}; + +// Traits for MiniContextMenuParams structure to pack/unpack. +template <> +struct ParamTraits { + typedef MiniContextMenuParams param_type; + static void Write(Message* m, const param_type& p) { + WriteParam(m, p.screen_x); + WriteParam(m, p.screen_y); + WriteParam(m, p.link_url); + WriteParam(m, p.unfiltered_link_url); + WriteParam(m, p.src_url); + WriteParam(m, p.page_url); + WriteParam(m, p.frame_url); + } + static bool Read(const Message* m, void** iter, param_type* p) { + return ReadParam(m, iter, &p->screen_x) && + ReadParam(m, iter, &p->screen_y) && + ReadParam(m, iter, &p->link_url) && + ReadParam(m, iter, &p->unfiltered_link_url) && + ReadParam(m, iter, &p->src_url) && + ReadParam(m, iter, &p->page_url) && + ReadParam(m, iter, &p->frame_url); + } + static void Log(const param_type& p, std::string* l) { + l->append("("); + LogParam(p.screen_x, l); + l->append(", "); + LogParam(p.screen_y, l); + l->append(", "); + LogParam(p.link_url, l); + l->append(", "); + LogParam(p.unfiltered_link_url, l); + l->append(", "); + LogParam(p.src_url, l); + l->append(", "); + LogParam(p.page_url, l); + l->append(", "); + LogParam(p.frame_url, l); + l->append(")"); + } +}; + +struct AttachExternalTabParams { + uint64 cookie; + GURL url; + gfx::Rect dimensions; + int disposition; + bool user_gesture; + std::string profile_name; +}; + +template <> +struct ParamTraits { + typedef AttachExternalTabParams param_type; + static void Write(Message* m, const param_type& p) { + WriteParam(m, p.cookie); + WriteParam(m, p.url); + WriteParam(m, p.dimensions); + WriteParam(m, p.disposition); + WriteParam(m, p.user_gesture); + WriteParam(m, p.profile_name); + } + + static bool Read(const Message* m, void** iter, param_type* p) { + return ReadParam(m, iter, &p->cookie) && + ReadParam(m, iter, &p->url) && + ReadParam(m, iter, &p->dimensions) && + ReadParam(m, iter, &p->disposition) && + ReadParam(m, iter, &p->user_gesture) && + ReadParam(m, iter, &p->profile_name); + } + + static void Log(const param_type& p, std::string* l) { + l->append("("); + LogParam(p.cookie, l); + l->append(", "); + LogParam(p.url, l); + l->append(", "); + LogParam(p.dimensions, l); + l->append(", "); + LogParam(p.disposition, l); + l->append(", "); + LogParam(p.user_gesture, l); + l->append(","); + LogParam(p.profile_name, l); + l->append(")"); + } +}; + +} // namespace IPC + +#define MESSAGES_INTERNAL_FILE \ + "chrome/common/automation_messages_internal.h" +#include "ipc/ipc_message_macros.h" + +#endif // CHROME_COMMON_AUTOMATION_MESSAGES_H__ diff --git a/chrome/common/automation_messages_internal.h b/chrome/common/automation_messages_internal.h new file mode 100644 index 0000000..97e0a20 --- /dev/null +++ b/chrome/common/automation_messages_internal.h @@ -0,0 +1,1451 @@ +// Copyright (c) 2010 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. + +// Defines the IPC messages used by the automation interface. + +// This header is meant to be included in multiple passes, hence no traditional +// header guard. +// See ipc_message_macros.h for explanation of the macros and passes. + +#include +#include + +#include "base/basictypes.h" +#include "base/string16.h" +#include "chrome/common/content_settings.h" +#include "chrome/common/navigation_types.h" +#include "chrome/test/automation/autocomplete_edit_proxy.h" +#include "gfx/point.h" +#include "gfx/rect.h" +#include "googleurl/src/gurl.h" +#include "ipc/ipc_message_macros.h" +#include "net/url_request/url_request_status.h" + +// NOTE: All IPC messages have either a routing_id of 0 (for asynchronous +// messages), or one that's been assigned by the proxy (for calls +// which expect a response). The routing_id shouldn't be used for +// any other purpose in these message types. + +// NOTE: All the new IPC messages should go at the end (before IPC_END_MESSAGES) +// The IPC message IDs are part of an enum and hence the value +// assumed to be constant across the builds may change. +// The messages AutomationMsg_WindowHWND* in particular should not change +// since the PageCyclerReferenceTest depends on the correctness of the +// message IDs across the builds. + +IPC_BEGIN_MESSAGES(Automation) + + // This message is fired when the AutomationProvider is up and running + // in the app (the app is not fully up at this point). The parameter to this + // message is the version string of the automation provider. This parameter + // is defined to be the version string as returned by + // chrome::VersionInfo::Version(). + // The client can choose to use this version string to decide whether or not + // it can talk to the provider. + IPC_MESSAGE_ROUTED1(AutomationMsg_Hello, std::string) + + // This message is fired when the initial tab(s) are finished loading. + IPC_MESSAGE_ROUTED0(AutomationMsg_InitialLoadsComplete) + + // This message notifies the AutomationProvider to append a new tab the + // window with the given handle. The return value contains the index of + // the new tab, or -1 if the request failed. + // The second parameter is the url to be loaded in the new tab. + IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_AppendTab, int, GURL, int) + + // This message requests the (zero-based) index for the currently + // active tab in the window with the given handle. The return value contains + // the index of the active tab, or -1 if the request failed. + IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_ActiveTabIndex, int, int) + + // This message notifies the AutomationProvider to active the tab. + // The first parameter is the handle to window resource. + // The second parameter is the (zero-based) index to be activated + IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_ActivateTab, int, int, int) + + // This message requests the cookie value for given url in the + // profile of the tab identified by the second parameter. The first + // parameter is the URL string. The response contains the length of the + // cookie value string. On failure, this length = -1. + IPC_SYNC_MESSAGE_ROUTED2_2(AutomationMsg_GetCookies, GURL, int, + int, std::string) + + // This message notifies the AutomationProvider to set and broadcast a cookie + // with given name and value for the given url in the profile of the tab + // identified by the third parameter. The first parameter is the URL + // string, and the second parameter is the cookie name and value to be set. + // The return value is a non-negative value on success. + IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_SetCookie, GURL, std::string, + int, int) + + // This message notifies the AutomationProvider to navigate to a specified + // url in the tab with given handle. The first parameter is the handle to + // the tab resource. The second parameter is the target url. The return + // value contains a status code which is nonnegative on success. + // See AutomationMsg_NavigationResponseValues for the return value. + // + // Deprecated in favor of + // AutomationMsg_NavigateToURLBlockUntilNavigationsComplete. + // TODO(phajdan.jr): Remove when the reference build gets updated. + IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_NavigateToURL, int, GURL, + AutomationMsg_NavigationResponseValues) + + // This message is used to implement the asynchronous version of + // NavigateToURL. + IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_NavigationAsync, + int /* tab handle */, + GURL, + bool /* result */) + + // This message notifies the AutomationProvider to navigate back in session + // history in the tab with given handle. The first parameter is the handle + // to the tab resource. + // See AutomationMsg_NavigationResponseValues for the navigation response + // values. + // + // Deprecated in favor of AutomationMsg_GoBackBlockUntilNavigationsComplete. + // TODO(phajdan.jr): Remove when the reference build gets updated. + IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_GoBack, int, + AutomationMsg_NavigationResponseValues) + + // This message notifies the AutomationProvider to navigate forward in session + // history in the tab with given handle. The first parameter is the handle + // to the tab resource. + // See AutomationMsg_NavigationResponseValues for the navigation response + // values. + // + // Deprecated in favor of + // AutomationMsg_GoForwardBlockUntilNavigationsComplete. + // TODO(phajdan.jr): Remove when the reference build gets updated. + IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_GoForward, int, + AutomationMsg_NavigationResponseValues) + + // This message requests the number of browser windows that the app currently + // has open. The return value is the number of windows. + IPC_SYNC_MESSAGE_ROUTED0_1(AutomationMsg_BrowserWindowCount, int) + + // This message requests the handle (int64 app-unique identifier) of the + // window with the given (zero-based) index. On error, the returned handle + // value is 0. + IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_BrowserWindow, int, int) + + // This message requests the number of tabs in the window with the given + // handle. The return value contains the number of tabs, or -1 if the + // request failed. + IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_TabCount, int, int) + + // This message requests the handle of the tab with the given (zero-based) + // index in the given app window. First parameter specifies the given window + // handle, second specifies the given tab_index. On error, the returned handle + // value is 0. + IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_Tab, int, int, int) + + // This message requests the the title of the tab with the given handle. + // The return value contains the size of the title string. On error, this + // value should be -1 and empty string. Note that the title can be empty in + // which case the size would be 0. + IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_TabTitle, + int, + int, + std::wstring) + + // This message requests the url of the tab with the given handle. + // The return value contains a success flag and the URL string. The URL will + // be empty on failure, and it still may be empty on success. + IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_TabURL, + int /* tab handle */, + bool /* success flag */, + GURL) + +#if defined(OS_WIN) + // TODO(estade): delete this unused message. + IPC_SYNC_MESSAGE_ROUTED0_0(AutomationMsg_WindowHWND) + + // This message requests the HWND of the tab that corresponds + // to the given automation handle. + // The return value contains the HWND value, which is 0 if the call fails. + // + // TODO(estade): The only test that uses this message is + // NPAPIVisiblePluginTester.SelfDeletePluginInvokeInSynchronousMouseMove. It + // can probably be done in another way, and this can be removed. + IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_TabHWND, + int /* tab_handle */, + HWND /* win32 Window Handle */) +#endif // defined(OS_WIN) + + // This message notifies the AutomationProxy that a handle that it has + // previously been given is now invalid. (For instance, if the handle + // represented a window which has now been closed.) The parameter + // value is the handle. + IPC_MESSAGE_ROUTED1(AutomationMsg_InvalidateHandle, int) + + // This message notifies the AutomationProvider that a handle is no + // longer being used, so it can stop paying attention to the + // associated resource. The parameter value is the handle. + IPC_MESSAGE_ROUTED1(AutomationMsg_HandleUnused, int) + + // This message tells the AutomationProvider to provide the given + // authentication data to the specified tab, in response to an HTTP/FTP + // authentication challenge. + IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_SetAuth, + int, // tab handle + std::wstring, // username + std::wstring, // password + AutomationMsg_NavigationResponseValues) // status + + // This message tells the AutomationProvider to cancel the login in the + // specified tab. + IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_CancelAuth, + int, // tab handle + AutomationMsg_NavigationResponseValues) // status + + // Requests that the automation provider ask history for the most recent + // chain of redirects coming from the given URL. The response must be + // decoded by the caller manually; it contains an integer indicating the + // number of URLs, followed by that many wstrings indicating a chain of + // redirects. On failure, the count will be negative. + IPC_SYNC_MESSAGE_ROUTED2_2(AutomationMsg_RedirectsFrom, + int, // tab handle + GURL, // source URL + bool /* succeeded */, + std::vector /* redirects */) + + // This message asks the AutomationProvider whether a tab is waiting for + // login info. + IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_NeedsAuth, + int, // tab handle + bool) // status + + // This message requests the AutomationProvider to apply a certain + // accelerator. It is completely asynchronous with the resulting accelerator + // action. + IPC_SYNC_MESSAGE_ROUTED2_0(AutomationMsg_ApplyAccelerator, + int, // window handle + int) // accelerator id like (IDC_BACK, + // IDC_FORWARD, etc) + // The list can be found at + // chrome/app/chrome_command_ids.h + + // This message requests that the AutomationProvider executes a JavaScript, + // which is sent embedded in a 'javascript:' URL. + // The javascript is executed in context of child frame whose xpath + // is passed as parameter (context_frame). The execution results in + // a serialized JSON string response. + IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_DomOperation, + int, // tab handle + std::wstring, // context_frame + std::wstring, // the javascript to be executed + std::string) // the serialized json string + // containing the result of a + // javascript execution + + // Is the Download Shelf visible for the specified browser? + IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_ShelfVisibility, + int /* browser_handle */, + bool /* is_visible */) + + // This message requests the number of constrained windows in the tab with + // the given handle. The return value contains the number of constrained + // windows, or -1 if the request failed. + IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_ConstrainedWindowCount, + int /* tab_handle */, + int /* constrained_window_count */) + + // This message requests the bounds of the specified View element in + // window coordinates. + // Request: + // int - the handle of the window in which the view appears + // int - the ID of the view, as specified in chrome/browser/view_ids.h + // bool - whether the bounds should be returned in the screen coordinates + // (if true) or in the browser coordinates (if false). + // Response: + // bool - true if the view was found + // gfx::Rect - the bounds of the view, in window coordinates + IPC_SYNC_MESSAGE_ROUTED3_2(AutomationMsg_WindowViewBounds, int, int, + bool, bool, gfx::Rect) + + // This message sets the bounds of the window. + // Request: + // int - the handle of the window to resize + // gfx::Rect - the bounds of the window + // Response: + // bool - true if the resize was successful + IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_SetWindowBounds, int, gfx::Rect, + bool) + +#if defined(OS_WIN) + // TODO(port): Port these messages. + // + // This message requests that a drag be performed in window coordinate space + // Request: + // int - the handle of the window that's the context for this drag + // std::vector - the path of the drag in window coordinate + // space; it should have at least 2 points + // (start and end) + // int - the flags which identify the mouse button(s) for the drag, as + // defined in chrome/views/event.h + // Response: + // bool - true if the drag could be performed + IPC_SYNC_MESSAGE_ROUTED4_1(AutomationMsg_WindowDrag, + int, std::vector, int, bool, bool) +#endif // defined(OS_WIN) + + // Similar to AutomationMsg_InitialLoadsComplete, this indicates that the + // new tab ui has completed the initial load of its data. + // Time is how many milliseconds the load took. + IPC_MESSAGE_ROUTED1(AutomationMsg_InitialNewTabUILoadComplete, + int /* time */) + + // This message starts a find within a tab corresponding to the supplied + // tab handle. The return value contains the number of matches found on the + // page within the tab specified. The parameter 'search_string' specifies + // what string to search for, 'forward' specifies whether to search in + // forward direction (1=forward, 0=back), 'match_case' specifies case + // sensitivity + // (1=case sensitive, 0=case insensitive). If an error occurs, matches_found + // will be -1. + // + // NOTE: This message has been deprecated, please use the new message + // AutomationMsg_Find below. + // + IPC_SYNC_MESSAGE_ROUTED4_2(AutomationMsg_FindInPage, // DEPRECATED. + int, /* tab_handle */ + std::wstring, /* find_request */ + int, /* forward */ + int /* match_case */, + int /* active_ordinal */, + int /* matches_found */) + + // This message sends a inspect element request for a given tab. The response + // contains the number of resources loaded by the inspector controller. + IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_InspectElement, + int, /* tab_handle */ + int, /* x */ + int /* y */, + int) + + // This message requests the process ID of the tab that corresponds + // to the given automation handle. + // The return value has an integer corresponding to the PID of the tab's + // renderer, 0 if the tab currently has no renderer process, or -1 on error. + IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_TabProcessID, + int /* tab_handle */, + int /* process ID */) + + // This tells the browser to enable or disable the filtered network layer. + IPC_MESSAGE_ROUTED1(AutomationMsg_SetFilteredInet, + bool /* enabled */) + + // Gets the directory that downloads will occur in for the active profile. + IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_DownloadDirectory, + int /* tab_handle */, + FilePath /* directory */) + + // This message requests the id of the view that has the focus in the + // specified window. If no view is focused, -1 is returned. Note that the + // window should either be a ViewWindow or a Browser. + IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_GetFocusedViewID, + int /* view_handle */, + int /* focused_view_id */) + + // This message shows/hides the window. + IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_SetWindowVisible, + int /* view_handle */, + bool /* visible */, + bool /* success */) + + // Gets the active status of a window. + IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_IsWindowActive, + int /* view_handle */, + bool /* success */, + bool /* active */) + + // Makes the specified window the active window. + IPC_SYNC_MESSAGE_ROUTED1_0(AutomationMsg_ActivateWindow, + int /* view_handle */) + + // Opens a new browser window. + // TODO(sky): remove this and replace with OpenNewBrowserWindowOfType. + // Doing this requires updating the reference build. + IPC_SYNC_MESSAGE_ROUTED1_0(AutomationMsg_OpenNewBrowserWindow, + bool /* show */ ) + + // This message requests the handle (int64 app-unique identifier) of the + // current active top window. On error, the returned handle value is 0. + IPC_SYNC_MESSAGE_ROUTED0_1(AutomationMsg_ActiveWindow, int) + + // This message requests the browser associated with the specified window + // handle. + // The return value contains a success flag and the handle of the browser. + IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_BrowserForWindow, + int /* window handle */, + bool /* success flag */, + int /* browser handle */) + + // This message requests the window associated with the specified browser + // handle. + // The return value contains a success flag and the handle of the window. + IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_WindowForBrowser, + int /* browser handle */, + bool /* success flag */, + int /* window handle */) + + // This message requests the AutocompleteEdit associated with the specified + // browser handle. + // The return value contains a success flag and the handle of the omnibox. + IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_AutocompleteEditForBrowser, + int /* browser handle */, + bool /* success flag */, + int /* AutocompleteEdit handle */) + +#if defined(OS_WIN) + // TODO(estade): This message is defined later on for Mac and Linux. This is + // to avoid adding a new IPC in the middle for those platforms (see comment + // at top). The message is exactly the same, so they should be remerged when + // all messages in this file have been made cross-platform (at which point we + // will need to check in new reference builds). + // + // This message requests that a mouse click be performed in window coordinate + // space. + // Request: + // int - the handle of the window that's the context for this click + // gfx::Point - the point to click + // int - the flags which identify the mouse button(s) for the click, as + // defined in chrome/views/event.h + IPC_MESSAGE_ROUTED3(AutomationMsg_WindowClick, int, gfx::Point, int) +#endif // defined(OS_WIN) + + // This message requests that a key press be performed. + // Request: + // int - the handle of the window that's the context for this click + // int - the app::KeyboardCode of the key that was pressed. + // int - the flags which identify the modifiers (shift, ctrl, alt) + // associated for, as defined in chrome/views/event.h + IPC_MESSAGE_ROUTED3(AutomationMsg_WindowKeyPress, int, int, int) + + // This message notifies the AutomationProvider to create a tab which is + // hosted by an external process. + // Request: + // ExternalTabSettings - settings for external tab + IPC_SYNC_MESSAGE_ROUTED1_4(AutomationMsg_CreateExternalTab, + IPC::ExternalTabSettings /* settings*/, + gfx::NativeWindow /* Tab container window */, + gfx::NativeWindow /* Tab window */, + int /* Handle to the new tab */, + int /* Session Id of the new tab */) + + // This message notifies the AutomationProvider to navigate to a specified + // url in the external tab with given handle. The first parameter is the + // handle to the tab resource. The second parameter is the target url. + // The third parameter is the referrer. + // The return value contains a status code which is nonnegative on success. + // see AutomationMsg_NavigationResponseValues for the navigation response. + IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_NavigateInExternalTab, + int, + GURL, + GURL, + AutomationMsg_NavigationResponseValues) + + // This message is an outgoing message from Chrome to an external host. + // It is a notification that the NavigationState was changed + // Request: + // -int: The flags specifying what changed + // (see TabContents::InvalidateTypes) + // Response: + // None expected + IPC_MESSAGE_ROUTED3(AutomationMsg_NavigationStateChanged, + int, // tab handle + int, // TabContents::InvalidateTypes + IPC::NavigationInfo) // title, url etc. + + // This message is an outgoing message from Chrome to an external host. + // It is a notification that the target URL has changed (the target URL + // is the URL of the link that the user is hovering on) + // Request: + // -int: The tab handle + // -std::wstring: The new target URL + // Response: + // None expected + IPC_MESSAGE_ROUTED2(AutomationMsg_UpdateTargetUrl, int, std::wstring) + + // This message notifies the AutomationProvider to show the specified html + // text in an interstitial page in the tab with given handle. The first + // parameter is the handle to the tab resource. The second parameter is the + // html text to be displayed. + // The return value contains a success flag. + IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_ShowInterstitialPage, + int, + std::string, + AutomationMsg_NavigationResponseValues) + + // This message notifies the AutomationProvider to hide the current + // interstitial page in the tab with given handle. The parameter is the + // handle to the tab resource. + // The return value contains a success flag. + IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_HideInterstitialPage, int, + bool) + + // This message requests that a tab be closed. + // Request: + // - int: handle of the tab to close + // - bool: if true the proxy blocks until the tab has completely closed, + // otherwise the proxy only blocks until it initiates the close. + IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_CloseTab, int, bool, bool) + + // This message requests that the browser be closed. + // Request: + // - int: handle of the browser which contains the tab + // Response: + // - bool: whether the operation was successfull. + // - bool: whether the browser process will be terminated as a result (if + // this was the last closed browser window). + IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_CloseBrowser, int, bool, + bool) + + IPC_MESSAGE_ROUTED1(AutomationMsg_CloseBrowserRequestAsync, int) + + // Unused. + // Response: + // None expected + IPC_MESSAGE_ROUTED1(AutomationMsg_Unused, int) + +#if defined(OS_WIN) + // TODO(port): Port these messages. + // + // This message is an outgoing message from Chrome to an external host. + // It is a request to process a keyboard accelerator. + // Request: + // -int: Tab handle + // -MSG: The keyboard message + // Response: + // None expected + // TODO(sanjeevr): Ideally we need to add a response from the external + // host saying whether it processed the accelerator + IPC_MESSAGE_ROUTED2(AutomationMsg_HandleAccelerator, int, MSG) + + // This message is sent by the container of an externally hosted tab to + // reflect any accelerator keys that it did not process. This gives the + // tab a chance to handle the keys + // Request: + // - int: handle of the tab + // -MSG: The keyboard message that the container did not handle + // Response: + // None expected + IPC_MESSAGE_ROUTED2(AutomationMsg_ProcessUnhandledAccelerator, int, MSG) +#endif // defined(OS_WIN) + + // Sent by the external tab to the host to notify that the user has tabbed + // out of the tab. + // Request: + // - int: Tab handle + // - bool: |reverse| set to true when shift-tabbing out of the tab, false + // otherwise. + // Response: + // None expected + IPC_MESSAGE_ROUTED2(AutomationMsg_TabbedOut, int, bool) + + // Sent by the external tab host to ask focus to be set to either the first + // or last element on the page. + // Request: + // - int: handle of the tab + // - bool: |reverse| + // true: Focus will be set to the last focusable element + // false: Focus will be set to the first focusable element + // - bool: |restore_focus_to_view| + // true: The renderer view associated with the current tab will be + // infomed that it is receiving focus. + // Response: + // None expected + IPC_MESSAGE_ROUTED3(AutomationMsg_SetInitialFocus, int, bool, bool) + + // This message is an outgoing message from Chrome to an external host. + // It is a request to open a url + // Request: + // -int: Tab handle + // -GURL: The URL to open + // -GURL: The referrer + // -int: The WindowOpenDisposition that specifies where the URL should + // be opened (new tab, new window etc). + // Response: + // None expected + IPC_MESSAGE_ROUTED4(AutomationMsg_OpenURL, int, GURL, GURL, int) + + // This message requests the provider to wait until the specified tab has + // finished restoring after session restore. + // Request: + // - int: handle of the tab + // Response: + // - bool: whether the operation was successful. + IPC_SYNC_MESSAGE_ROUTED1_0(AutomationMsg_WaitForTabToBeRestored, int) + + // This message is an outgoing message from Chrome to an external host. + // It is a notification that a navigation happened + // Request: + // -int: Tab handle + // + // Response: + // None expected + IPC_MESSAGE_ROUTED2(AutomationMsg_DidNavigate, int, IPC::NavigationInfo) + + // This message requests the different security states of the page displayed + // in the specified tab. + // Request: + // - int: handle of the tab + // Response: + // - bool: whether the operation was successful. + // - SecurityStyle: the security style of the tab. + // - int: the status of the server's ssl cert (0 means no errors or no ssl + // was used). + // - int: the insecure content state, 0 means no insecure contents. + + IPC_SYNC_MESSAGE_ROUTED1_4(AutomationMsg_GetSecurityState, + int, + bool, + SecurityStyle, + int, + int) + + // This message requests the page type of the page displayed in the specified + // tab (normal, error or interstitial). + // Request: + // - int: handle of the tab + // Response: + // - bool: whether the operation was successful. + // - PageType: the type of the page currently displayed. + IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_GetPageType, int, bool, + NavigationEntry::PageType) + + // This message simulates the user action on the SSL blocking page showing in + // the specified tab. This message is only effective if an interstitial page + // is showing in the tab. + // Request: + // - int: handle of the tab + // - bool: whether to proceed or abort the navigation + // Response: + // - AutomationMsg_NavigationResponseValues: result of the operation. + IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_ActionOnSSLBlockingPage, int, bool, + AutomationMsg_NavigationResponseValues) + + // Message to request that a browser window is brought to the front and + // activated. + // Request: + // - int: handle of the browser window. + // Response: + // - bool: True if the browser is brought to the front. + IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_BringBrowserToFront, int, bool) + + // Message to request whether a certain item is enabled of disabled in the + // menu in the browser window + // + // Request: + // - int: handle of the browser window. + // - int: IDC message identifier to query if enabled + // Response: + // - bool: True if the command is enabled on the menu + IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_IsMenuCommandEnabled, int, int, bool) + + // This message notifies the AutomationProvider to print the tab with given + // handle. The first parameter is the handle to the tab resource. The + // return value contains a bool which is true on success. + IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_PrintNow, int, bool) + + // This message notifies the AutomationProvider to reload the current page in + // the tab with given handle. The first parameter is the handle to the tab + // resource. The return value contains a status code which is nonnegative on + // success. + // see AutomationMsg_NavigationResponseValues for the navigation response. + IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_Reload, int, + AutomationMsg_NavigationResponseValues) + + // This message requests the handle (int64 app-unique identifier) of the + // last active browser window, or the browser at index 0 if there is no last + // active browser, or it no longer exists. Returns 0 if no browser windows + // exist. + IPC_SYNC_MESSAGE_ROUTED0_1(AutomationMsg_LastActiveBrowserWindow, int) + + // This message notifies the AutomationProvider to save the page with given + // handle. The first parameter is the handle to the tab resource. The second + // parameter is the main HTML file name. The third parameter is the directory + // for saving resources. The fourth parameter is the saving type: 0 for HTML + // only; 1 for complete web page. + // The return value contains a bool which is true on success. + IPC_SYNC_MESSAGE_ROUTED4_1(AutomationMsg_SavePage, int, FilePath, FilePath, + int, bool) + + // This message requests the text currently being displayed in the + // AutocompleteEdit. The parameter is the handle to the AutocompleteEdit. + // The return value is a string indicating the text in the AutocompleteEdit. + IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_AutocompleteEditGetText, + int /* autocomplete edit handle */, + bool /* the requested autocomplete edit exists */, + std::wstring /* omnibox text */) + + // This message sets the text being displayed in the AutocompleteEdit. The + // first parameter is the handle to the omnibox and the second parameter is + // the text to be displayed in the AutocompleteEdit. + // The return value has no parameters and is returned when the operation has + // completed. + IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_AutocompleteEditSetText, + int /* autocomplete edit handle */, + std::wstring /* text to set */, + bool /* the requested autocomplete edit exists */) + + // This message requests if a query to a autocomplete provider is still in + // progress. The first parameter in the request is the handle to the + // autocomplete edit. + // The first return value indicates if the request succeeded. + // The second return value indicates if a query is still in progress. + IPC_SYNC_MESSAGE_ROUTED1_2( \ + AutomationMsg_AutocompleteEditIsQueryInProgress, + int /* autocomplete edit handle*/, + bool /* the requested autocomplete edit exists */, + bool /* indicates if a query is in progress */) + + // This message requests a list of the autocomplete messages currently being + // displayed by the popup. The parameter in the request is a handle to the + // autocomplete edit. + // The first return value indicates if the request was successful, while + // while the second is the actual list of matches. + IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_AutocompleteEditGetMatches, + int /* autocomplete edit handle*/, + bool /* the requested autocomplete edit exists */, + std::vector /* matches */) + + // This message requests the execution of a browser command in the browser + // for which the handle is specified. + // The return value contains a boolean, whether the command was dispatched. + IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_WindowExecuteCommandAsync, + int /* automation handle */, + int /* browser command */, + bool /* success flag */) + + // This message requests the execution of a browser command in the browser + // for which the handle is specified. + // The return value contains a boolean, whether the command was dispatched + // and successful executed. + IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_WindowExecuteCommand, + int /* automation handle */, + int /* browser command */, + bool /* success flag */) + + + // This message opens the Find window within a tab corresponding to the + // supplied tab handle. + IPC_MESSAGE_ROUTED1(AutomationMsg_OpenFindInPage, + int /* tab_handle */) + + // Posts a message from external host to chrome renderer. + IPC_MESSAGE_ROUTED4(AutomationMsg_HandleMessageFromExternalHost, + int /* automation handle */, + std::string /* message */, + std::string /* origin */, + std::string /* target */) + + // A message for an external host. + IPC_MESSAGE_ROUTED4(AutomationMsg_ForwardMessageToExternalHost, + int, /* handle */ + std::string /* message */, + std::string /* origin */, + std::string /* target */) + + // This message starts a find within a tab corresponding to the supplied + // tab handle. The parameter |request| specifies what to search for. + // If an error occurs, |matches_found| will be -1. + // + IPC_SYNC_MESSAGE_ROUTED2_2(AutomationMsg_Find, + int /* tab_handle */, + AutomationMsg_Find_Params /* params */, + int /* active_ordinal */, + int /* matches_found */) + + // Is the Find window fully visible (and not animating) for the specified + // tab? + IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_FindWindowVisibility, + int /* tab_handle */, + bool /* is_visible */) + + // Where is the Find window located. |x| and |y| will be -1, -1 on failure. + IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_FindWindowLocation, + int /* tab_handle */, + int /* x */, + int /* y */) + + // Is the Bookmark bar visible? The return value will indicate whether it is + // visible or not and whether it is being animated into (or out of its place). + IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_BookmarkBarVisibility, + int /* browser_handle */, + bool, /* is_visible */ + bool /* still_animating */) + + // This message requests the number of related info bars opened. It + // returns -1 if an error occurred. + IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_GetInfoBarCount, + int /* tab_handle */, + int /* info bar count */) + + // This message triggers the action associated with the "accept" button in + // the info-bar at the specified index. If |wait for navigation| is true, it + // won't return until a navigation has occurred. + IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_ClickInfoBarAccept, + int /* tab_handle */, + int /* info bar index */, + bool /* wait for navigation */, + + /* navigation result */ + AutomationMsg_NavigationResponseValues) + + // This message retrieves the last time a navigation occurred in the specified + // tab. The value is intended to be used with WaitForNavigation. + IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_GetLastNavigationTime, + int /* tab_handle */, + int64 /* last navigation time */) + + // This messages is used to block until a new navigation occurs (if there is + // none more recent then the time specified). + IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_WaitForNavigation, + int /* tab_handle */, + int64 /* last navigation time */, + + /* navigation result */ + AutomationMsg_NavigationResponseValues) + + // This messages sets an int-value preference. + IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_SetIntPreference, + int /* browser handle */, + std::string /* pref name */, + int /* value */, + bool /* success */) + + // Queries whether an app modal dialog is currently being shown. (i.e. a + // javascript alert) and which buttons it contains. + IPC_SYNC_MESSAGE_ROUTED0_2(AutomationMsg_ShowingAppModalDialog, + bool /* showing dialog */, + int /* view::DelegateDialog::DialogButton */) + + // This message triggers the specified button for the currently showing + // modal dialog. + IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_ClickAppModalDialogButton, + int /* view::DelegateDialog::DialogButton */, + bool /* success */) + + // This messages sets a string-value preference. + IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_SetStringPreference, + int /* browser handle */, + std::string /* pref name */, + std::string /* pref value */, + bool) + + // This messages gets a boolean-value preference. + IPC_SYNC_MESSAGE_ROUTED2_2(AutomationMsg_GetBooleanPreference, + int /* browser handle */, + std::string /* pref name */, + bool /* success */, + bool /* pref value */) + + // This messages sets a boolean-value preference. + IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_SetBooleanPreference, + int /* browser handle */, + std::string /* pref name */, + bool /* pref value */, + bool /* success */) + + // Queries the current used encoding name of the page in the specified + // web content tab. + IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_GetPageCurrentEncoding, + int /* tab handle */, + std::string /* current used encoding name */) + + // Uses the specified encoding to override the encoding of the page in the + // specified web content tab. + IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_OverrideEncoding, + int /* tab handle */, + std::string /* overrided encoding name */, + bool /* success */) + + // Used to disable the dialog box that prompts the user for a path when + // saving a web page. + IPC_SYNC_MESSAGE_ROUTED1_0(AutomationMsg_SavePackageShouldPromptUser, + bool /* false if we want to not show the dialog */) + + // This message is an outgoing message from Chrome to an external host. + // It is a notification that a navigation failed + // Request: + // -int : Tab handle + // -int : The status code. + // -GURL: The URL we failed to navigate to. + // Response: + // None expected + IPC_MESSAGE_ROUTED3(AutomationMsg_NavigationFailed, int, int, GURL) + +#if defined(OS_WIN) + // This message is an outgoing message from an automation client to Chrome. + // It is used to reposition a chrome tab window. + IPC_MESSAGE_ROUTED2(AutomationMsg_TabReposition, + int /* tab handle */, + IPC::Reposition_Params /* SetWindowPos params */) +#endif // defined(OS_WIN) + + // Gets the title of the top level browser window. + IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_WindowTitle, + int /* automation handle */, + string16 /* title text */ ) + + // Tab load complete + IPC_MESSAGE_ROUTED2(AutomationMsg_TabLoaded, + int, // tab handle + GURL) + + // This message requests the tabstrip index of the tab with the given handle. + // The return value contains the index, which will be -1 on failure. + IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_TabIndex, int, int) + + // This message requests the handle (int64 app-unique identifier) of + // a valid normal browser window, i.e. normal type and non-incognito mode. + // On error, the returned handle value is 0. + IPC_SYNC_MESSAGE_ROUTED0_1(AutomationMsg_FindNormalBrowserWindow, int) + + // This message requests the number of normal browser windows, i.e. normal + // type and non-incognito mode that the app currently has open. The return + // value is the number of windows. + IPC_SYNC_MESSAGE_ROUTED0_1(AutomationMsg_NormalBrowserWindowCount, int) + + // Used to put the browser into "extension automation mode" for a given + // set of Chrome Extensions API functions for the current profile, or turn + // off automation mode. The specified tab is used as the conduit for all + // automated API functions. It must be an external tab (as in + // AutomationMsg_CreateExternalTab). + IPC_MESSAGE_ROUTED2(AutomationMsg_SetEnableExtensionAutomation, + // Tab handle. + int, + // Empty to disable automation, non-empty to enable + // automation of the specified API functions, single + // entry of "*" to enable automation of all API + // functions. + std::vector) + + // This message tells the browser to start using the new proxy configuration + // represented by the given JSON string. The parameters used in the JSON + // string are defined in automation_constants.h. + IPC_MESSAGE_ROUTED1(AutomationMsg_SetProxyConfig, + std::string /* proxy_config_json_string */) + + // Sets Download Shelf visibility for the specified browser. + IPC_SYNC_MESSAGE_ROUTED2_0(AutomationMsg_SetShelfVisibility, + int /* browser_handle */, + bool /* is_visible */) + + // This message requests the number of blocked popups in a certain tab with + // the given handle. The return value is the number of blocked popups, or -1 + // if this request failed. + IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_BlockedPopupCount, + int /* tab_handle */, + int /* blocked_popup_count */) + + // This message retrieves the locale of the browser process. On success + // |chrome_locale| will contain the locale as reported by ICU. On failure + // |chrome_locale| is the empty string. + IPC_SYNC_MESSAGE_ROUTED0_1(AutomationMsg_GetBrowserLocale, + string16 /* chrome_locale */) + +#if defined(OS_WIN) + IPC_MESSAGE_ROUTED4(AutomationMsg_ForwardContextMenuToExternalHost, + int /* tab_handle */, + HANDLE /* source menu handle */, + int /* align flags */, + IPC::MiniContextMenuParams /* params */) + + IPC_MESSAGE_ROUTED2(AutomationMsg_ForwardContextMenuCommandToChrome, + int /* tab_handle */, + int /* selected_command */) +#endif // OS_WIN + + // A URL request to be fetched via automation + IPC_MESSAGE_ROUTED3(AutomationMsg_RequestStart, + int /* tab_handle */, + int /* request_id */, + IPC::AutomationURLRequest /* request */) + + // Read data from a URL request to be fetched via automation + IPC_MESSAGE_ROUTED3(AutomationMsg_RequestRead, + int /* tab_handle */, + int /* request_id */, + int /* bytes_to_read */) + + // Response to a AutomationMsg_RequestStart message + IPC_MESSAGE_ROUTED3(AutomationMsg_RequestStarted, + int /* tab_handle */, + int /* request_id */, + IPC::AutomationURLResponse /* response */) + + // Data read via automation + IPC_MESSAGE_ROUTED3(AutomationMsg_RequestData, + int /* tab_handle */, + int /* request_id */, + std::string /* data */) + + IPC_MESSAGE_ROUTED3(AutomationMsg_RequestEnd, + int /* tab_handle */, + int /* request_id */, + URLRequestStatus /* status */) + + IPC_MESSAGE_ROUTED1(AutomationMsg_PrintAsync, + int /* tab_handle */) + + IPC_MESSAGE_ROUTED3(AutomationMsg_SetCookieAsync, + int /* tab_handle */, + GURL /* url */, + std::string /* cookie */) + + IPC_MESSAGE_ROUTED1(AutomationMsg_SelectAll, + int /* tab handle */) + + IPC_MESSAGE_ROUTED1(AutomationMsg_Cut, + int /* tab handle */) + + IPC_MESSAGE_ROUTED1(AutomationMsg_Copy, + int /* tab handle */) + + IPC_MESSAGE_ROUTED1(AutomationMsg_Paste, + int /* tab handle */) + + IPC_MESSAGE_ROUTED1(AutomationMsg_ReloadAsync, + int /* tab handle */) + + IPC_MESSAGE_ROUTED1(AutomationMsg_StopAsync, + int /* tab handle */) + + // Returns the number of times a filter was used to service an URL request. + // See AutomationMsg_SetFilteredInet. + IPC_SYNC_MESSAGE_ROUTED0_1(AutomationMsg_GetFilteredInetHitCount, + int /* hit_count */) + + // Is the browser in fullscreen mode? + IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_IsFullscreen, + int /* browser_handle */, + bool /* is_fullscreen */) + + // Is the fullscreen bubble visible? + IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_IsFullscreenBubbleVisible, + int /* browser_handle */, + bool /* is_visible */) + +#if defined(OS_POSIX) + // See previous definition of this message for explanation of why it is + // defined twice. + IPC_MESSAGE_ROUTED3(AutomationMsg_WindowClick, int, gfx::Point, int) +#endif + + // This message notifies the AutomationProvider to navigate to a specified + // url in the tab with given handle. The first parameter is the handle to + // the tab resource. The second parameter is the target url. The third + // parameter is the number of navigations that are required for a successful + // return value. See AutomationMsg_NavigationResponseValues for the return + // value. + IPC_SYNC_MESSAGE_ROUTED3_1( + AutomationMsg_NavigateToURLBlockUntilNavigationsComplete, int, GURL, int, + AutomationMsg_NavigationResponseValues) + + // This message notifies the AutomationProvider to navigate to a specified + // navigation entry index in the external tab with given handle. The first + // parameter is the handle to the tab resource. The second parameter is the + // index of navigation entry. + // The return value contains a status code which is nonnegative on success. + // see AutomationMsg_NavigationResponseValues for the navigation response. + IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_NavigateExternalTabAtIndex, int, int, + AutomationMsg_NavigationResponseValues) + + // This message requests the provider to wait until the window count + // reached the specified value. + // Request: + // - int: target browser window count + // Response: + // - bool: whether the operation was successful. + IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_WaitForBrowserWindowCountToBecome, + int, bool) + + // This message requests the provider to wait until an application modal + // dialog is shown. + // Response: + // - bool: whether the operation was successful + IPC_SYNC_MESSAGE_ROUTED0_1(AutomationMsg_WaitForAppModalDialogToBeShown, bool) + + // This message notifies the AutomationProvider to navigate back in session + // history in the tab with given handle. The first parameter is the handle + // to the tab resource. The second parameter is the number of navigations the + // provider will wait for. + // See AutomationMsg_NavigationResponseValues for the navigation response + // values. + IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_GoBackBlockUntilNavigationsComplete, + int, int, + AutomationMsg_NavigationResponseValues) + + // This message notifies the AutomationProvider to navigate forward in session + // history in the tab with given handle. The first parameter is the handle + // to the tab resource. The second parameter is the number of navigations + // the provider will wait for. + // See AutomationMsg_NavigationResponseValues for the navigation response + // values. + IPC_SYNC_MESSAGE_ROUTED2_1( + AutomationMsg_GoForwardBlockUntilNavigationsComplete, int, int, + AutomationMsg_NavigationResponseValues) + + // This message is used by automation clients to upload histogram data to the + // browser process. + IPC_MESSAGE_ROUTED1(AutomationMsg_RecordHistograms, + std::vector /* histogram_list */) + + IPC_MESSAGE_ROUTED2(AutomationMsg_AttachExternalTab, + int /* 'source' tab_handle */, + IPC::AttachExternalTabParams) + + // Sent when the automation client connects to an existing tab. + IPC_SYNC_MESSAGE_ROUTED3_4(AutomationMsg_ConnectExternalTab, + uint64 /* cookie */, + bool /* allow/block tab*/, + gfx::NativeWindow /* parent window */, + gfx::NativeWindow /* Tab container window */, + gfx::NativeWindow /* Tab window */, + int /* Handle to the new tab */, + int /* Session Id of the new tab */) + +#if defined(OS_POSIX) + // TODO(estade): this should be merged with the windows message of the same + // name. See comment for WindowClick. + IPC_SYNC_MESSAGE_ROUTED4_1(AutomationMsg_WindowDrag, + int, std::vector, int, bool, bool) +#endif // defined(OS_POSIX) + + // This message gets the bounds of the window. + // Request: + // int - the handle of the window to query + // Response: + // gfx::Rect - the bounds of the window + // bool - true if the query was successful + IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_GetWindowBounds, int, gfx::Rect, + bool) + + // Simulate an end of session. Normally this happens when the user + // shuts down the machine or logs off. + // Request: + // int - the handle of the browser + // Response: + // bool - true if succesful + IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_TerminateSession, int, bool) + + // Returns whether the window is maximized. + // Request: + // int - the handle of the window + // Response: + // bool - true if the window is maximized + // bool - true if query is successful + IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_IsWindowMaximized, int, bool, bool) + + IPC_MESSAGE_ROUTED2(AutomationMsg_SetPageFontSize, + int /* tab_handle */, + int /* The font size */) + + // Returns a metric event duration that was last recorded. Returns -1 if the + // event hasn't occurred yet. + IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_GetMetricEventDuration, + std::string /* event_name */, + int /* duration ms */) + + // Sent by automation provider - go to history entry via automation. + IPC_MESSAGE_ROUTED2(AutomationMsg_RequestGoToHistoryEntryOffset, + int, // tab handle + int) // numbers of entries (negative or positive) + + // Silently install the extension in the given crx file. + IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_InstallExtension, + FilePath /* full path to crx file */, + AutomationMsg_ExtensionResponseValues) + + // Silently load the extension in the given directory. This expects an + // extension expanded into the directory, not a crx file. + IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_LoadExpandedExtension, + FilePath /* root directory of extension */, + AutomationMsg_ExtensionResponseValues) + + // Retrieves a list of the root directories of all enabled extensions + // that have been installed into Chrome by dropping a .crx file onto + // Chrome or an equivalent action (including loaded extensions). + // Other types of extensions are not included on the list (e.g. "component" + // or "external" extensions) since they are generally not useful for testing + // (e.g. an external extension could mess with an automated test if it's + // present on some systems only). + IPC_SYNC_MESSAGE_ROUTED0_1(AutomationMsg_GetEnabledExtensions, + std::vector) + + // This message requests the type of the window with the given handle. The + // return value contains the type (Browser::Type), or -1 if the request + // failed. + IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_Type, int, int) + + // Opens a new browser window of a specific type. + IPC_SYNC_MESSAGE_ROUTED2_0(AutomationMsg_OpenNewBrowserWindowOfType, + int /* Type (Browser::Type) */, + bool /* show */ ) + + // This message requests that the mouse be moved to this location, in + // window coordinate space. + // Request: + // int - the handle of the window that's the context for this click + // gfx::Point - the location to move to + IPC_MESSAGE_ROUTED2(AutomationMsg_WindowMouseMove, int, gfx::Point) + + // Called when requests should be downloaded using a host browser's + // download mechanism when chrome is being embedded. + IPC_MESSAGE_ROUTED2(AutomationMsg_DownloadRequestInHost, + int /* tab_handle */, + int /* request_id */) + + // Shuts down the session service for the browser identified by + // |browser_handle|. On success |result| is set to true. + IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_ShutdownSessionService, + int /* browser_handle */, + bool /* result */) + + IPC_MESSAGE_ROUTED1(AutomationMsg_SaveAsAsync, + int /* tab handle */) + +#if defined(OS_WIN) + // An incoming message from an automation host to Chrome. Signals that + // the browser containing |tab_handle| has moved. + IPC_MESSAGE_ROUTED1(AutomationMsg_BrowserMove, + int /* tab handle */) +#endif + + // Used to get cookies for the given URL. + IPC_MESSAGE_ROUTED3(AutomationMsg_GetCookiesFromHost, + int /* tab_handle */, + GURL /* url */, + int /* opaque_cookie_id */) + + IPC_MESSAGE_ROUTED5(AutomationMsg_GetCookiesHostResponse, + int /* tab_handle */, + bool /* success */, + GURL /* url */, + std::string /* cookies */, + int /* opaque_cookie_id */) + + // If the given host is empty, then the default content settings are + // modified. + IPC_SYNC_MESSAGE_ROUTED4_1(AutomationMsg_SetContentSetting, + int /* browser handle */, + std::string /* host */, + ContentSettingsType /* content type */, + ContentSetting /* setting */, + bool /* success */) + +#if defined(OS_CHROMEOS) + // Logs in through the browser's login wizard if available. + IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_LoginWithUserAndPass, + std::string /* username*/, + std::string /* password*/, + bool /* Whether successful*/) +#endif + + // Return the bookmarks encoded as a JSON string. + IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_GetBookmarksAsJSON, + int /* browser_handle */, + std::string /* bookmarks as a JSON string */, + bool /* success */) + + // Wait for the bookmark model to load. + IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_WaitForBookmarkModelToLoad, + int /* browser_handle */, + bool /* success */) + + // Bookmark addition, modification, and removal. + // Bookmarks are indexed by their id. + IPC_SYNC_MESSAGE_ROUTED4_1(AutomationMsg_AddBookmarkGroup, + int /* browser_handle */, + int64 /* parent_id */, + int /* index */, + std::wstring /* title */, + bool /* success */) + IPC_SYNC_MESSAGE_ROUTED5_1(AutomationMsg_AddBookmarkURL, + int /* browser_handle */, + int64 /* parent_id */, + int /* index */, + std::wstring /* title */, + GURL /* url */, + bool /* success */) + IPC_SYNC_MESSAGE_ROUTED4_1(AutomationMsg_ReparentBookmark, + int /* browser_handle */, + int64 /* id */, + int64 /* new_parent_id */, + int /* index */, + bool /* success */) + IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_SetBookmarkTitle, + int /* browser_handle */, + int64 /* id */, + std::wstring /* title */, + bool /* success */) + IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_SetBookmarkURL, + int /* browser_handle */, + int64 /* id */, + GURL /* url */, + bool /* success */) + IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_RemoveBookmark, + int /* browser_handle */, + int64 /* id */, + bool /* success */) + + // This message informs the browser process to remove the history entries + // for the specified types across all time ranges. See + // browsing_data_remover.h for a list of REMOVE_* types supported in the + // remove_mask parameter. + IPC_MESSAGE_ROUTED1(AutomationMsg_RemoveBrowsingData, int) + + // Block until the focused view id changes to something other than + // |previous_view_id|. + IPC_SYNC_MESSAGE_ROUTED2_2(AutomationMsg_WaitForFocusedViewIDToChange, + int /* window handle */, + int /* previous_view_id */, + bool /* success */, + int /* new_view_id */) + + // To avoid race conditions, waiting until a popup menu opens is a + // three-step process: + // 1. Call StartTrackingPopupMenus. + // 2. Call an automation method that results in opening the popup menu. + // 3. Call WaitForPopupMenuToOpen and check for success. + IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_StartTrackingPopupMenus, + int /* browser handle */, + bool /* success */) + IPC_SYNC_MESSAGE_ROUTED0_1(AutomationMsg_WaitForPopupMenuToOpen, + bool /* success */) + + // Generic pyauto pattern to help avoid future addition of + // automation messages. + IPC_SYNC_MESSAGE_ROUTED2_2(AutomationMsg_SendJSONRequest, + int /* browser_handle */, + std::string /* JSON request */, + std::string /* JSON response */, + bool /* success */) + + // Installs an extension from the crx file and returns its id. + // On error, |extension handle| will be 0. + IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_InstallExtensionAndGetHandle, + FilePath /* full path to crx file */, + bool /* with UI */, + int /* extension handle */) + + // Waits for the next extension test result. Sets |test result| as the + // received result and |message| as any accompanying message with the + // result, which could be the empty string. + IPC_SYNC_MESSAGE_ROUTED0_2(AutomationMsg_WaitForExtensionTestResult, + bool /* test result */, + std::string /* message */) + + // Uninstalls an extension. On success |success| is true. + IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_UninstallExtension, + int /* extension handle */, + bool /* success */) + + // Enables an extension. On success |success| is true. + IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_EnableExtension, + int /* extension handle */, + bool /* success */) + + // Disables an extension. On success |success| is true. + IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_DisableExtension, + int /* extension handle */, + bool /* success */) + + // Executes the action associated with the given extension. This executes + // the extension's page or browser action in the given browser, but does + // not open popups. On success |success| is true. + IPC_SYNC_MESSAGE_ROUTED2_1( + AutomationMsg_ExecuteExtensionActionInActiveTabAsync, + int /* extension handle */, + int /* browser handle */, + bool /* success */) + + // Moves the browser action to the given index in the browser action toolbar. + // On success |success| is true. + IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_MoveExtensionBrowserAction, + int /* extension handle */, + int /* index */, + bool /* success */) + + // Gets an extension property |property type|. On success |success| is true, + // and |property value| is set. + IPC_SYNC_MESSAGE_ROUTED2_2(AutomationMsg_GetExtensionProperty, + int /* extension handle */, + AutomationMsg_ExtensionProperty /* property type */, + bool /* success */, + std::string /* property value */) + + // Resets to the default theme. + IPC_SYNC_MESSAGE_ROUTED0_0(AutomationMsg_ResetToDefaultTheme) + + // Navigates asynchronously to a URL with a certain disposition, + // like in a new tab. + IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_NavigationAsyncWithDisposition, + int /* tab handle */, + GURL, + WindowOpenDisposition, + bool /* result */) + + + // This message requests the cookie be deleted for given url in the + // profile of the tab identified by the first parameter. The second + // parameter is the cookie name. + IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_DeleteCookie, GURL, std::string, + int /* tab handle */, + bool /* result */) + + // This message triggers the collected cookies dialog for a specific tab. + IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_ShowCollectedCookiesDialog, + int /* tab handle */, + bool /* result */) + + // This message requests the external tab identified by the tab handle + // passed in be closed. + // Request: + // -int: Tab handle + // Response: + // None expected + IPC_MESSAGE_ROUTED1(AutomationMsg_CloseExternalTab, int) + + // This message requests that the external tab identified by the tab handle + // runs unload handlers if any on the current page. + // Request: + // -int: Tab handle + // -bool: result: true->unload, false->don't unload + IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_RunUnloadHandlers, int, bool) + + // This message sets the current zoom level on the tab + // Request: + // -int: Tab handle + // -int: Zoom level. Values ZOOM_OUT = -1, RESET = 0, ZOOM_IN = 1 + // Response: + // None expected + IPC_MESSAGE_ROUTED2(AutomationMsg_SetZoomLevel, int, int) + + // Waits for tab count to reach target value. + IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_WaitForTabCountToBecome, + int /* browser handle */, + int /* target tab count */, + bool /* success */) + + // Waits for the infobar count to reach given number. + IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_WaitForInfoBarCount, + int /* tab handle */, + int /* target count */, + bool /* success */) + + // Waits for the autocomplete edit to receive focus. + IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_WaitForAutocompleteEditFocus, + int /* autocomplete edit handle */, + bool /* success */) + + // Loads all blocked plug-ins on the page. + IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_LoadBlockedPlugins, + int /* tab handle */, + bool /* success */) + +IPC_END_MESSAGES(Automation) diff --git a/chrome/test/automation/autocomplete_edit_proxy.cc b/chrome/test/automation/autocomplete_edit_proxy.cc index 5bfd13c..184239a 100644 --- a/chrome/test/automation/autocomplete_edit_proxy.cc +++ b/chrome/test/automation/autocomplete_edit_proxy.cc @@ -6,8 +6,8 @@ #include -#include "chrome/test/automation/automation_constants.h" -#include "chrome/test/automation/automation_messages.h" +#include "chrome/common/automation_constants.h" +#include "chrome/common/automation_messages.h" #include "chrome/test/automation/automation_proxy.h" using base::TimeDelta; diff --git a/chrome/test/automation/automation_constants.h b/chrome/test/automation/automation_constants.h deleted file mode 100644 index f34c0f2..0000000 --- a/chrome/test/automation/automation_constants.h +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef CHROME_TEST_AUTOMATION_AUTOMATION_CONSTANTS_H_ -#define CHROME_TEST_AUTOMATION_AUTOMATION_CONSTANTS_H_ -#pragma once - -namespace automation { -// Amount of time to wait before querying the browser. -static const int kSleepTime = 250; -} - -// Used by AutomationProxy, declared here so that other headers don't need -// to include automation_proxy.h. -enum AutomationLaunchResult { - AUTOMATION_LAUNCH_RESULT_INVALID = -1, - AUTOMATION_SUCCESS, - AUTOMATION_TIMEOUT, - AUTOMATION_VERSION_MISMATCH, - AUTOMATION_CREATE_TAB_FAILED, - AUTOMATION_SERVER_CRASHED, -}; - -enum AutomationMsg_NavigationResponseValues { - AUTOMATION_MSG_NAVIGATION_ERROR = 0, - AUTOMATION_MSG_NAVIGATION_SUCCESS, - AUTOMATION_MSG_NAVIGATION_AUTH_NEEDED, -}; - -enum AutomationMsg_ExtensionResponseValues { - AUTOMATION_MSG_EXTENSION_INSTALL_SUCCEEDED = 0, - AUTOMATION_MSG_EXTENSION_INSTALL_FAILED -}; - -// Used in the AutomationMsg_GetExtensionProperty to identify which extension -// property should be retrieved, instead of having separate messages for each -// property. -enum AutomationMsg_ExtensionProperty { - AUTOMATION_MSG_EXTENSION_ID = 0, - AUTOMATION_MSG_EXTENSION_NAME, - AUTOMATION_MSG_EXTENSION_VERSION, - AUTOMATION_MSG_EXTENSION_BROWSER_ACTION_INDEX, -}; - -#endif // CHROME_TEST_AUTOMATION_AUTOMATION_CONSTANTS_H_ diff --git a/chrome/test/automation/automation_handle_tracker.cc b/chrome/test/automation/automation_handle_tracker.cc index ab29c2a..b5613a5 100644 --- a/chrome/test/automation/automation_handle_tracker.cc +++ b/chrome/test/automation/automation_handle_tracker.cc @@ -4,7 +4,7 @@ #include "chrome/test/automation/automation_handle_tracker.h" -#include "chrome/test/automation/automation_messages.h" +#include "chrome/common/automation_messages.h" #include "chrome/test/automation/automation_proxy.h" AutomationResourceProxy::AutomationResourceProxy( diff --git a/chrome/test/automation/automation_messages.cc b/chrome/test/automation/automation_messages.cc deleted file mode 100644 index 8c26327..0000000 --- a/chrome/test/automation/automation_messages.cc +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) 2010 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/test/automation/automation_messages.h" - -#define MESSAGES_INTERNAL_IMPL_FILE \ - "chrome/test/automation/automation_messages_internal.h" -#include "ipc/ipc_message_impl_macros.h" diff --git a/chrome/test/automation/automation_messages.h b/chrome/test/automation/automation_messages.h deleted file mode 100644 index afaa87f..0000000 --- a/chrome/test/automation/automation_messages.h +++ /dev/null @@ -1,645 +0,0 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef CHROME_TEST_AUTOMATION_AUTOMATION_MESSAGES_H__ -#define CHROME_TEST_AUTOMATION_AUTOMATION_MESSAGES_H__ -#pragma once - -#include - -#include "base/basictypes.h" -#include "chrome/browser/tab_contents/navigation_entry.h" -#include "chrome/browser/tab_contents/security_style.h" -#include "chrome/common/common_param_traits.h" -#include "chrome/test/automation/automation_constants.h" -#include "gfx/rect.h" -#include "net/base/upload_data.h" - - -struct AutomationMsg_Find_Params { - // Unused value, which exists only for backwards compat. - int unused; - - // The word(s) to find on the page. - string16 search_string; - - // Whether to search forward or backward within the page. - bool forward; - - // Whether search should be Case sensitive. - bool match_case; - - // Whether this operation is first request (Find) or a follow-up (FindNext). - bool find_next; -}; - -namespace IPC { - -template <> -struct ParamTraits { - typedef AutomationMsg_Find_Params param_type; - static void Write(Message* m, const param_type& p) { - WriteParam(m, p.unused); - WriteParam(m, p.search_string); - WriteParam(m, p.forward); - WriteParam(m, p.match_case); - WriteParam(m, p.find_next); - } - static bool Read(const Message* m, void** iter, param_type* p) { - return - ReadParam(m, iter, &p->unused) && - ReadParam(m, iter, &p->search_string) && - ReadParam(m, iter, &p->forward) && - ReadParam(m, iter, &p->match_case) && - ReadParam(m, iter, &p->find_next); - } - static void Log(const param_type& p, std::string* l) { - l->append(""); - } -}; - -template <> -struct ParamTraits { - typedef AutomationMsg_NavigationResponseValues param_type; - static void Write(Message* m, const param_type& p) { - m->WriteInt(p); - } - static bool Read(const Message* m, void** iter, param_type* p) { - int type; - if (!m->ReadInt(iter, &type)) - return false; - *p = static_cast(type); - return true; - } - static void Log(const param_type& p, std::string* l) { - std::string control; - switch (p) { - case AUTOMATION_MSG_NAVIGATION_ERROR: - control = "AUTOMATION_MSG_NAVIGATION_ERROR"; - break; - case AUTOMATION_MSG_NAVIGATION_SUCCESS: - control = "AUTOMATION_MSG_NAVIGATION_SUCCESS"; - break; - case AUTOMATION_MSG_NAVIGATION_AUTH_NEEDED: - control = "AUTOMATION_MSG_NAVIGATION_AUTH_NEEDED"; - break; - default: - control = "UNKNOWN"; - break; - } - - LogParam(control, l); - } -}; - -template <> -struct ParamTraits { - typedef AutomationMsg_ExtensionResponseValues param_type; - static void Write(Message* m, const param_type& p) { - m->WriteInt(p); - } - static bool Read(const Message* m, void** iter, param_type* p) { - int type; - if (!m->ReadInt(iter, &type)) - return false; - *p = static_cast(type); - return true; - } - static void Log(const param_type& p, std::string* l) { - std::string control; - switch (p) { - case AUTOMATION_MSG_EXTENSION_INSTALL_SUCCEEDED: - control = "AUTOMATION_MSG_EXTENSION_INSTALL_SUCCEEDED"; - break; - case AUTOMATION_MSG_EXTENSION_INSTALL_FAILED: - control = "AUTOMATION_MSG_EXTENSION_INSTALL_FAILED"; - break; - default: - control = "UNKNOWN"; - break; - } - - LogParam(control, l); - } -}; - -template <> -struct ParamTraits { - typedef AutomationMsg_ExtensionProperty param_type; - static void Write(Message* m, const param_type& p) { - m->WriteInt(p); - } - static bool Read(const Message* m, void** iter, param_type* p) { - int type; - if (!m->ReadInt(iter, &type)) - return false; - *p = static_cast(type); - return true; - } - static void Log(const param_type& p, std::string* l) { - std::string control; - switch (p) { - case AUTOMATION_MSG_EXTENSION_ID: - control = "AUTOMATION_MSG_EXTENSION_ID"; - break; - case AUTOMATION_MSG_EXTENSION_NAME: - control = "AUTOMATION_MSG_EXTENSION_NAME"; - break; - case AUTOMATION_MSG_EXTENSION_VERSION: - control = "AUTOMATION_MSG_EXTENSION_VERSION"; - break; - case AUTOMATION_MSG_EXTENSION_BROWSER_ACTION_INDEX: - control = "AUTOMATION_MSG_EXTENSION_BROWSER_ACTION_INDEX"; - break; - default: - control = "UNKNOWN"; - break; - } - - LogParam(control, l); - } -}; - -template <> -struct ParamTraits { - typedef SecurityStyle param_type; - static void Write(Message* m, const param_type& p) { - m->WriteInt(p); - } - static bool Read(const Message* m, void** iter, param_type* p) { - int type; - if (!m->ReadInt(iter, &type)) - return false; - *p = static_cast(type); - return true; - } - static void Log(const param_type& p, std::string* l) { - std::string control; - switch (p) { - case SECURITY_STYLE_UNKNOWN: - control = "SECURITY_STYLE_UNKNOWN"; - break; - case SECURITY_STYLE_UNAUTHENTICATED: - control = "SECURITY_STYLE_UNAUTHENTICATED"; - break; - case SECURITY_STYLE_AUTHENTICATION_BROKEN: - control = "SECURITY_STYLE_AUTHENTICATION_BROKEN"; - break; - case SECURITY_STYLE_AUTHENTICATED: - control = "SECURITY_STYLE_AUTHENTICATED"; - break; - default: - control = "UNKNOWN"; - break; - } - - LogParam(control, l); - } -}; - -template <> -struct ParamTraits { - typedef NavigationEntry::PageType param_type; - static void Write(Message* m, const param_type& p) { - m->WriteInt(p); - } - static bool Read(const Message* m, void** iter, param_type* p) { - int type; - if (!m->ReadInt(iter, &type)) - return false; - *p = static_cast(type); - return true; - } - static void Log(const param_type& p, std::string* l) { - std::string control; - switch (p) { - case NavigationEntry::NORMAL_PAGE: - control = "NORMAL_PAGE"; - break; - case NavigationEntry::ERROR_PAGE: - control = "ERROR_PAGE"; - break; - case NavigationEntry::INTERSTITIAL_PAGE: - control = "INTERSTITIAL_PAGE"; - break; - default: - control = "UNKNOWN"; - break; - } - - LogParam(control, l); - } -}; - -#if defined(OS_WIN) -struct Reposition_Params { - HWND window; - HWND window_insert_after; - int left; - int top; - int width; - int height; - int flags; - bool set_parent; - HWND parent_window; -}; - -// Traits for SetWindowPos_Params structure to pack/unpack. -template <> -struct ParamTraits { - typedef Reposition_Params param_type; - static void Write(Message* m, const param_type& p) { - WriteParam(m, p.window); - WriteParam(m, p.window_insert_after); - WriteParam(m, p.left); - WriteParam(m, p.top); - WriteParam(m, p.width); - WriteParam(m, p.height); - WriteParam(m, p.flags); - WriteParam(m, p.set_parent); - WriteParam(m, p.parent_window); - } - static bool Read(const Message* m, void** iter, param_type* p) { - return ReadParam(m, iter, &p->window) && - ReadParam(m, iter, &p->window_insert_after) && - ReadParam(m, iter, &p->left) && - ReadParam(m, iter, &p->top) && - ReadParam(m, iter, &p->width) && - ReadParam(m, iter, &p->height) && - ReadParam(m, iter, &p->flags) && - ReadParam(m, iter, &p->set_parent) && - ReadParam(m, iter, &p->parent_window); - } - static void Log(const param_type& p, std::string* l) { - l->append("("); - LogParam(p.window, l); - l->append(", "); - LogParam(p.window_insert_after, l); - l->append(", "); - LogParam(p.left, l); - l->append(", "); - LogParam(p.top, l); - l->append(", "); - LogParam(p.width, l); - l->append(", "); - LogParam(p.height, l); - l->append(", "); - LogParam(p.flags, l); - l->append(", "); - LogParam(p.set_parent, l); - l->append(", "); - LogParam(p.parent_window, l); - l->append(")"); - } -}; -#endif // defined(OS_WIN) - -struct AutomationURLRequest { - std::string url; - std::string method; - std::string referrer; - std::string extra_request_headers; - scoped_refptr upload_data; - int resource_type; // see webkit/glue/resource_type.h - int load_flags; // see net/base/load_flags.h -}; - -// Traits for AutomationURLRequest structure to pack/unpack. -template <> -struct ParamTraits { - typedef AutomationURLRequest param_type; - static void Write(Message* m, const param_type& p) { - WriteParam(m, p.url); - WriteParam(m, p.method); - WriteParam(m, p.referrer); - WriteParam(m, p.extra_request_headers); - WriteParam(m, p.upload_data); - WriteParam(m, p.resource_type); - WriteParam(m, p.load_flags); - } - static bool Read(const Message* m, void** iter, param_type* p) { - return ReadParam(m, iter, &p->url) && - ReadParam(m, iter, &p->method) && - ReadParam(m, iter, &p->referrer) && - ReadParam(m, iter, &p->extra_request_headers) && - ReadParam(m, iter, &p->upload_data) && - ReadParam(m, iter, &p->resource_type) && - ReadParam(m, iter, &p->load_flags); - } - static void Log(const param_type& p, std::string* l) { - l->append("("); - LogParam(p.url, l); - l->append(", "); - LogParam(p.method, l); - l->append(", "); - LogParam(p.referrer, l); - l->append(", "); - LogParam(p.extra_request_headers, l); - l->append(", "); - LogParam(p.upload_data, l); - l->append(", "); - LogParam(p.resource_type, l); - l->append(", "); - LogParam(p.load_flags, l); - l->append(")"); - } -}; - -struct AutomationURLResponse { - std::string mime_type; - std::string headers; - int64 content_length; - base::Time last_modified; - std::string redirect_url; - int redirect_status; -}; - -// Traits for AutomationURLResponse structure to pack/unpack. -template <> -struct ParamTraits { - typedef AutomationURLResponse param_type; - static void Write(Message* m, const param_type& p) { - WriteParam(m, p.mime_type); - WriteParam(m, p.headers); - WriteParam(m, p.content_length); - WriteParam(m, p.last_modified); - WriteParam(m, p.redirect_url); - WriteParam(m, p.redirect_status); - } - static bool Read(const Message* m, void** iter, param_type* p) { - return ReadParam(m, iter, &p->mime_type) && - ReadParam(m, iter, &p->headers) && - ReadParam(m, iter, &p->content_length) && - ReadParam(m, iter, &p->last_modified) && - ReadParam(m, iter, &p->redirect_url) && - ReadParam(m, iter, &p->redirect_status); - } - static void Log(const param_type& p, std::string* l) { - l->append("("); - LogParam(p.mime_type, l); - l->append(", "); - LogParam(p.headers, l); - l->append(", "); - LogParam(p.content_length, l); - l->append(", "); - LogParam(p.last_modified, l); - l->append(", "); - LogParam(p.redirect_url, l); - l->append(", "); - LogParam(p.redirect_status, l); - l->append(")"); - } -}; - -struct ExternalTabSettings { - gfx::NativeWindow parent; - gfx::Rect dimensions; - unsigned int style; - bool is_off_the_record; - bool load_requests_via_automation; - bool handle_top_level_requests; - GURL initial_url; - GURL referrer; - bool infobars_enabled; - bool route_all_top_level_navigations; -}; - -// Traits for ExternalTabSettings structure to pack/unpack. -template <> -struct ParamTraits { - typedef ExternalTabSettings param_type; - static void Write(Message* m, const param_type& p) { - WriteParam(m, p.parent); - WriteParam(m, p.dimensions); - WriteParam(m, p.style); - WriteParam(m, p.is_off_the_record); - WriteParam(m, p.load_requests_via_automation); - WriteParam(m, p.handle_top_level_requests); - WriteParam(m, p.initial_url); - WriteParam(m, p.referrer); - WriteParam(m, p.infobars_enabled); - WriteParam(m, p.route_all_top_level_navigations); - } - static bool Read(const Message* m, void** iter, param_type* p) { - return ReadParam(m, iter, &p->parent) && - ReadParam(m, iter, &p->dimensions) && - ReadParam(m, iter, &p->style) && - ReadParam(m, iter, &p->is_off_the_record) && - ReadParam(m, iter, &p->load_requests_via_automation) && - ReadParam(m, iter, &p->handle_top_level_requests) && - ReadParam(m, iter, &p->initial_url) && - ReadParam(m, iter, &p->referrer) && - ReadParam(m, iter, &p->infobars_enabled) && - ReadParam(m, iter, &p->route_all_top_level_navigations); - } - static void Log(const param_type& p, std::string* l) { - l->append("("); - LogParam(p.parent, l); - l->append(", "); - LogParam(p.dimensions, l); - l->append(", "); - LogParam(p.style, l); - l->append(", "); - LogParam(p.is_off_the_record, l); - l->append(", "); - LogParam(p.load_requests_via_automation, l); - l->append(", "); - LogParam(p.handle_top_level_requests, l); - l->append(", "); - LogParam(p.initial_url, l); - l->append(", "); - LogParam(p.referrer, l); - l->append(", "); - LogParam(p.infobars_enabled, l); - l->append(", "); - LogParam(p.route_all_top_level_navigations, l); - l->append(")"); - } -}; - -struct NavigationInfo { - int navigation_type; - int relative_offset; - int navigation_index; - std::wstring title; - GURL url; - GURL referrer; - SecurityStyle security_style; - bool displayed_insecure_content; - bool ran_insecure_content; -}; - -// Traits for NavigationInfo structure to pack/unpack. -template <> -struct ParamTraits { - typedef NavigationInfo param_type; - static void Write(Message* m, const param_type& p) { - WriteParam(m, p.navigation_type); - WriteParam(m, p.relative_offset); - WriteParam(m, p.navigation_index); - WriteParam(m, p.title); - WriteParam(m, p.url); - WriteParam(m, p.referrer); - WriteParam(m, p.security_style); - WriteParam(m, p.displayed_insecure_content); - WriteParam(m, p.ran_insecure_content); - } - static bool Read(const Message* m, void** iter, param_type* p) { - return ReadParam(m, iter, &p->navigation_type) && - ReadParam(m, iter, &p->relative_offset) && - ReadParam(m, iter, &p->navigation_index) && - ReadParam(m, iter, &p->title) && - ReadParam(m, iter, &p->url) && - ReadParam(m, iter, &p->referrer) && - ReadParam(m, iter, &p->security_style) && - ReadParam(m, iter, &p->displayed_insecure_content) && - ReadParam(m, iter, &p->ran_insecure_content); - } - static void Log(const param_type& p, std::string* l) { - l->append("("); - LogParam(p.navigation_type, l); - l->append(", "); - LogParam(p.relative_offset, l); - l->append(", "); - LogParam(p.navigation_index, l); - l->append(", "); - LogParam(p.title, l); - l->append(", "); - LogParam(p.url, l); - l->append(", "); - LogParam(p.referrer, l); - l->append(", "); - LogParam(p.security_style, l); - l->append(", "); - LogParam(p.displayed_insecure_content, l); - l->append(", "); - LogParam(p.ran_insecure_content, l); - l->append(")"); - } -}; - -// A stripped down version of ContextMenuParams in webkit/glue/context_menu.h. -struct MiniContextMenuParams { - // The x coordinate for displaying the menu. - int screen_x; - - // The y coordinate for displaying the menu. - int screen_y; - - // This is the URL of the link that encloses the node the context menu was - // invoked on. - GURL link_url; - - // The link URL to be used ONLY for "copy link address". We don't validate - // this field in the frontend process. - GURL unfiltered_link_url; - - // This is the source URL for the element that the context menu was - // invoked on. Example of elements with source URLs are img, audio, and - // video. - GURL src_url; - - // This is the URL of the top level page that the context menu was invoked - // on. - GURL page_url; - - // This is the URL of the subframe that the context menu was invoked on. - GURL frame_url; -}; - -// Traits for ContextMenuParams structure to pack/unpack. -template <> -struct ParamTraits { - typedef MiniContextMenuParams param_type; - static void Write(Message* m, const param_type& p) { - WriteParam(m, p.screen_x); - WriteParam(m, p.screen_y); - WriteParam(m, p.link_url); - WriteParam(m, p.unfiltered_link_url); - WriteParam(m, p.src_url); - WriteParam(m, p.page_url); - WriteParam(m, p.frame_url); - } - static bool Read(const Message* m, void** iter, param_type* p) { - return ReadParam(m, iter, &p->screen_x) && - ReadParam(m, iter, &p->screen_y) && - ReadParam(m, iter, &p->link_url) && - ReadParam(m, iter, &p->unfiltered_link_url) && - ReadParam(m, iter, &p->src_url) && - ReadParam(m, iter, &p->page_url) && - ReadParam(m, iter, &p->frame_url); - } - static void Log(const param_type& p, std::string* l) { - l->append("("); - LogParam(p.screen_x, l); - l->append(", "); - LogParam(p.screen_y, l); - l->append(", "); - LogParam(p.link_url, l); - l->append(", "); - LogParam(p.unfiltered_link_url, l); - l->append(", "); - LogParam(p.src_url, l); - l->append(", "); - LogParam(p.page_url, l); - l->append(", "); - LogParam(p.frame_url, l); - l->append(")"); - } -}; - -struct AttachExternalTabParams { - uint64 cookie; - GURL url; - gfx::Rect dimensions; - int disposition; - bool user_gesture; - std::string profile_name; -}; - -template <> -struct ParamTraits { - typedef AttachExternalTabParams param_type; - static void Write(Message* m, const param_type& p) { - WriteParam(m, p.cookie); - WriteParam(m, p.url); - WriteParam(m, p.dimensions); - WriteParam(m, p.disposition); - WriteParam(m, p.user_gesture); - WriteParam(m, p.profile_name); - } - - static bool Read(const Message* m, void** iter, param_type* p) { - return ReadParam(m, iter, &p->cookie) && - ReadParam(m, iter, &p->url) && - ReadParam(m, iter, &p->dimensions) && - ReadParam(m, iter, &p->disposition) && - ReadParam(m, iter, &p->user_gesture) && - ReadParam(m, iter, &p->profile_name); - } - - static void Log(const param_type& p, std::string* l) { - l->append("("); - LogParam(p.cookie, l); - l->append(", "); - LogParam(p.url, l); - l->append(", "); - LogParam(p.dimensions, l); - l->append(", "); - LogParam(p.disposition, l); - l->append(", "); - LogParam(p.user_gesture, l); - l->append(","); - LogParam(p.profile_name, l); - l->append(")"); - } -}; - -} // namespace IPC - -#define MESSAGES_INTERNAL_FILE \ - "chrome/test/automation/automation_messages_internal.h" -#include "ipc/ipc_message_macros.h" - -#endif // CHROME_TEST_AUTOMATION_AUTOMATION_MESSAGES_H__ diff --git a/chrome/test/automation/automation_messages_internal.h b/chrome/test/automation/automation_messages_internal.h deleted file mode 100644 index 89aba25..0000000 --- a/chrome/test/automation/automation_messages_internal.h +++ /dev/null @@ -1,1451 +0,0 @@ -// Copyright (c) 2010 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. - -// Defines the IPC messages used by the automation interface. - -// This header is meant to be included in multiple passes, hence no traditional -// header guard. -// See ipc_message_macros.h for explanation of the macros and passes. - -#include -#include - -#include "base/basictypes.h" -#include "base/string16.h" -#include "chrome/common/content_settings.h" -#include "chrome/common/navigation_types.h" -#include "chrome/test/automation/autocomplete_edit_proxy.h" -#include "gfx/point.h" -#include "gfx/rect.h" -#include "googleurl/src/gurl.h" -#include "ipc/ipc_message_macros.h" -#include "net/url_request/url_request_status.h" - -// NOTE: All IPC messages have either a routing_id of 0 (for asynchronous -// messages), or one that's been assigned by the proxy (for calls -// which expect a response). The routing_id shouldn't be used for -// any other purpose in these message types. - -// NOTE: All the new IPC messages should go at the end (before IPC_END_MESSAGES) -// The IPC message IDs are part of an enum and hence the value -// assumed to be constant across the builds may change. -// The messages AutomationMsg_WindowHWND* in particular should not change -// since the PageCyclerReferenceTest depends on the correctness of the -// message IDs across the builds. - -IPC_BEGIN_MESSAGES(Automation) - - // This message is fired when the AutomationProvider is up and running - // in the app (the app is not fully up at this point). The parameter to this - // message is the version string of the automation provider. This parameter - // is defined to be the version string as returned by - // chrome::VersionInfo::Version(). - // The client can choose to use this version string to decide whether or not - // it can talk to the provider. - IPC_MESSAGE_ROUTED1(AutomationMsg_Hello, std::string) - - // This message is fired when the initial tab(s) are finished loading. - IPC_MESSAGE_ROUTED0(AutomationMsg_InitialLoadsComplete) - - // This message notifies the AutomationProvider to append a new tab the - // window with the given handle. The return value contains the index of - // the new tab, or -1 if the request failed. - // The second parameter is the url to be loaded in the new tab. - IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_AppendTab, int, GURL, int) - - // This message requests the (zero-based) index for the currently - // active tab in the window with the given handle. The return value contains - // the index of the active tab, or -1 if the request failed. - IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_ActiveTabIndex, int, int) - - // This message notifies the AutomationProvider to active the tab. - // The first parameter is the handle to window resource. - // The second parameter is the (zero-based) index to be activated - IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_ActivateTab, int, int, int) - - // This message requests the cookie value for given url in the - // profile of the tab identified by the second parameter. The first - // parameter is the URL string. The response contains the length of the - // cookie value string. On failure, this length = -1. - IPC_SYNC_MESSAGE_ROUTED2_2(AutomationMsg_GetCookies, GURL, int, - int, std::string) - - // This message notifies the AutomationProvider to set and broadcast a cookie - // with given name and value for the given url in the profile of the tab - // identified by the third parameter. The first parameter is the URL - // string, and the second parameter is the cookie name and value to be set. - // The return value is a non-negative value on success. - IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_SetCookie, GURL, std::string, - int, int) - - // This message notifies the AutomationProvider to navigate to a specified - // url in the tab with given handle. The first parameter is the handle to - // the tab resource. The second parameter is the target url. The return - // value contains a status code which is nonnegative on success. - // See AutomationMsg_NavigationResponseValues for the return value. - // - // Deprecated in favor of - // AutomationMsg_NavigateToURLBlockUntilNavigationsComplete. - // TODO(phajdan.jr): Remove when the reference build gets updated. - IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_NavigateToURL, int, GURL, - AutomationMsg_NavigationResponseValues) - - // This message is used to implement the asynchronous version of - // NavigateToURL. - IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_NavigationAsync, - int /* tab handle */, - GURL, - bool /* result */) - - // This message notifies the AutomationProvider to navigate back in session - // history in the tab with given handle. The first parameter is the handle - // to the tab resource. - // See AutomationMsg_NavigationResponseValues for the navigation response - // values. - // - // Deprecated in favor of AutomationMsg_GoBackBlockUntilNavigationsComplete. - // TODO(phajdan.jr): Remove when the reference build gets updated. - IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_GoBack, int, - AutomationMsg_NavigationResponseValues) - - // This message notifies the AutomationProvider to navigate forward in session - // history in the tab with given handle. The first parameter is the handle - // to the tab resource. - // See AutomationMsg_NavigationResponseValues for the navigation response - // values. - // - // Deprecated in favor of - // AutomationMsg_GoForwardBlockUntilNavigationsComplete. - // TODO(phajdan.jr): Remove when the reference build gets updated. - IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_GoForward, int, - AutomationMsg_NavigationResponseValues) - - // This message requests the number of browser windows that the app currently - // has open. The return value is the number of windows. - IPC_SYNC_MESSAGE_ROUTED0_1(AutomationMsg_BrowserWindowCount, int) - - // This message requests the handle (int64 app-unique identifier) of the - // window with the given (zero-based) index. On error, the returned handle - // value is 0. - IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_BrowserWindow, int, int) - - // This message requests the number of tabs in the window with the given - // handle. The return value contains the number of tabs, or -1 if the - // request failed. - IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_TabCount, int, int) - - // This message requests the handle of the tab with the given (zero-based) - // index in the given app window. First parameter specifies the given window - // handle, second specifies the given tab_index. On error, the returned handle - // value is 0. - IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_Tab, int, int, int) - - // This message requests the the title of the tab with the given handle. - // The return value contains the size of the title string. On error, this - // value should be -1 and empty string. Note that the title can be empty in - // which case the size would be 0. - IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_TabTitle, - int, - int, - std::wstring) - - // This message requests the url of the tab with the given handle. - // The return value contains a success flag and the URL string. The URL will - // be empty on failure, and it still may be empty on success. - IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_TabURL, - int /* tab handle */, - bool /* success flag */, - GURL) - -#if defined(OS_WIN) - // TODO(estade): delete this unused message. - IPC_SYNC_MESSAGE_ROUTED0_0(AutomationMsg_WindowHWND) - - // This message requests the HWND of the tab that corresponds - // to the given automation handle. - // The return value contains the HWND value, which is 0 if the call fails. - // - // TODO(estade): The only test that uses this message is - // NPAPIVisiblePluginTester.SelfDeletePluginInvokeInSynchronousMouseMove. It - // can probably be done in another way, and this can be removed. - IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_TabHWND, - int /* tab_handle */, - HWND /* win32 Window Handle */) -#endif // defined(OS_WIN) - - // This message notifies the AutomationProxy that a handle that it has - // previously been given is now invalid. (For instance, if the handle - // represented a window which has now been closed.) The parameter - // value is the handle. - IPC_MESSAGE_ROUTED1(AutomationMsg_InvalidateHandle, int) - - // This message notifies the AutomationProvider that a handle is no - // longer being used, so it can stop paying attention to the - // associated resource. The parameter value is the handle. - IPC_MESSAGE_ROUTED1(AutomationMsg_HandleUnused, int) - - // This message tells the AutomationProvider to provide the given - // authentication data to the specified tab, in response to an HTTP/FTP - // authentication challenge. - IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_SetAuth, - int, // tab handle - std::wstring, // username - std::wstring, // password - AutomationMsg_NavigationResponseValues) // status - - // This message tells the AutomationProvider to cancel the login in the - // specified tab. - IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_CancelAuth, - int, // tab handle - AutomationMsg_NavigationResponseValues) // status - - // Requests that the automation provider ask history for the most recent - // chain of redirects coming from the given URL. The response must be - // decoded by the caller manually; it contains an integer indicating the - // number of URLs, followed by that many wstrings indicating a chain of - // redirects. On failure, the count will be negative. - IPC_SYNC_MESSAGE_ROUTED2_2(AutomationMsg_RedirectsFrom, - int, // tab handle - GURL, // source URL - bool /* succeeded */, - std::vector /* redirects */) - - // This message asks the AutomationProvider whether a tab is waiting for - // login info. - IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_NeedsAuth, - int, // tab handle - bool) // status - - // This message requests the AutomationProvider to apply a certain - // accelerator. It is completely asynchronous with the resulting accelerator - // action. - IPC_SYNC_MESSAGE_ROUTED2_0(AutomationMsg_ApplyAccelerator, - int, // window handle - int) // accelerator id like (IDC_BACK, - // IDC_FORWARD, etc) - // The list can be found at - // chrome/app/chrome_command_ids.h - - // This message requests that the AutomationProvider executes a JavaScript, - // which is sent embedded in a 'javascript:' URL. - // The javascript is executed in context of child frame whose xpath - // is passed as parameter (context_frame). The execution results in - // a serialized JSON string response. - IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_DomOperation, - int, // tab handle - std::wstring, // context_frame - std::wstring, // the javascript to be executed - std::string) // the serialized json string - // containing the result of a - // javascript execution - - // Is the Download Shelf visible for the specified browser? - IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_ShelfVisibility, - int /* browser_handle */, - bool /* is_visible */) - - // This message requests the number of constrained windows in the tab with - // the given handle. The return value contains the number of constrained - // windows, or -1 if the request failed. - IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_ConstrainedWindowCount, - int /* tab_handle */, - int /* constrained_window_count */) - - // This message requests the bounds of the specified View element in - // window coordinates. - // Request: - // int - the handle of the window in which the view appears - // int - the ID of the view, as specified in chrome/browser/view_ids.h - // bool - whether the bounds should be returned in the screen coordinates - // (if true) or in the browser coordinates (if false). - // Response: - // bool - true if the view was found - // gfx::Rect - the bounds of the view, in window coordinates - IPC_SYNC_MESSAGE_ROUTED3_2(AutomationMsg_WindowViewBounds, int, int, - bool, bool, gfx::Rect) - - // This message sets the bounds of the window. - // Request: - // int - the handle of the window to resize - // gfx::Rect - the bounds of the window - // Response: - // bool - true if the resize was successful - IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_SetWindowBounds, int, gfx::Rect, - bool) - -#if defined(OS_WIN) - // TODO(port): Port these messages. - // - // This message requests that a drag be performed in window coordinate space - // Request: - // int - the handle of the window that's the context for this drag - // std::vector - the path of the drag in window coordinate - // space; it should have at least 2 points - // (start and end) - // int - the flags which identify the mouse button(s) for the drag, as - // defined in chrome/views/event.h - // Response: - // bool - true if the drag could be performed - IPC_SYNC_MESSAGE_ROUTED4_1(AutomationMsg_WindowDrag, - int, std::vector, int, bool, bool) -#endif // defined(OS_WIN) - - // Similar to AutomationMsg_InitialLoadsComplete, this indicates that the - // new tab ui has completed the initial load of its data. - // Time is how many milliseconds the load took. - IPC_MESSAGE_ROUTED1(AutomationMsg_InitialNewTabUILoadComplete, - int /* time */) - - // This message starts a find within a tab corresponding to the supplied - // tab handle. The return value contains the number of matches found on the - // page within the tab specified. The parameter 'search_string' specifies - // what string to search for, 'forward' specifies whether to search in - // forward direction (1=forward, 0=back), 'match_case' specifies case - // sensitivity - // (1=case sensitive, 0=case insensitive). If an error occurs, matches_found - // will be -1. - // - // NOTE: This message has been deprecated, please use the new message - // AutomationMsg_Find below. - // - IPC_SYNC_MESSAGE_ROUTED4_2(AutomationMsg_FindInPage, // DEPRECATED. - int, /* tab_handle */ - std::wstring, /* find_request */ - int, /* forward */ - int /* match_case */, - int /* active_ordinal */, - int /* matches_found */) - - // This message sends a inspect element request for a given tab. The response - // contains the number of resources loaded by the inspector controller. - IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_InspectElement, - int, /* tab_handle */ - int, /* x */ - int /* y */, - int) - - // This message requests the process ID of the tab that corresponds - // to the given automation handle. - // The return value has an integer corresponding to the PID of the tab's - // renderer, 0 if the tab currently has no renderer process, or -1 on error. - IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_TabProcessID, - int /* tab_handle */, - int /* process ID */) - - // This tells the browser to enable or disable the filtered network layer. - IPC_MESSAGE_ROUTED1(AutomationMsg_SetFilteredInet, - bool /* enabled */) - - // Gets the directory that downloads will occur in for the active profile. - IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_DownloadDirectory, - int /* tab_handle */, - FilePath /* directory */) - - // This message requests the id of the view that has the focus in the - // specified window. If no view is focused, -1 is returned. Note that the - // window should either be a ViewWindow or a Browser. - IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_GetFocusedViewID, - int /* view_handle */, - int /* focused_view_id */) - - // This message shows/hides the window. - IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_SetWindowVisible, - int /* view_handle */, - bool /* visible */, - bool /* success */) - - // Gets the active status of a window. - IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_IsWindowActive, - int /* view_handle */, - bool /* success */, - bool /* active */) - - // Makes the specified window the active window. - IPC_SYNC_MESSAGE_ROUTED1_0(AutomationMsg_ActivateWindow, - int /* view_handle */) - - // Opens a new browser window. - // TODO(sky): remove this and replace with OpenNewBrowserWindowOfType. - // Doing this requires updating the reference build. - IPC_SYNC_MESSAGE_ROUTED1_0(AutomationMsg_OpenNewBrowserWindow, - bool /* show */ ) - - // This message requests the handle (int64 app-unique identifier) of the - // current active top window. On error, the returned handle value is 0. - IPC_SYNC_MESSAGE_ROUTED0_1(AutomationMsg_ActiveWindow, int) - - // This message requests the browser associated with the specified window - // handle. - // The return value contains a success flag and the handle of the browser. - IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_BrowserForWindow, - int /* window handle */, - bool /* success flag */, - int /* browser handle */) - - // This message requests the window associated with the specified browser - // handle. - // The return value contains a success flag and the handle of the window. - IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_WindowForBrowser, - int /* browser handle */, - bool /* success flag */, - int /* window handle */) - - // This message requests the AutocompleteEdit associated with the specified - // browser handle. - // The return value contains a success flag and the handle of the omnibox. - IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_AutocompleteEditForBrowser, - int /* browser handle */, - bool /* success flag */, - int /* AutocompleteEdit handle */) - -#if defined(OS_WIN) - // TODO(estade): This message is defined later on for Mac and Linux. This is - // to avoid adding a new IPC in the middle for those platforms (see comment - // at top). The message is exactly the same, so they should be remerged when - // all messages in this file have been made cross-platform (at which point we - // will need to check in new reference builds). - // - // This message requests that a mouse click be performed in window coordinate - // space. - // Request: - // int - the handle of the window that's the context for this click - // gfx::Point - the point to click - // int - the flags which identify the mouse button(s) for the click, as - // defined in chrome/views/event.h - IPC_MESSAGE_ROUTED3(AutomationMsg_WindowClick, int, gfx::Point, int) -#endif // defined(OS_WIN) - - // This message requests that a key press be performed. - // Request: - // int - the handle of the window that's the context for this click - // int - the app::KeyboardCode of the key that was pressed. - // int - the flags which identify the modifiers (shift, ctrl, alt) - // associated for, as defined in chrome/views/event.h - IPC_MESSAGE_ROUTED3(AutomationMsg_WindowKeyPress, int, int, int) - - // This message notifies the AutomationProvider to create a tab which is - // hosted by an external process. - // Request: - // ExternalTabSettings - settings for external tab - IPC_SYNC_MESSAGE_ROUTED1_4(AutomationMsg_CreateExternalTab, - IPC::ExternalTabSettings /* settings*/, - gfx::NativeWindow /* Tab container window */, - gfx::NativeWindow /* Tab window */, - int /* Handle to the new tab */, - int /* Session Id of the new tab */) - - // This message notifies the AutomationProvider to navigate to a specified - // url in the external tab with given handle. The first parameter is the - // handle to the tab resource. The second parameter is the target url. - // The third parameter is the referrer. - // The return value contains a status code which is nonnegative on success. - // see AutomationMsg_NavigationResponseValues for the navigation response. - IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_NavigateInExternalTab, - int, - GURL, - GURL, - AutomationMsg_NavigationResponseValues) - - // This message is an outgoing message from Chrome to an external host. - // It is a notification that the NavigationState was changed - // Request: - // -int: The flags specifying what changed - // (see TabContents::InvalidateTypes) - // Response: - // None expected - IPC_MESSAGE_ROUTED3(AutomationMsg_NavigationStateChanged, - int, // tab handle - int, // TabContents::InvalidateTypes - IPC::NavigationInfo) // title, url etc. - - // This message is an outgoing message from Chrome to an external host. - // It is a notification that the target URL has changed (the target URL - // is the URL of the link that the user is hovering on) - // Request: - // -int: The tab handle - // -std::wstring: The new target URL - // Response: - // None expected - IPC_MESSAGE_ROUTED2(AutomationMsg_UpdateTargetUrl, int, std::wstring) - - // This message notifies the AutomationProvider to show the specified html - // text in an interstitial page in the tab with given handle. The first - // parameter is the handle to the tab resource. The second parameter is the - // html text to be displayed. - // The return value contains a success flag. - IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_ShowInterstitialPage, - int, - std::string, - AutomationMsg_NavigationResponseValues) - - // This message notifies the AutomationProvider to hide the current - // interstitial page in the tab with given handle. The parameter is the - // handle to the tab resource. - // The return value contains a success flag. - IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_HideInterstitialPage, int, - bool) - - // This message requests that a tab be closed. - // Request: - // - int: handle of the tab to close - // - bool: if true the proxy blocks until the tab has completely closed, - // otherwise the proxy only blocks until it initiates the close. - IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_CloseTab, int, bool, bool) - - // This message requests that the browser be closed. - // Request: - // - int: handle of the browser which contains the tab - // Response: - // - bool: whether the operation was successfull. - // - bool: whether the browser process will be terminated as a result (if - // this was the last closed browser window). - IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_CloseBrowser, int, bool, - bool) - - IPC_MESSAGE_ROUTED1(AutomationMsg_CloseBrowserRequestAsync, int) - - // Unused. - // Response: - // None expected - IPC_MESSAGE_ROUTED1(AutomationMsg_Unused, int) - -#if defined(OS_WIN) - // TODO(port): Port these messages. - // - // This message is an outgoing message from Chrome to an external host. - // It is a request to process a keyboard accelerator. - // Request: - // -int: Tab handle - // -MSG: The keyboard message - // Response: - // None expected - // TODO(sanjeevr): Ideally we need to add a response from the external - // host saying whether it processed the accelerator - IPC_MESSAGE_ROUTED2(AutomationMsg_HandleAccelerator, int, MSG) - - // This message is sent by the container of an externally hosted tab to - // reflect any accelerator keys that it did not process. This gives the - // tab a chance to handle the keys - // Request: - // - int: handle of the tab - // -MSG: The keyboard message that the container did not handle - // Response: - // None expected - IPC_MESSAGE_ROUTED2(AutomationMsg_ProcessUnhandledAccelerator, int, MSG) -#endif // defined(OS_WIN) - - // Sent by the external tab to the host to notify that the user has tabbed - // out of the tab. - // Request: - // - int: Tab handle - // - bool: |reverse| set to true when shift-tabbing out of the tab, false - // otherwise. - // Response: - // None expected - IPC_MESSAGE_ROUTED2(AutomationMsg_TabbedOut, int, bool) - - // Sent by the external tab host to ask focus to be set to either the first - // or last element on the page. - // Request: - // - int: handle of the tab - // - bool: |reverse| - // true: Focus will be set to the last focusable element - // false: Focus will be set to the first focusable element - // - bool: |restore_focus_to_view| - // true: The renderer view associated with the current tab will be - // infomed that it is receiving focus. - // Response: - // None expected - IPC_MESSAGE_ROUTED3(AutomationMsg_SetInitialFocus, int, bool, bool) - - // This message is an outgoing message from Chrome to an external host. - // It is a request to open a url - // Request: - // -int: Tab handle - // -GURL: The URL to open - // -GURL: The referrer - // -int: The WindowOpenDisposition that specifies where the URL should - // be opened (new tab, new window etc). - // Response: - // None expected - IPC_MESSAGE_ROUTED4(AutomationMsg_OpenURL, int, GURL, GURL, int) - - // This message requests the provider to wait until the specified tab has - // finished restoring after session restore. - // Request: - // - int: handle of the tab - // Response: - // - bool: whether the operation was successful. - IPC_SYNC_MESSAGE_ROUTED1_0(AutomationMsg_WaitForTabToBeRestored, int) - - // This message is an outgoing message from Chrome to an external host. - // It is a notification that a navigation happened - // Request: - // -int: Tab handle - // - // Response: - // None expected - IPC_MESSAGE_ROUTED2(AutomationMsg_DidNavigate, int, IPC::NavigationInfo) - - // This message requests the different security states of the page displayed - // in the specified tab. - // Request: - // - int: handle of the tab - // Response: - // - bool: whether the operation was successful. - // - SecurityStyle: the security style of the tab. - // - int: the status of the server's ssl cert (0 means no errors or no ssl - // was used). - // - int: the insecure content state, 0 means no insecure contents. - - IPC_SYNC_MESSAGE_ROUTED1_4(AutomationMsg_GetSecurityState, - int, - bool, - SecurityStyle, - int, - int) - - // This message requests the page type of the page displayed in the specified - // tab (normal, error or interstitial). - // Request: - // - int: handle of the tab - // Response: - // - bool: whether the operation was successful. - // - NavigationEntry::PageType: the type of the page currently displayed. - IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_GetPageType, int, bool, - NavigationEntry::PageType) - - // This message simulates the user action on the SSL blocking page showing in - // the specified tab. This message is only effective if an interstitial page - // is showing in the tab. - // Request: - // - int: handle of the tab - // - bool: whether to proceed or abort the navigation - // Response: - // - AutomationMsg_NavigationResponseValues: result of the operation. - IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_ActionOnSSLBlockingPage, int, bool, - AutomationMsg_NavigationResponseValues) - - // Message to request that a browser window is brought to the front and - // activated. - // Request: - // - int: handle of the browser window. - // Response: - // - bool: True if the browser is brought to the front. - IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_BringBrowserToFront, int, bool) - - // Message to request whether a certain item is enabled of disabled in the - // menu in the browser window - // - // Request: - // - int: handle of the browser window. - // - int: IDC message identifier to query if enabled - // Response: - // - bool: True if the command is enabled on the menu - IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_IsMenuCommandEnabled, int, int, bool) - - // This message notifies the AutomationProvider to print the tab with given - // handle. The first parameter is the handle to the tab resource. The - // return value contains a bool which is true on success. - IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_PrintNow, int, bool) - - // This message notifies the AutomationProvider to reload the current page in - // the tab with given handle. The first parameter is the handle to the tab - // resource. The return value contains a status code which is nonnegative on - // success. - // see AutomationMsg_NavigationResponseValues for the navigation response. - IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_Reload, int, - AutomationMsg_NavigationResponseValues) - - // This message requests the handle (int64 app-unique identifier) of the - // last active browser window, or the browser at index 0 if there is no last - // active browser, or it no longer exists. Returns 0 if no browser windows - // exist. - IPC_SYNC_MESSAGE_ROUTED0_1(AutomationMsg_LastActiveBrowserWindow, int) - - // This message notifies the AutomationProvider to save the page with given - // handle. The first parameter is the handle to the tab resource. The second - // parameter is the main HTML file name. The third parameter is the directory - // for saving resources. The fourth parameter is the saving type: 0 for HTML - // only; 1 for complete web page. - // The return value contains a bool which is true on success. - IPC_SYNC_MESSAGE_ROUTED4_1(AutomationMsg_SavePage, int, FilePath, FilePath, - int, bool) - - // This message requests the text currently being displayed in the - // AutocompleteEdit. The parameter is the handle to the AutocompleteEdit. - // The return value is a string indicating the text in the AutocompleteEdit. - IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_AutocompleteEditGetText, - int /* autocomplete edit handle */, - bool /* the requested autocomplete edit exists */, - std::wstring /* omnibox text */) - - // This message sets the text being displayed in the AutocompleteEdit. The - // first parameter is the handle to the omnibox and the second parameter is - // the text to be displayed in the AutocompleteEdit. - // The return value has no parameters and is returned when the operation has - // completed. - IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_AutocompleteEditSetText, - int /* autocomplete edit handle */, - std::wstring /* text to set */, - bool /* the requested autocomplete edit exists */) - - // This message requests if a query to a autocomplete provider is still in - // progress. The first parameter in the request is the handle to the - // autocomplete edit. - // The first return value indicates if the request succeeded. - // The second return value indicates if a query is still in progress. - IPC_SYNC_MESSAGE_ROUTED1_2( \ - AutomationMsg_AutocompleteEditIsQueryInProgress, - int /* autocomplete edit handle*/, - bool /* the requested autocomplete edit exists */, - bool /* indicates if a query is in progress */) - - // This message requests a list of the autocomplete messages currently being - // displayed by the popup. The parameter in the request is a handle to the - // autocomplete edit. - // The first return value indicates if the request was successful, while - // while the second is the actual list of matches. - IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_AutocompleteEditGetMatches, - int /* autocomplete edit handle*/, - bool /* the requested autocomplete edit exists */, - std::vector /* matches */) - - // This message requests the execution of a browser command in the browser - // for which the handle is specified. - // The return value contains a boolean, whether the command was dispatched. - IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_WindowExecuteCommandAsync, - int /* automation handle */, - int /* browser command */, - bool /* success flag */) - - // This message requests the execution of a browser command in the browser - // for which the handle is specified. - // The return value contains a boolean, whether the command was dispatched - // and successful executed. - IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_WindowExecuteCommand, - int /* automation handle */, - int /* browser command */, - bool /* success flag */) - - - // This message opens the Find window within a tab corresponding to the - // supplied tab handle. - IPC_MESSAGE_ROUTED1(AutomationMsg_OpenFindInPage, - int /* tab_handle */) - - // Posts a message from external host to chrome renderer. - IPC_MESSAGE_ROUTED4(AutomationMsg_HandleMessageFromExternalHost, - int /* automation handle */, - std::string /* message */, - std::string /* origin */, - std::string /* target */) - - // A message for an external host. - IPC_MESSAGE_ROUTED4(AutomationMsg_ForwardMessageToExternalHost, - int, /* handle */ - std::string /* message */, - std::string /* origin */, - std::string /* target */) - - // This message starts a find within a tab corresponding to the supplied - // tab handle. The parameter |request| specifies what to search for. - // If an error occurs, |matches_found| will be -1. - // - IPC_SYNC_MESSAGE_ROUTED2_2(AutomationMsg_Find, - int /* tab_handle */, - AutomationMsg_Find_Params /* params */, - int /* active_ordinal */, - int /* matches_found */) - - // Is the Find window fully visible (and not animating) for the specified - // tab? - IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_FindWindowVisibility, - int /* tab_handle */, - bool /* is_visible */) - - // Where is the Find window located. |x| and |y| will be -1, -1 on failure. - IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_FindWindowLocation, - int /* tab_handle */, - int /* x */, - int /* y */) - - // Is the Bookmark bar visible? The return value will indicate whether it is - // visible or not and whether it is being animated into (or out of its place). - IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_BookmarkBarVisibility, - int /* browser_handle */, - bool, /* is_visible */ - bool /* still_animating */) - - // This message requests the number of related info bars opened. It - // returns -1 if an error occurred. - IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_GetInfoBarCount, - int /* tab_handle */, - int /* info bar count */) - - // This message triggers the action associated with the "accept" button in - // the info-bar at the specified index. If |wait for navigation| is true, it - // won't return until a navigation has occurred. - IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_ClickInfoBarAccept, - int /* tab_handle */, - int /* info bar index */, - bool /* wait for navigation */, - - /* navigation result */ - AutomationMsg_NavigationResponseValues) - - // This message retrieves the last time a navigation occurred in the specified - // tab. The value is intended to be used with WaitForNavigation. - IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_GetLastNavigationTime, - int /* tab_handle */, - int64 /* last navigation time */) - - // This messages is used to block until a new navigation occurs (if there is - // none more recent then the time specified). - IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_WaitForNavigation, - int /* tab_handle */, - int64 /* last navigation time */, - - /* navigation result */ - AutomationMsg_NavigationResponseValues) - - // This messages sets an int-value preference. - IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_SetIntPreference, - int /* browser handle */, - std::string /* pref name */, - int /* value */, - bool /* success */) - - // Queries whether an app modal dialog is currently being shown. (i.e. a - // javascript alert) and which buttons it contains. - IPC_SYNC_MESSAGE_ROUTED0_2(AutomationMsg_ShowingAppModalDialog, - bool /* showing dialog */, - int /* view::DelegateDialog::DialogButton */) - - // This message triggers the specified button for the currently showing - // modal dialog. - IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_ClickAppModalDialogButton, - int /* view::DelegateDialog::DialogButton */, - bool /* success */) - - // This messages sets a string-value preference. - IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_SetStringPreference, - int /* browser handle */, - std::string /* pref name */, - std::string /* pref value */, - bool) - - // This messages gets a boolean-value preference. - IPC_SYNC_MESSAGE_ROUTED2_2(AutomationMsg_GetBooleanPreference, - int /* browser handle */, - std::string /* pref name */, - bool /* success */, - bool /* pref value */) - - // This messages sets a boolean-value preference. - IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_SetBooleanPreference, - int /* browser handle */, - std::string /* pref name */, - bool /* pref value */, - bool /* success */) - - // Queries the current used encoding name of the page in the specified - // web content tab. - IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_GetPageCurrentEncoding, - int /* tab handle */, - std::string /* current used encoding name */) - - // Uses the specified encoding to override the encoding of the page in the - // specified web content tab. - IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_OverrideEncoding, - int /* tab handle */, - std::string /* overrided encoding name */, - bool /* success */) - - // Used to disable the dialog box that prompts the user for a path when - // saving a web page. - IPC_SYNC_MESSAGE_ROUTED1_0(AutomationMsg_SavePackageShouldPromptUser, - bool /* false if we want to not show the dialog */) - - // This message is an outgoing message from Chrome to an external host. - // It is a notification that a navigation failed - // Request: - // -int : Tab handle - // -int : The status code. - // -GURL: The URL we failed to navigate to. - // Response: - // None expected - IPC_MESSAGE_ROUTED3(AutomationMsg_NavigationFailed, int, int, GURL) - -#if defined(OS_WIN) - // This message is an outgoing message from an automation client to Chrome. - // It is used to reposition a chrome tab window. - IPC_MESSAGE_ROUTED2(AutomationMsg_TabReposition, - int /* tab handle */, - IPC::Reposition_Params /* SetWindowPos params */) -#endif // defined(OS_WIN) - - // Gets the title of the top level browser window. - IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_WindowTitle, - int /* automation handle */, - string16 /* title text */ ) - - // Tab load complete - IPC_MESSAGE_ROUTED2(AutomationMsg_TabLoaded, - int, // tab handle - GURL) - - // This message requests the tabstrip index of the tab with the given handle. - // The return value contains the index, which will be -1 on failure. - IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_TabIndex, int, int) - - // This message requests the handle (int64 app-unique identifier) of - // a valid normal browser window, i.e. normal type and non-incognito mode. - // On error, the returned handle value is 0. - IPC_SYNC_MESSAGE_ROUTED0_1(AutomationMsg_FindNormalBrowserWindow, int) - - // This message requests the number of normal browser windows, i.e. normal - // type and non-incognito mode that the app currently has open. The return - // value is the number of windows. - IPC_SYNC_MESSAGE_ROUTED0_1(AutomationMsg_NormalBrowserWindowCount, int) - - // Used to put the browser into "extension automation mode" for a given - // set of Chrome Extensions API functions for the current profile, or turn - // off automation mode. The specified tab is used as the conduit for all - // automated API functions. It must be an external tab (as in - // AutomationMsg_CreateExternalTab). - IPC_MESSAGE_ROUTED2(AutomationMsg_SetEnableExtensionAutomation, - // Tab handle. - int, - // Empty to disable automation, non-empty to enable - // automation of the specified API functions, single - // entry of "*" to enable automation of all API - // functions. - std::vector) - - // This message tells the browser to start using the new proxy configuration - // represented by the given JSON string. The parameters used in the JSON - // string are defined in automation_constants.h. - IPC_MESSAGE_ROUTED1(AutomationMsg_SetProxyConfig, - std::string /* proxy_config_json_string */) - - // Sets Download Shelf visibility for the specified browser. - IPC_SYNC_MESSAGE_ROUTED2_0(AutomationMsg_SetShelfVisibility, - int /* browser_handle */, - bool /* is_visible */) - - // This message requests the number of blocked popups in a certain tab with - // the given handle. The return value is the number of blocked popups, or -1 - // if this request failed. - IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_BlockedPopupCount, - int /* tab_handle */, - int /* blocked_popup_count */) - - // This message retrieves the locale of the browser process. On success - // |chrome_locale| will contain the locale as reported by ICU. On failure - // |chrome_locale| is the empty string. - IPC_SYNC_MESSAGE_ROUTED0_1(AutomationMsg_GetBrowserLocale, - string16 /* chrome_locale */) - -#if defined(OS_WIN) - IPC_MESSAGE_ROUTED4(AutomationMsg_ForwardContextMenuToExternalHost, - int /* tab_handle */, - HANDLE /* source menu handle */, - int /* align flags */, - IPC::MiniContextMenuParams /* params */) - - IPC_MESSAGE_ROUTED2(AutomationMsg_ForwardContextMenuCommandToChrome, - int /* tab_handle */, - int /* selected_command */) -#endif // OS_WIN - - // A URL request to be fetched via automation - IPC_MESSAGE_ROUTED3(AutomationMsg_RequestStart, - int /* tab_handle */, - int /* request_id */, - IPC::AutomationURLRequest /* request */) - - // Read data from a URL request to be fetched via automation - IPC_MESSAGE_ROUTED3(AutomationMsg_RequestRead, - int /* tab_handle */, - int /* request_id */, - int /* bytes_to_read */) - - // Response to a AutomationMsg_RequestStart message - IPC_MESSAGE_ROUTED3(AutomationMsg_RequestStarted, - int /* tab_handle */, - int /* request_id */, - IPC::AutomationURLResponse /* response */) - - // Data read via automation - IPC_MESSAGE_ROUTED3(AutomationMsg_RequestData, - int /* tab_handle */, - int /* request_id */, - std::string /* data */) - - IPC_MESSAGE_ROUTED3(AutomationMsg_RequestEnd, - int /* tab_handle */, - int /* request_id */, - URLRequestStatus /* status */) - - IPC_MESSAGE_ROUTED1(AutomationMsg_PrintAsync, - int /* tab_handle */) - - IPC_MESSAGE_ROUTED3(AutomationMsg_SetCookieAsync, - int /* tab_handle */, - GURL /* url */, - std::string /* cookie */) - - IPC_MESSAGE_ROUTED1(AutomationMsg_SelectAll, - int /* tab handle */) - - IPC_MESSAGE_ROUTED1(AutomationMsg_Cut, - int /* tab handle */) - - IPC_MESSAGE_ROUTED1(AutomationMsg_Copy, - int /* tab handle */) - - IPC_MESSAGE_ROUTED1(AutomationMsg_Paste, - int /* tab handle */) - - IPC_MESSAGE_ROUTED1(AutomationMsg_ReloadAsync, - int /* tab handle */) - - IPC_MESSAGE_ROUTED1(AutomationMsg_StopAsync, - int /* tab handle */) - - // Returns the number of times a filter was used to service an URL request. - // See AutomationMsg_SetFilteredInet. - IPC_SYNC_MESSAGE_ROUTED0_1(AutomationMsg_GetFilteredInetHitCount, - int /* hit_count */) - - // Is the browser in fullscreen mode? - IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_IsFullscreen, - int /* browser_handle */, - bool /* is_fullscreen */) - - // Is the fullscreen bubble visible? - IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_IsFullscreenBubbleVisible, - int /* browser_handle */, - bool /* is_visible */) - -#if defined(OS_POSIX) - // See previous definition of this message for explanation of why it is - // defined twice. - IPC_MESSAGE_ROUTED3(AutomationMsg_WindowClick, int, gfx::Point, int) -#endif - - // This message notifies the AutomationProvider to navigate to a specified - // url in the tab with given handle. The first parameter is the handle to - // the tab resource. The second parameter is the target url. The third - // parameter is the number of navigations that are required for a successful - // return value. See AutomationMsg_NavigationResponseValues for the return - // value. - IPC_SYNC_MESSAGE_ROUTED3_1( - AutomationMsg_NavigateToURLBlockUntilNavigationsComplete, int, GURL, int, - AutomationMsg_NavigationResponseValues) - - // This message notifies the AutomationProvider to navigate to a specified - // navigation entry index in the external tab with given handle. The first - // parameter is the handle to the tab resource. The second parameter is the - // index of navigation entry. - // The return value contains a status code which is nonnegative on success. - // see AutomationMsg_NavigationResponseValues for the navigation response. - IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_NavigateExternalTabAtIndex, int, int, - AutomationMsg_NavigationResponseValues) - - // This message requests the provider to wait until the window count - // reached the specified value. - // Request: - // - int: target browser window count - // Response: - // - bool: whether the operation was successful. - IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_WaitForBrowserWindowCountToBecome, - int, bool) - - // This message requests the provider to wait until an application modal - // dialog is shown. - // Response: - // - bool: whether the operation was successful - IPC_SYNC_MESSAGE_ROUTED0_1(AutomationMsg_WaitForAppModalDialogToBeShown, bool) - - // This message notifies the AutomationProvider to navigate back in session - // history in the tab with given handle. The first parameter is the handle - // to the tab resource. The second parameter is the number of navigations the - // provider will wait for. - // See AutomationMsg_NavigationResponseValues for the navigation response - // values. - IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_GoBackBlockUntilNavigationsComplete, - int, int, - AutomationMsg_NavigationResponseValues) - - // This message notifies the AutomationProvider to navigate forward in session - // history in the tab with given handle. The first parameter is the handle - // to the tab resource. The second parameter is the number of navigations - // the provider will wait for. - // See AutomationMsg_NavigationResponseValues for the navigation response - // values. - IPC_SYNC_MESSAGE_ROUTED2_1( - AutomationMsg_GoForwardBlockUntilNavigationsComplete, int, int, - AutomationMsg_NavigationResponseValues) - - // This message is used by automation clients to upload histogram data to the - // browser process. - IPC_MESSAGE_ROUTED1(AutomationMsg_RecordHistograms, - std::vector /* histogram_list */) - - IPC_MESSAGE_ROUTED2(AutomationMsg_AttachExternalTab, - int /* 'source' tab_handle */, - IPC::AttachExternalTabParams) - - // Sent when the automation client connects to an existing tab. - IPC_SYNC_MESSAGE_ROUTED3_4(AutomationMsg_ConnectExternalTab, - uint64 /* cookie */, - bool /* allow/block tab*/, - gfx::NativeWindow /* parent window */, - gfx::NativeWindow /* Tab container window */, - gfx::NativeWindow /* Tab window */, - int /* Handle to the new tab */, - int /* Session Id of the new tab */) - -#if defined(OS_POSIX) - // TODO(estade): this should be merged with the windows message of the same - // name. See comment for WindowClick. - IPC_SYNC_MESSAGE_ROUTED4_1(AutomationMsg_WindowDrag, - int, std::vector, int, bool, bool) -#endif // defined(OS_POSIX) - - // This message gets the bounds of the window. - // Request: - // int - the handle of the window to query - // Response: - // gfx::Rect - the bounds of the window - // bool - true if the query was successful - IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_GetWindowBounds, int, gfx::Rect, - bool) - - // Simulate an end of session. Normally this happens when the user - // shuts down the machine or logs off. - // Request: - // int - the handle of the browser - // Response: - // bool - true if succesful - IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_TerminateSession, int, bool) - - // Returns whether the window is maximized. - // Request: - // int - the handle of the window - // Response: - // bool - true if the window is maximized - // bool - true if query is successful - IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_IsWindowMaximized, int, bool, bool) - - IPC_MESSAGE_ROUTED2(AutomationMsg_SetPageFontSize, - int /* tab_handle */, - int /* The font size */) - - // Returns a metric event duration that was last recorded. Returns -1 if the - // event hasn't occurred yet. - IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_GetMetricEventDuration, - std::string /* event_name */, - int /* duration ms */) - - // Sent by automation provider - go to history entry via automation. - IPC_MESSAGE_ROUTED2(AutomationMsg_RequestGoToHistoryEntryOffset, - int, // tab handle - int) // numbers of entries (negative or positive) - - // Silently install the extension in the given crx file. - IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_InstallExtension, - FilePath /* full path to crx file */, - AutomationMsg_ExtensionResponseValues) - - // Silently load the extension in the given directory. This expects an - // extension expanded into the directory, not a crx file. - IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_LoadExpandedExtension, - FilePath /* root directory of extension */, - AutomationMsg_ExtensionResponseValues) - - // Retrieves a list of the root directories of all enabled extensions - // that have been installed into Chrome by dropping a .crx file onto - // Chrome or an equivalent action (including loaded extensions). - // Other types of extensions are not included on the list (e.g. "component" - // or "external" extensions) since they are generally not useful for testing - // (e.g. an external extension could mess with an automated test if it's - // present on some systems only). - IPC_SYNC_MESSAGE_ROUTED0_1(AutomationMsg_GetEnabledExtensions, - std::vector) - - // This message requests the type of the window with the given handle. The - // return value contains the type (Browser::Type), or -1 if the request - // failed. - IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_Type, int, int) - - // Opens a new browser window of a specific type. - IPC_SYNC_MESSAGE_ROUTED2_0(AutomationMsg_OpenNewBrowserWindowOfType, - int /* Type (Browser::Type) */, - bool /* show */ ) - - // This message requests that the mouse be moved to this location, in - // window coordinate space. - // Request: - // int - the handle of the window that's the context for this click - // gfx::Point - the location to move to - IPC_MESSAGE_ROUTED2(AutomationMsg_WindowMouseMove, int, gfx::Point) - - // Called when requests should be downloaded using a host browser's - // download mechanism when chrome is being embedded. - IPC_MESSAGE_ROUTED2(AutomationMsg_DownloadRequestInHost, - int /* tab_handle */, - int /* request_id */) - - // Shuts down the session service for the browser identified by - // |browser_handle|. On success |result| is set to true. - IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_ShutdownSessionService, - int /* browser_handle */, - bool /* result */) - - IPC_MESSAGE_ROUTED1(AutomationMsg_SaveAsAsync, - int /* tab handle */) - -#if defined(OS_WIN) - // An incoming message from an automation host to Chrome. Signals that - // the browser containing |tab_handle| has moved. - IPC_MESSAGE_ROUTED1(AutomationMsg_BrowserMove, - int /* tab handle */) -#endif - - // Used to get cookies for the given URL. - IPC_MESSAGE_ROUTED3(AutomationMsg_GetCookiesFromHost, - int /* tab_handle */, - GURL /* url */, - int /* opaque_cookie_id */) - - IPC_MESSAGE_ROUTED5(AutomationMsg_GetCookiesHostResponse, - int /* tab_handle */, - bool /* success */, - GURL /* url */, - std::string /* cookies */, - int /* opaque_cookie_id */) - - // If the given host is empty, then the default content settings are - // modified. - IPC_SYNC_MESSAGE_ROUTED4_1(AutomationMsg_SetContentSetting, - int /* browser handle */, - std::string /* host */, - ContentSettingsType /* content type */, - ContentSetting /* setting */, - bool /* success */) - -#if defined(OS_CHROMEOS) - // Logs in through the browser's login wizard if available. - IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_LoginWithUserAndPass, - std::string /* username*/, - std::string /* password*/, - bool /* Whether successful*/) -#endif - - // Return the bookmarks encoded as a JSON string. - IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_GetBookmarksAsJSON, - int /* browser_handle */, - std::string /* bookmarks as a JSON string */, - bool /* success */) - - // Wait for the bookmark model to load. - IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_WaitForBookmarkModelToLoad, - int /* browser_handle */, - bool /* success */) - - // Bookmark addition, modification, and removal. - // Bookmarks are indexed by their id. - IPC_SYNC_MESSAGE_ROUTED4_1(AutomationMsg_AddBookmarkGroup, - int /* browser_handle */, - int64 /* parent_id */, - int /* index */, - std::wstring /* title */, - bool /* success */) - IPC_SYNC_MESSAGE_ROUTED5_1(AutomationMsg_AddBookmarkURL, - int /* browser_handle */, - int64 /* parent_id */, - int /* index */, - std::wstring /* title */, - GURL /* url */, - bool /* success */) - IPC_SYNC_MESSAGE_ROUTED4_1(AutomationMsg_ReparentBookmark, - int /* browser_handle */, - int64 /* id */, - int64 /* new_parent_id */, - int /* index */, - bool /* success */) - IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_SetBookmarkTitle, - int /* browser_handle */, - int64 /* id */, - std::wstring /* title */, - bool /* success */) - IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_SetBookmarkURL, - int /* browser_handle */, - int64 /* id */, - GURL /* url */, - bool /* success */) - IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_RemoveBookmark, - int /* browser_handle */, - int64 /* id */, - bool /* success */) - - // This message informs the browser process to remove the history entries - // for the specified types across all time ranges. See - // browsing_data_remover.h for a list of REMOVE_* types supported in the - // remove_mask parameter. - IPC_MESSAGE_ROUTED1(AutomationMsg_RemoveBrowsingData, int) - - // Block until the focused view id changes to something other than - // |previous_view_id|. - IPC_SYNC_MESSAGE_ROUTED2_2(AutomationMsg_WaitForFocusedViewIDToChange, - int /* window handle */, - int /* previous_view_id */, - bool /* success */, - int /* new_view_id */) - - // To avoid race conditions, waiting until a popup menu opens is a - // three-step process: - // 1. Call StartTrackingPopupMenus. - // 2. Call an automation method that results in opening the popup menu. - // 3. Call WaitForPopupMenuToOpen and check for success. - IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_StartTrackingPopupMenus, - int /* browser handle */, - bool /* success */) - IPC_SYNC_MESSAGE_ROUTED0_1(AutomationMsg_WaitForPopupMenuToOpen, - bool /* success */) - - // Generic pyauto pattern to help avoid future addition of - // automation messages. - IPC_SYNC_MESSAGE_ROUTED2_2(AutomationMsg_SendJSONRequest, - int /* browser_handle */, - std::string /* JSON request */, - std::string /* JSON response */, - bool /* success */) - - // Installs an extension from the crx file and returns its id. - // On error, |extension handle| will be 0. - IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_InstallExtensionAndGetHandle, - FilePath /* full path to crx file */, - bool /* with UI */, - int /* extension handle */) - - // Waits for the next extension test result. Sets |test result| as the - // received result and |message| as any accompanying message with the - // result, which could be the empty string. - IPC_SYNC_MESSAGE_ROUTED0_2(AutomationMsg_WaitForExtensionTestResult, - bool /* test result */, - std::string /* message */) - - // Uninstalls an extension. On success |success| is true. - IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_UninstallExtension, - int /* extension handle */, - bool /* success */) - - // Enables an extension. On success |success| is true. - IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_EnableExtension, - int /* extension handle */, - bool /* success */) - - // Disables an extension. On success |success| is true. - IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_DisableExtension, - int /* extension handle */, - bool /* success */) - - // Executes the action associated with the given extension. This executes - // the extension's page or browser action in the given browser, but does - // not open popups. On success |success| is true. - IPC_SYNC_MESSAGE_ROUTED2_1( - AutomationMsg_ExecuteExtensionActionInActiveTabAsync, - int /* extension handle */, - int /* browser handle */, - bool /* success */) - - // Moves the browser action to the given index in the browser action toolbar. - // On success |success| is true. - IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_MoveExtensionBrowserAction, - int /* extension handle */, - int /* index */, - bool /* success */) - - // Gets an extension property |property type|. On success |success| is true, - // and |property value| is set. - IPC_SYNC_MESSAGE_ROUTED2_2(AutomationMsg_GetExtensionProperty, - int /* extension handle */, - AutomationMsg_ExtensionProperty /* property type */, - bool /* success */, - std::string /* property value */) - - // Resets to the default theme. - IPC_SYNC_MESSAGE_ROUTED0_0(AutomationMsg_ResetToDefaultTheme) - - // Navigates asynchronously to a URL with a certain disposition, - // like in a new tab. - IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_NavigationAsyncWithDisposition, - int /* tab handle */, - GURL, - WindowOpenDisposition, - bool /* result */) - - - // This message requests the cookie be deleted for given url in the - // profile of the tab identified by the first parameter. The second - // parameter is the cookie name. - IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_DeleteCookie, GURL, std::string, - int /* tab handle */, - bool /* result */) - - // This message triggers the collected cookies dialog for a specific tab. - IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_ShowCollectedCookiesDialog, - int /* tab handle */, - bool /* result */) - - // This message requests the external tab identified by the tab handle - // passed in be closed. - // Request: - // -int: Tab handle - // Response: - // None expected - IPC_MESSAGE_ROUTED1(AutomationMsg_CloseExternalTab, int) - - // This message requests that the external tab identified by the tab handle - // runs unload handlers if any on the current page. - // Request: - // -int: Tab handle - // -bool: result: true->unload, false->don't unload - IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_RunUnloadHandlers, int, bool) - - // This message sets the current zoom level on the tab - // Request: - // -int: Tab handle - // -int: Zoom level. Values ZOOM_OUT = -1, RESET = 0, ZOOM_IN = 1 - // Response: - // None expected - IPC_MESSAGE_ROUTED2(AutomationMsg_SetZoomLevel, int, int) - - // Waits for tab count to reach target value. - IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_WaitForTabCountToBecome, - int /* browser handle */, - int /* target tab count */, - bool /* success */) - - // Waits for the infobar count to reach given number. - IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_WaitForInfoBarCount, - int /* tab handle */, - int /* target count */, - bool /* success */) - - // Waits for the autocomplete edit to receive focus. - IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_WaitForAutocompleteEditFocus, - int /* autocomplete edit handle */, - bool /* success */) - - // Loads all blocked plug-ins on the page. - IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_LoadBlockedPlugins, - int /* tab handle */, - bool /* success */) - -IPC_END_MESSAGES(Automation) diff --git a/chrome/test/automation/automation_proxy.cc b/chrome/test/automation/automation_proxy.cc index 748ffc2..fbdde25 100644 --- a/chrome/test/automation/automation_proxy.cc +++ b/chrome/test/automation/automation_proxy.cc @@ -14,9 +14,9 @@ #include "base/process_util.h" #include "base/ref_counted.h" #include "base/waitable_event.h" +#include "chrome/common/automation_constants.h" +#include "chrome/common/automation_messages.h" #include "chrome/common/chrome_version_info.h" -#include "chrome/test/automation/automation_constants.h" -#include "chrome/test/automation/automation_messages.h" #include "chrome/test/automation/browser_proxy.h" #include "chrome/test/automation/extension_proxy.h" #include "chrome/test/automation/tab_proxy.h" diff --git a/chrome/test/automation/automation_proxy.h b/chrome/test/automation/automation_proxy.h index 344c248..b54dc10 100644 --- a/chrome/test/automation/automation_proxy.h +++ b/chrome/test/automation/automation_proxy.h @@ -18,7 +18,7 @@ #include "base/thread.h" #include "base/waitable_event.h" #include "chrome/browser/browser.h" -#include "chrome/test/automation/automation_constants.h" +#include "chrome/common/automation_constants.h" #include "chrome/test/automation/automation_handle_tracker.h" #include "chrome/test/automation/browser_proxy.h" #include "gfx/native_widget_types.h" diff --git a/chrome/test/automation/automation_proxy_uitest.cc b/chrome/test/automation/automation_proxy_uitest.cc index 1e5b2cd..2da2302 100644 --- a/chrome/test/automation/automation_proxy_uitest.cc +++ b/chrome/test/automation/automation_proxy_uitest.cc @@ -18,11 +18,11 @@ #include "chrome/app/chrome_command_ids.h" #include "chrome/browser/net/url_request_slow_http_job.h" #include "chrome/browser/view_ids.h" +#include "chrome/common/automation_messages.h" #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/json_value_serializer.h" #include "chrome/test/automation/autocomplete_edit_proxy.h" -#include "chrome/test/automation/automation_messages.h" #include "chrome/test/automation/automation_proxy_uitest.h" #include "chrome/test/automation/browser_proxy.h" #include "chrome/test/automation/tab_proxy.h" diff --git a/chrome/test/automation/browser_proxy.cc b/chrome/test/automation/browser_proxy.cc index b5a89eb..88d833a 100644 --- a/chrome/test/automation/browser_proxy.cc +++ b/chrome/test/automation/browser_proxy.cc @@ -11,9 +11,9 @@ #include "base/logging.h" #include "base/platform_thread.h" #include "base/time.h" +#include "chrome/common/automation_constants.h" +#include "chrome/common/automation_messages.h" #include "chrome/test/automation/autocomplete_edit_proxy.h" -#include "chrome/test/automation/automation_constants.h" -#include "chrome/test/automation/automation_messages.h" #include "chrome/test/automation/automation_proxy.h" #include "chrome/test/automation/tab_proxy.h" #include "chrome/test/automation/window_proxy.h" diff --git a/chrome/test/automation/extension_proxy.cc b/chrome/test/automation/extension_proxy.cc index 29fd54c..4390c10 100644 --- a/chrome/test/automation/extension_proxy.cc +++ b/chrome/test/automation/extension_proxy.cc @@ -5,7 +5,7 @@ #include "chrome/test/automation/extension_proxy.h" #include "base/string_number_conversions.h" -#include "chrome/test/automation/automation_messages.h" +#include "chrome/common/automation_messages.h" #include "chrome/test/automation/automation_proxy.h" #include "chrome/test/automation/browser_proxy.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/chrome/test/automation/extension_proxy.h b/chrome/test/automation/extension_proxy.h index 485d469..ac4d7ec 100644 --- a/chrome/test/automation/extension_proxy.h +++ b/chrome/test/automation/extension_proxy.h @@ -9,7 +9,7 @@ #include #include "base/compiler_specific.h" -#include "chrome/test/automation/automation_constants.h" +#include "chrome/common/automation_constants.h" #include "chrome/test/automation/automation_handle_tracker.h" class AutomationMessageSender; diff --git a/chrome/test/automation/tab_proxy.cc b/chrome/test/automation/tab_proxy.cc index a338de7..d7c99dd 100644 --- a/chrome/test/automation/tab_proxy.cc +++ b/chrome/test/automation/tab_proxy.cc @@ -9,9 +9,8 @@ #include "base/logging.h" #include "base/string16.h" #include "base/utf_string_conversions.h" +#include "chrome/common/automation_messages.h" #include "chrome/common/json_value_serializer.h" -#include "chrome/test/automation/automation_constants.h" -#include "chrome/test/automation/automation_messages.h" #include "chrome/test/automation/automation_proxy.h" #include "googleurl/src/gurl.h" diff --git a/chrome/test/automation/tab_proxy.h b/chrome/test/automation/tab_proxy.h index 92a80a7..217863c 100644 --- a/chrome/test/automation/tab_proxy.h +++ b/chrome/test/automation/tab_proxy.h @@ -20,7 +20,7 @@ #include "chrome/browser/download/save_package.h" #include "chrome/browser/tab_contents/navigation_entry.h" #include "chrome/browser/tab_contents/security_style.h" -#include "chrome/test/automation/automation_constants.h" +#include "chrome/common/automation_constants.h" #include "chrome/test/automation/automation_handle_tracker.h" #include "chrome/test/automation/dom_element_proxy.h" #include "chrome/test/automation/javascript_execution_controller.h" diff --git a/chrome/test/automation/window_proxy.cc b/chrome/test/automation/window_proxy.cc index 1a66edc..6774e6d 100644 --- a/chrome/test/automation/window_proxy.cc +++ b/chrome/test/automation/window_proxy.cc @@ -8,8 +8,8 @@ #include #include "base/logging.h" -#include "chrome/test/automation/automation_constants.h" -#include "chrome/test/automation/automation_messages.h" +#include "chrome/common/automation_constants.h" +#include "chrome/common/automation_messages.h" #include "chrome/test/automation/automation_proxy.h" #include "chrome/test/automation/browser_proxy.h" #include "chrome/test/automation/tab_proxy.h" diff --git a/chrome/test/pyautolib/pyautolib.i b/chrome/test/pyautolib/pyautolib.i index 345a64c..f228a88 100644 --- a/chrome/test/pyautolib/pyautolib.i +++ b/chrome/test/pyautolib/pyautolib.i @@ -27,12 +27,13 @@ // Headers that can be swigged directly. %include "chrome/app/chrome_command_ids.h" +%include "chrome/app/chrome_dll_resource.h" +%include "chrome/common/automation_constants.h" %include "chrome/common/pref_names.h" -%include "chrome/test/automation/automation_constants.h" %{ +#include "chrome/common/automation_constants.h" #include "chrome/common/pref_names.h" -#include "chrome/test/automation/automation_constants.h" #include "chrome/test/automation/browser_proxy.h" #include "chrome/test/automation/tab_proxy.h" #include "chrome/test/pyautolib/pyautolib.h" diff --git a/chrome/test/reliability/page_load_test.cc b/chrome/test/reliability/page_load_test.cc index 770f0f2..571c16a 100644 --- a/chrome/test/reliability/page_load_test.cc +++ b/chrome/test/reliability/page_load_test.cc @@ -50,6 +50,7 @@ #include "chrome/browser/browser_thread.h" #include "chrome/browser/net/url_fixer_upper.h" #include "chrome/browser/prefs/pref_service.h" +#include "chrome/common/automation_messages.h" #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_switches.h" @@ -58,7 +59,6 @@ #include "chrome/common/logging_chrome.h" #include "chrome/common/pref_names.h" #include "chrome/common/url_constants.h" -#include "chrome/test/automation/automation_messages.h" #include "chrome/test/automation/automation_proxy.h" #include "chrome/test/automation/browser_proxy.h" #include "chrome/test/automation/tab_proxy.h" diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc index 37ed73b..29075b3 100644 --- a/chrome/test/ui/ui_test.cc +++ b/chrome/test/ui/ui_test.cc @@ -32,6 +32,7 @@ #include "base/utf_string_conversions.h" #include "chrome/app/chrome_command_ids.h" #include "chrome/browser/net/url_fixer_upper.h" +#include "chrome/common/automation_messages.h" #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_switches.h" @@ -39,7 +40,6 @@ #include "chrome/common/logging_chrome.h" #include "chrome/common/json_value_serializer.h" #include "chrome/common/url_constants.h" -#include "chrome/test/automation/automation_messages.h" #include "chrome/test/automation/automation_proxy.h" #include "chrome/test/automation/browser_proxy.h" #include "chrome/test/automation/javascript_execution_controller.h" diff --git a/chrome_frame/cfproxy.h b/chrome_frame/cfproxy.h index dc0e4b0..c3acf7a 100644 --- a/chrome_frame/cfproxy.h +++ b/chrome_frame/cfproxy.h @@ -13,8 +13,8 @@ #include "base/lock.h" #include "base/time.h" // for base::TimeDelta #include "base/file_path.h" +#include "chrome/common/automation_constants.h" #include "chrome/common/page_zoom.h" -#include "chrome/test/automation/automation_constants.h" enum FindInPageDirection { BACK = 0, FWD = 1 }; enum FindInPageCase { IGNORE_CASE = 0, CASE_SENSITIVE = 1 }; diff --git a/chrome_frame/cfproxy_proxy.cc b/chrome_frame/cfproxy_proxy.cc index 5d6a780..7dcb944 100644 --- a/chrome_frame/cfproxy_proxy.cc +++ b/chrome_frame/cfproxy_proxy.cc @@ -6,7 +6,7 @@ #include "base/tuple.h" #include "ipc/ipc_sync_message.h" -#include "chrome/test/automation/automation_messages.h" +#include "chrome/common/automation_messages.h" CFProxy::CFProxy(CFProxyTraits* api) : ipc_thread_("ipc"), sync_dispatcher_(&tab2delegate_), diff --git a/chrome_frame/cfproxy_support.cc b/chrome_frame/cfproxy_support.cc index 6b5224b..dc2eb8b 100644 --- a/chrome_frame/cfproxy_support.cc +++ b/chrome_frame/cfproxy_support.cc @@ -8,8 +8,8 @@ #include "base/atomic_sequence_num.h" #include "base/command_line.h" #include "base/process_util.h" +#include "chrome/common/automation_messages.h" #include "chrome/common/chrome_switches.h" -#include "chrome/test/automation/automation_messages.h" #include "chrome_frame/chrome_launcher_utils.h" #include "chrome_frame/utils.h" // for IsHeadlessMode(); diff --git a/chrome_frame/cfproxy_test.cc b/chrome_frame/cfproxy_test.cc index 6a547f8..3a99b92 100644 --- a/chrome_frame/cfproxy_test.cc +++ b/chrome_frame/cfproxy_test.cc @@ -5,8 +5,8 @@ #include #include "base/file_path.h" #include "base/waitable_event.h" +#include "chrome/common/automation_messages.h" #include "chrome_frame/cfproxy_private.h" -#include "chrome/test/automation/automation_messages.h" #include "testing/gtest/include/gtest/gtest.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gmock_mutant.h" diff --git a/chrome_frame/chrome_frame_delegate.h b/chrome_frame/chrome_frame_delegate.h index d111d38..c7890b7 100644 --- a/chrome_frame/chrome_frame_delegate.h +++ b/chrome_frame/chrome_frame_delegate.h @@ -13,7 +13,7 @@ #include "base/file_path.h" #include "base/lock.h" -#include "chrome/test/automation/automation_messages.h" +#include "chrome/common/automation_messages.h" #include "ipc/ipc_message.h" // A common interface supported by all the browser specific ChromeFrame diff --git a/chrome_frame/external_tab.cc b/chrome_frame/external_tab.cc index 785f6af..ca402d9 100644 --- a/chrome_frame/external_tab.cc +++ b/chrome_frame/external_tab.cc @@ -7,7 +7,7 @@ #include "base/tracked.h" #include "base/task.h" #include "base/waitable_event.h" -#include "chrome/test/automation/automation_messages.h" +#include "chrome/common/automation_messages.h" #include "chrome_frame/utils.h" DISABLE_RUNNABLE_METHOD_REFCOUNT(ExternalTabProxy); diff --git a/chrome_frame/external_tab.h b/chrome_frame/external_tab.h index 5411528..8affbc1 100644 --- a/chrome_frame/external_tab.h +++ b/chrome_frame/external_tab.h @@ -14,8 +14,8 @@ #include "base/scoped_comptr_win.h" #include "base/scoped_ptr.h" #include "base/time.h" -#include "chrome/common//page_zoom.h" -#include "chrome/test/automation/automation_constants.h" +#include "chrome/common/automation_constants.h" +#include "chrome/common/page_zoom.h" #include "chrome_frame/cfproxy.h" #include "chrome_frame/task_marshaller.h" #include "googleurl/src/gurl.h" diff --git a/chrome_frame/external_tab_test.cc b/chrome_frame/external_tab_test.cc index 015ed7b..5e3e44a 100644 --- a/chrome_frame/external_tab_test.cc +++ b/chrome_frame/external_tab_test.cc @@ -9,7 +9,7 @@ // #include "base/waitable_event.h" -#include "chrome/test/automation/automation_messages.h" +#include "chrome/common/automation_messages.h" #include "testing/gtest/include/gtest/gtest.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gmock_mutant.h" diff --git a/chrome_frame/plugin_url_request.cc b/chrome_frame/plugin_url_request.cc index c4bf932..236090b 100644 --- a/chrome_frame/plugin_url_request.cc +++ b/chrome_frame/plugin_url_request.cc @@ -4,7 +4,7 @@ #include "chrome_frame/plugin_url_request.h" -#include "chrome/test/automation/automation_messages.h" +#include "chrome/common/automation_messages.h" #include "chrome_frame/np_browser_functions.h" PluginUrlRequest::PluginUrlRequest() diff --git a/chrome_frame/test/net/test_automation_provider.cc b/chrome_frame/test/net/test_automation_provider.cc index 7594f30..5b8a9a6 100644 --- a/chrome_frame/test/net/test_automation_provider.cc +++ b/chrome_frame/test/net/test_automation_provider.cc @@ -7,7 +7,7 @@ #include "base/command_line.h" #include "base/file_version_info.h" #include "base/path_service.h" -#include "chrome/test/automation/automation_messages.h" +#include "chrome/common/automation_messages.h" #include "chrome_frame/test/net/test_automation_resource_message_filter.h" namespace { diff --git a/chrome_frame/test/reliability/page_load_test.cc b/chrome_frame/test/reliability/page_load_test.cc index 482e00e..4116464 100644 --- a/chrome_frame/test/reliability/page_load_test.cc +++ b/chrome_frame/test/reliability/page_load_test.cc @@ -37,6 +37,7 @@ #include "chrome/browser/net/url_fixer_upper.h" #include "chrome/browser/prefs/pref_service.h" #include "chrome/browser/prefs/pref_value_store.h" +#include "chrome/common/automation_messages.h" #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_paths_internal.h" @@ -46,7 +47,6 @@ #include "chrome/common/pref_names.h" #include "chrome_frame/test/chrome_frame_test_utils.h" #include "chrome_frame/test/ie_event_sink.h" -#include "chrome/test/automation/automation_messages.h" #include "chrome/test/automation/automation_proxy.h" #include "chrome/test/automation/browser_proxy.h" #include "chrome/test/automation/tab_proxy.h" diff --git a/ipc/ipc_message_impl_macros.h b/ipc/ipc_message_impl_macros.h index dfa7c91..461f2e1 100644 --- a/ipc/ipc_message_impl_macros.h +++ b/ipc/ipc_message_impl_macros.h @@ -22,6 +22,7 @@ // don't understand #include MESSAGES_INTERNAL_FILE. See http://crbug.com/7828 #if 0 #include "ipc/ipc_sync_message_unittest.h" +#include "chrome/common/automation_messages_internal.h" #include "chrome/common/devtools_messages_internal.h" #include "chrome/common/gpu_messages_internal.h" #include "chrome/common/nacl_messages_internal.h" @@ -30,7 +31,6 @@ #include "chrome/common/service_messages_internal.h" #include "chrome/common/utility_messages_internal.h" #include "chrome/common/worker_messages_internal.h" -#include "chrome/test/automation/automation_messages_internal.h" #endif // These are probalby still defined because of ipc_message_macros.h should be diff --git a/ipc/ipc_message_macros.h b/ipc/ipc_message_macros.h index 6fd789e..fad4163 100644 --- a/ipc/ipc_message_macros.h +++ b/ipc/ipc_message_macros.h @@ -52,10 +52,10 @@ // don't understand #include MESSAGES_INTERNAL_FILE. See http://crbug.com/7828 #if 0 #include "ipc/ipc_sync_message_unittest.h" +#include "chrome/common/automation_messages_internal.h" +#include "chrome/common/devtools_messages_internal.h" #include "chrome/common/plugin_messages_internal.h" #include "chrome/common/render_messages_internal.h" -#include "chrome/common/devtools_messages_internal.h" -#include "chrome/test/automation/automation_messages_internal.h" #include "chrome/common/worker_messages_internal.h" #endif -- cgit v1.1