| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Defines the IPC messages used by the automation interface. | 5 // Defines the IPC messages used by the automation interface. |
| 6 | 6 |
| 7 // This header is meant to be included in multiple passes, hence no traditional | |
| 8 // header guard. | |
| 9 // See ipc_message_macros.h for explanation of the macros and passes. | |
| 10 | |
| 11 #include <string> | 7 #include <string> |
| 12 #include <vector> | 8 #include <vector> |
| 13 | 9 |
| 14 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 15 #include "base/string16.h" | 11 #include "base/string16.h" |
| 16 #include "chrome/common/content_settings.h" | 12 #include "chrome/common/content_settings.h" |
| 17 #include "chrome/common/navigation_types.h" | 13 #include "chrome/common/navigation_types.h" |
| 18 #include "chrome/test/automation/autocomplete_edit_proxy.h" | 14 #include "chrome/test/automation/autocomplete_edit_proxy.h" |
| 19 #include "gfx/point.h" | 15 #include "gfx/point.h" |
| 20 #include "gfx/rect.h" | 16 #include "gfx/rect.h" |
| 21 #include "googleurl/src/gurl.h" | 17 #include "googleurl/src/gurl.h" |
| 22 #include "ipc/ipc_message_macros.h" | 18 #include "ipc/ipc_message_macros.h" |
| 23 #include "net/url_request/url_request_status.h" | 19 #include "net/url_request/url_request_status.h" |
| 24 | 20 |
| 21 |
| 22 |
| 23 //NEED TO USE #line to keep constant |
| 24 |
| 25 |
| 26 |
| 27 |
| 28 |
| 29 |
| 30 |
| 31 |
| 32 |
| 25 // NOTE: All IPC messages have either a routing_id of 0 (for asynchronous | 33 // NOTE: All IPC messages have either a routing_id of 0 (for asynchronous |
| 26 // messages), or one that's been assigned by the proxy (for calls | 34 // messages), or one that's been assigned by the proxy (for calls |
| 27 // which expect a response). The routing_id shouldn't be used for | 35 // which expect a response). The routing_id shouldn't be used for |
| 28 // any other purpose in these message types. | 36 // any other purpose in these message types. |
| 29 | 37 |
| 30 // NOTE: All the new IPC messages should go at the end (before IPC_END_MESSAGES) | 38 // NOTE: All the new IPC messages should go at the end |
| 31 // The IPC message IDs are part of an enum and hence the value | 39 // The IPC message IDs are part of an enum and hence the value |
| 32 // assumed to be constant across the builds may change. | 40 // assumed to be constant across the builds may change. |
| 33 // The messages AutomationMsg_WindowHWND* in particular should not change | 41 // The messages AutomationMsg_WindowHWND* in particular should not change |
| 34 // since the PageCyclerReferenceTest depends on the correctness of the | 42 // since the PageCyclerReferenceTest depends on the correctness of the |
| 35 // message IDs across the builds. | 43 // message IDs across the builds. |
| 36 | 44 |
| 37 IPC_BEGIN_MESSAGES(Automation) | 45 #define IPC_MESSAGE_START AutomationMsgStart |
| 38 | 46 |
| 39 // This message is fired when the AutomationProvider is up and running | 47 // This message is fired when the AutomationProvider is up and running |
| 40 // in the app (the app is not fully up at this point). The parameter to this | 48 // in the app (the app is not fully up at this point). The parameter to this |
| 41 // message is the version string of the automation provider. This parameter | 49 // message is the version string of the automation provider. This parameter |
| 42 // is defined to be the version string as returned by | 50 // is defined to be the version string as returned by |
| 43 // chrome::VersionInfo::Version(). | 51 // chrome::VersionInfo::Version(). |
| 44 // The client can choose to use this version string to decide whether or not | 52 // The client can choose to use this version string to decide whether or not |
| 45 // it can talk to the provider. | 53 // it can talk to the provider. |
| 46 IPC_MESSAGE_ROUTED1(AutomationMsg_Hello, std::string) | 54 IPC_MESSAGE_ROUTED1(AutomationMsg_Hello, std::string) |
| 47 | 55 |
| 48 // This message is fired when the initial tab(s) are finished loading. | 56 // This message is fired when the initial tab(s) are finished loading. |
| 49 IPC_MESSAGE_ROUTED0(AutomationMsg_InitialLoadsComplete) | 57 IPC_MESSAGE_ROUTED0(AutomationMsg_InitialLoadsComplete) |
| 50 | 58 |
| 51 // This message notifies the AutomationProvider to append a new tab the | 59 // This message notifies the AutomationProvider to append a new tab the |
| 52 // window with the given handle. The return value contains the index of | 60 // window with the given handle. The return value contains the index of |
| 53 // the new tab, or -1 if the request failed. | 61 // the new tab, or -1 if the request failed. |
| 54 // The second parameter is the url to be loaded in the new tab. | 62 // The second parameter is the url to be loaded in the new tab. |
| 55 IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_AppendTab, int, GURL, int) | 63 IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_AppendTab, int, GURL, int) |
| 56 | 64 |
| 57 // This message requests the (zero-based) index for the currently | 65 // This message requests the (zero-based) index for the currently |
| 58 // active tab in the window with the given handle. The return value contains | 66 // active tab in the window with the given handle. The return value contains |
| 59 // the index of the active tab, or -1 if the request failed. | 67 // the index of the active tab, or -1 if the request failed. |
| 60 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_ActiveTabIndex, int, int) | 68 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_ActiveTabIndex, int, int) |
| 61 | 69 |
| 62 // This message notifies the AutomationProvider to active the tab. | 70 // This message notifies the AutomationProvider to active the tab. |
| 63 // The first parameter is the handle to window resource. | 71 // The first parameter is the handle to window resource. |
| 64 // The second parameter is the (zero-based) index to be activated | 72 // The second parameter is the (zero-based) index to be activated |
| 65 IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_ActivateTab, int, int, int) | 73 IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_ActivateTab, int, int, int) |
| 66 | 74 |
| 67 // This message requests the cookie value for given url in the | 75 // This message requests the cookie value for given url in the |
| 68 // profile of the tab identified by the second parameter. The first | 76 // profile of the tab identified by the second parameter. The first |
| 69 // parameter is the URL string. The response contains the length of the | 77 // parameter is the URL string. The response contains the length of the |
| 70 // cookie value string. On failure, this length = -1. | 78 // cookie value string. On failure, this length = -1. |
| 71 IPC_SYNC_MESSAGE_ROUTED2_2(AutomationMsg_GetCookies, GURL, int, | 79 IPC_SYNC_MESSAGE_ROUTED2_2(AutomationMsg_GetCookies, GURL, int, |
| 72 int, std::string) | 80 int, std::string) |
| 73 | 81 |
| 74 // This message notifies the AutomationProvider to set and broadcast a cookie | 82 // This message notifies the AutomationProvider to set and broadcast a cookie |
| 75 // with given name and value for the given url in the profile of the tab | 83 // with given name and value for the given url in the profile of the tab |
| 76 // identified by the third parameter. The first parameter is the URL | 84 // identified by the third parameter. The first parameter is the URL |
| 77 // string, and the second parameter is the cookie name and value to be set. | 85 // string, and the second parameter is the cookie name and value to be set. |
| 78 // The return value is a non-negative value on success. | 86 // The return value is a non-negative value on success. |
| 79 IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_SetCookie, GURL, std::string, | 87 IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_SetCookie, GURL, std::string, |
| 80 int, int) | 88 int, int) |
| 81 | 89 |
| 82 // This message notifies the AutomationProvider to navigate to a specified | 90 // This message notifies the AutomationProvider to navigate to a specified |
| 83 // url in the tab with given handle. The first parameter is the handle to | 91 // url in the tab with given handle. The first parameter is the handle to |
| 84 // the tab resource. The second parameter is the target url. The return | 92 // the tab resource. The second parameter is the target url. The return |
| 85 // value contains a status code which is nonnegative on success. | 93 // value contains a status code which is nonnegative on success. |
| 86 // See AutomationMsg_NavigationResponseValues for the return value. | 94 // See AutomationMsg_NavigationResponseValues for the return value. |
| 87 // | 95 // |
| 88 // Deprecated in favor of | 96 // Deprecated in favor of |
| 89 // AutomationMsg_NavigateToURLBlockUntilNavigationsComplete. | 97 // AutomationMsg_NavigateToURLBlockUntilNavigationsComplete. |
| 90 // TODO(phajdan.jr): Remove when the reference build gets updated. | 98 // TODO(phajdan.jr): Remove when the reference build gets updated. |
| 91 IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_NavigateToURL, int, GURL, | 99 IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_NavigateToURL, int, GURL, |
| 92 AutomationMsg_NavigationResponseValues) | 100 AutomationMsg_NavigationResponseValues) |
| 93 | 101 |
| 94 // This message is used to implement the asynchronous version of | 102 // This message is used to implement the asynchronous version of |
| 95 // NavigateToURL. | 103 // NavigateToURL. |
| 96 IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_NavigationAsync, | 104 IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_NavigationAsync, |
| 97 int /* tab handle */, | 105 int /* tab handle */, |
| 98 GURL, | 106 GURL, |
| 99 bool /* result */) | 107 bool /* result */) |
| 100 | 108 |
| 101 // This message notifies the AutomationProvider to navigate back in session | 109 // This message notifies the AutomationProvider to navigate back in session |
| 102 // history in the tab with given handle. The first parameter is the handle | 110 // history in the tab with given handle. The first parameter is the handle |
| 103 // to the tab resource. | 111 // to the tab resource. |
| 104 // See AutomationMsg_NavigationResponseValues for the navigation response | 112 // See AutomationMsg_NavigationResponseValues for the navigation response |
| 105 // values. | 113 // values. |
| 106 // | 114 // |
| 107 // Deprecated in favor of AutomationMsg_GoBackBlockUntilNavigationsComplete. | 115 // Deprecated in favor of AutomationMsg_GoBackBlockUntilNavigationsComplete. |
| 108 // TODO(phajdan.jr): Remove when the reference build gets updated. | 116 // TODO(phajdan.jr): Remove when the reference build gets updated. |
| 109 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_GoBack, int, | 117 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_GoBack, int, |
| 110 AutomationMsg_NavigationResponseValues) | 118 AutomationMsg_NavigationResponseValues) |
| 111 | 119 |
| 112 // This message notifies the AutomationProvider to navigate forward in session | 120 // This message notifies the AutomationProvider to navigate forward in session |
| 113 // history in the tab with given handle. The first parameter is the handle | 121 // history in the tab with given handle. The first parameter is the handle |
| 114 // to the tab resource. | 122 // to the tab resource. |
| 115 // See AutomationMsg_NavigationResponseValues for the navigation response | 123 // See AutomationMsg_NavigationResponseValues for the navigation response |
| 116 // values. | 124 // values. |
| 117 // | 125 // |
| 118 // Deprecated in favor of | 126 // Deprecated in favor of |
| 119 // AutomationMsg_GoForwardBlockUntilNavigationsComplete. | 127 // AutomationMsg_GoForwardBlockUntilNavigationsComplete. |
| 120 // TODO(phajdan.jr): Remove when the reference build gets updated. | 128 // TODO(phajdan.jr): Remove when the reference build gets updated. |
| 121 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_GoForward, int, | 129 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_GoForward, int, |
| 122 AutomationMsg_NavigationResponseValues) | 130 AutomationMsg_NavigationResponseValues) |
| 123 | 131 |
| 124 // This message requests the number of browser windows that the app currently | 132 // This message requests the number of browser windows that the app currently |
| 125 // has open. The return value is the number of windows. | 133 // has open. The return value is the number of windows. |
| 126 IPC_SYNC_MESSAGE_ROUTED0_1(AutomationMsg_BrowserWindowCount, int) | 134 IPC_SYNC_MESSAGE_ROUTED0_1(AutomationMsg_BrowserWindowCount, int) |
| 127 | 135 |
| 128 // This message requests the handle (int64 app-unique identifier) of the | 136 // This message requests the handle (int64 app-unique identifier) of the |
| 129 // window with the given (zero-based) index. On error, the returned handle | 137 // window with the given (zero-based) index. On error, the returned handle |
| 130 // value is 0. | 138 // value is 0. |
| 131 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_BrowserWindow, int, int) | 139 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_BrowserWindow, int, int) |
| 132 | 140 |
| 133 // This message requests the number of tabs in the window with the given | 141 // This message requests the number of tabs in the window with the given |
| 134 // handle. The return value contains the number of tabs, or -1 if the | 142 // handle. The return value contains the number of tabs, or -1 if the |
| 135 // request failed. | 143 // request failed. |
| 136 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_TabCount, int, int) | 144 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_TabCount, int, int) |
| 137 | 145 |
| 138 // This message requests the handle of the tab with the given (zero-based) | 146 // This message requests the handle of the tab with the given (zero-based) |
| 139 // index in the given app window. First parameter specifies the given window | 147 // index in the given app window. First parameter specifies the given window |
| 140 // handle, second specifies the given tab_index. On error, the returned handle | 148 // handle, second specifies the given tab_index. On error, the returned handle |
| 141 // value is 0. | 149 // value is 0. |
| 142 IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_Tab, int, int, int) | 150 IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_Tab, int, int, int) |
| 143 | 151 |
| 144 // This message requests the the title of the tab with the given handle. | 152 // This message requests the the title of the tab with the given handle. |
| 145 // The return value contains the size of the title string. On error, this | 153 // The return value contains the size of the title string. On error, this |
| 146 // value should be -1 and empty string. Note that the title can be empty in | 154 // value should be -1 and empty string. Note that the title can be empty in |
| 147 // which case the size would be 0. | 155 // which case the size would be 0. |
| 148 IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_TabTitle, | 156 IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_TabTitle, |
| 149 int, | 157 int, |
| 150 int, | 158 int, |
| 151 std::wstring) | 159 std::wstring) |
| 152 | 160 |
| 153 // This message requests the url of the tab with the given handle. | 161 // This message requests the url of the tab with the given handle. |
| 154 // The return value contains a success flag and the URL string. The URL will | 162 // The return value contains a success flag and the URL string. The URL will |
| 155 // be empty on failure, and it still may be empty on success. | 163 // be empty on failure, and it still may be empty on success. |
| 156 IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_TabURL, | 164 IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_TabURL, |
| 157 int /* tab handle */, | 165 int /* tab handle */, |
| 158 bool /* success flag */, | 166 bool /* success flag */, |
| 159 GURL) | 167 GURL) |
| 160 | 168 |
| 161 #if defined(OS_WIN) | 169 #if defined(OS_WIN) |
| 162 // TODO(estade): delete this unused message. | 170 // TODO(estade): delete this unused message. |
| 163 IPC_SYNC_MESSAGE_ROUTED0_0(AutomationMsg_WindowHWND) | 171 IPC_SYNC_MESSAGE_ROUTED0_0(AutomationMsg_WindowHWND) |
| 164 | 172 |
| 165 // This message requests the HWND of the tab that corresponds | 173 // This message requests the HWND of the tab that corresponds |
| 166 // to the given automation handle. | 174 // to the given automation handle. |
| 167 // The return value contains the HWND value, which is 0 if the call fails. | 175 // The return value contains the HWND value, which is 0 if the call fails. |
| 168 // | 176 // |
| 169 // TODO(estade): The only test that uses this message is | 177 // TODO(estade): The only test that uses this message is |
| 170 // NPAPIVisiblePluginTester.SelfDeletePluginInvokeInSynchronousMouseMove. It | 178 // NPAPIVisiblePluginTester.SelfDeletePluginInvokeInSynchronousMouseMove. It |
| 171 // can probably be done in another way, and this can be removed. | 179 // can probably be done in another way, and this can be removed. |
| 172 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_TabHWND, | 180 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_TabHWND, |
| 173 int /* tab_handle */, | 181 int /* tab_handle */, |
| 174 HWND /* win32 Window Handle */) | 182 HWND /* win32 Window Handle */) |
| 175 #endif // defined(OS_WIN) | 183 #endif // defined(OS_WIN) |
| 176 | 184 |
| 177 // This message notifies the AutomationProxy that a handle that it has | 185 // This message notifies the AutomationProxy that a handle that it has |
| 178 // previously been given is now invalid. (For instance, if the handle | 186 // previously been given is now invalid. (For instance, if the handle |
| 179 // represented a window which has now been closed.) The parameter | 187 // represented a window which has now been closed.) The parameter |
| 180 // value is the handle. | 188 // value is the handle. |
| 181 IPC_MESSAGE_ROUTED1(AutomationMsg_InvalidateHandle, int) | 189 IPC_MESSAGE_ROUTED1(AutomationMsg_InvalidateHandle, int) |
| 182 | 190 |
| 183 // This message notifies the AutomationProvider that a handle is no | 191 // This message notifies the AutomationProvider that a handle is no |
| 184 // longer being used, so it can stop paying attention to the | 192 // longer being used, so it can stop paying attention to the |
| 185 // associated resource. The parameter value is the handle. | 193 // associated resource. The parameter value is the handle. |
| 186 IPC_MESSAGE_ROUTED1(AutomationMsg_HandleUnused, int) | 194 IPC_MESSAGE_ROUTED1(AutomationMsg_HandleUnused, int) |
| 187 | 195 |
| 188 // This message tells the AutomationProvider to provide the given | 196 // This message tells the AutomationProvider to provide the given |
| 189 // authentication data to the specified tab, in response to an HTTP/FTP | 197 // authentication data to the specified tab, in response to an HTTP/FTP |
| 190 // authentication challenge. | 198 // authentication challenge. |
| 191 IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_SetAuth, | 199 IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_SetAuth, |
| 192 int, // tab handle | 200 int, // tab handle |
| 193 std::wstring, // username | 201 std::wstring, // username |
| 194 std::wstring, // password | 202 std::wstring, // password |
| 195 AutomationMsg_NavigationResponseValues) // status | 203 AutomationMsg_NavigationResponseValues) // status |
| 196 | 204 |
| 197 // This message tells the AutomationProvider to cancel the login in the | 205 // This message tells the AutomationProvider to cancel the login in the |
| 198 // specified tab. | 206 // specified tab. |
| 199 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_CancelAuth, | 207 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_CancelAuth, |
| 200 int, // tab handle | 208 int, // tab handle |
| 201 AutomationMsg_NavigationResponseValues) // status | 209 AutomationMsg_NavigationResponseValues) // status |
| 202 | 210 |
| 203 // Requests that the automation provider ask history for the most recent | 211 // Requests that the automation provider ask history for the most recent |
| 204 // chain of redirects coming from the given URL. The response must be | 212 // chain of redirects coming from the given URL. The response must be |
| 205 // decoded by the caller manually; it contains an integer indicating the | 213 // decoded by the caller manually; it contains an integer indicating the |
| 206 // number of URLs, followed by that many wstrings indicating a chain of | 214 // number of URLs, followed by that many wstrings indicating a chain of |
| 207 // redirects. On failure, the count will be negative. | 215 // redirects. On failure, the count will be negative. |
| 208 IPC_SYNC_MESSAGE_ROUTED2_2(AutomationMsg_RedirectsFrom, | 216 IPC_SYNC_MESSAGE_ROUTED2_2(AutomationMsg_RedirectsFrom, |
| 209 int, // tab handle | 217 int, // tab handle |
| 210 GURL, // source URL | 218 GURL, // source URL |
| 211 bool /* succeeded */, | 219 bool /* succeeded */, |
| 212 std::vector<GURL> /* redirects */) | 220 std::vector<GURL> /* redirects */) |
| 213 | 221 |
| 214 // This message asks the AutomationProvider whether a tab is waiting for | 222 // This message asks the AutomationProvider whether a tab is waiting for |
| 215 // login info. | 223 // login info. |
| 216 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_NeedsAuth, | 224 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_NeedsAuth, |
| 217 int, // tab handle | 225 int, // tab handle |
| 218 bool) // status | 226 bool) // status |
| 219 | 227 |
| 220 // This message requests the AutomationProvider to apply a certain | 228 // This message requests the AutomationProvider to apply a certain |
| 221 // accelerator. It is completely asynchronous with the resulting accelerator | 229 // accelerator. It is completely asynchronous with the resulting accelerator |
| 222 // action. | 230 // action. |
| 223 IPC_SYNC_MESSAGE_ROUTED2_0(AutomationMsg_ApplyAccelerator, | 231 IPC_SYNC_MESSAGE_ROUTED2_0(AutomationMsg_ApplyAccelerator, |
| 224 int, // window handle | 232 int, // window handle |
| 225 int) // accelerator id like (IDC_BACK, | 233 int) // accelerator id like (IDC_BACK, |
| 226 // IDC_FORWARD, etc) | 234 // IDC_FORWARD, etc) |
| 227 // The list can be found at | 235 // The list can be found at |
| 228 // chrome/app/chrome_command_ids.h | 236 // chrome/app/chrome_command_ids.h |
| 229 | 237 |
| 230 // This message requests that the AutomationProvider executes a JavaScript, | 238 // This message requests that the AutomationProvider executes a JavaScript, |
| 231 // which is sent embedded in a 'javascript:' URL. | 239 // which is sent embedded in a 'javascript:' URL. |
| 232 // The javascript is executed in context of child frame whose xpath | 240 // The javascript is executed in context of child frame whose xpath |
| 233 // is passed as parameter (context_frame). The execution results in | 241 // is passed as parameter (context_frame). The execution results in |
| 234 // a serialized JSON string response. | 242 // a serialized JSON string response. |
| 235 IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_DomOperation, | 243 IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_DomOperation, |
| 236 int, // tab handle | 244 int, // tab handle |
| 237 std::wstring, // context_frame | 245 std::wstring, // context_frame |
| 238 std::wstring, // the javascript to be executed | 246 std::wstring, // the javascript to be executed |
| 239 std::string) // the serialized json string | 247 std::string) // the serialized json string |
| 240 // containing the result of a | 248 // containing the result of a |
| 241 // javascript execution | 249 // javascript execution |
| 242 | 250 |
| 243 // Is the Download Shelf visible for the specified browser? | 251 // Is the Download Shelf visible for the specified browser? |
| 244 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_ShelfVisibility, | 252 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_ShelfVisibility, |
| 245 int /* browser_handle */, | 253 int /* browser_handle */, |
| 246 bool /* is_visible */) | 254 bool /* is_visible */) |
| 247 | 255 |
| 248 // This message requests the number of constrained windows in the tab with | 256 // This message requests the number of constrained windows in the tab with |
| 249 // the given handle. The return value contains the number of constrained | 257 // the given handle. The return value contains the number of constrained |
| 250 // windows, or -1 if the request failed. | 258 // windows, or -1 if the request failed. |
| 251 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_ConstrainedWindowCount, | 259 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_ConstrainedWindowCount, |
| 252 int /* tab_handle */, | 260 int /* tab_handle */, |
| 253 int /* constrained_window_count */) | 261 int /* constrained_window_count */) |
| 254 | 262 |
| 255 // This message requests the bounds of the specified View element in | 263 // This message requests the bounds of the specified View element in |
| 256 // window coordinates. | 264 // window coordinates. |
| 257 // Request: | 265 // Request: |
| 258 // int - the handle of the window in which the view appears | 266 // int - the handle of the window in which the view appears |
| 259 // int - the ID of the view, as specified in chrome/browser/ui/view_ids.h | 267 // int - the ID of the view, as specified in chrome/browser/ui/view_ids.h |
| 260 // bool - whether the bounds should be returned in the screen coordinates | 268 // bool - whether the bounds should be returned in the screen coordinates |
| 261 // (if true) or in the browser coordinates (if false). | 269 // (if true) or in the browser coordinates (if false). |
| 262 // Response: | 270 // Response: |
| 263 // bool - true if the view was found | 271 // bool - true if the view was found |
| 264 // gfx::Rect - the bounds of the view, in window coordinates | 272 // gfx::Rect - the bounds of the view, in window coordinates |
| 265 IPC_SYNC_MESSAGE_ROUTED3_2(AutomationMsg_WindowViewBounds, int, int, | 273 IPC_SYNC_MESSAGE_ROUTED3_2(AutomationMsg_WindowViewBounds, int, int, |
| 266 bool, bool, gfx::Rect) | 274 bool, bool, gfx::Rect) |
| 267 | 275 |
| 268 // This message sets the bounds of the window. | 276 // This message sets the bounds of the window. |
| 269 // Request: | 277 // Request: |
| 270 // int - the handle of the window to resize | 278 // int - the handle of the window to resize |
| 271 // gfx::Rect - the bounds of the window | 279 // gfx::Rect - the bounds of the window |
| 272 // Response: | 280 // Response: |
| 273 // bool - true if the resize was successful | 281 // bool - true if the resize was successful |
| 274 IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_SetWindowBounds, int, gfx::Rect, | 282 IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_SetWindowBounds, int, gfx::Rect, |
| 275 bool) | 283 bool) |
| 276 | 284 |
| 277 #if defined(OS_WIN) | 285 #if defined(OS_WIN) |
| 278 // TODO(port): Port these messages. | 286 // TODO(port): Port these messages. |
| 279 // | 287 // |
| 280 // This message requests that a drag be performed in window coordinate space | 288 // This message requests that a drag be performed in window coordinate space |
| 281 // Request: | 289 // Request: |
| 282 // int - the handle of the window that's the context for this drag | 290 // int - the handle of the window that's the context for this drag |
| 283 // std::vector<gfx::Point> - the path of the drag in window coordinate | 291 // std::vector<gfx::Point> - the path of the drag in window coordinate |
| 284 // space; it should have at least 2 points | 292 // space; it should have at least 2 points |
| 285 // (start and end) | 293 // (start and end) |
| 286 // int - the flags which identify the mouse button(s) for the drag, as | 294 // int - the flags which identify the mouse button(s) for the drag, as |
| 287 // defined in chrome/views/event.h | 295 // defined in chrome/views/event.h |
| 288 // Response: | 296 // Response: |
| 289 // bool - true if the drag could be performed | 297 // bool - true if the drag could be performed |
| 290 IPC_SYNC_MESSAGE_ROUTED4_1(AutomationMsg_WindowDrag, | 298 IPC_SYNC_MESSAGE_ROUTED4_1(AutomationMsg_WindowDrag, |
| 291 int, std::vector<gfx::Point>, int, bool, bool) | 299 int, std::vector<gfx::Point>, int, bool, bool) |
| 292 #endif // defined(OS_WIN) | 300 #endif // defined(OS_WIN) |
| 293 | 301 |
| 294 // Similar to AutomationMsg_InitialLoadsComplete, this indicates that the | 302 // Similar to AutomationMsg_InitialLoadsComplete, this indicates that the |
| 295 // new tab ui has completed the initial load of its data. | 303 // new tab ui has completed the initial load of its data. |
| 296 // Time is how many milliseconds the load took. | 304 // Time is how many milliseconds the load took. |
| 297 IPC_MESSAGE_ROUTED1(AutomationMsg_InitialNewTabUILoadComplete, | 305 IPC_MESSAGE_ROUTED1(AutomationMsg_InitialNewTabUILoadComplete, |
| 298 int /* time */) | 306 int /* time */) |
| 299 | 307 |
| 300 // This message starts a find within a tab corresponding to the supplied | 308 // This message starts a find within a tab corresponding to the supplied |
| 301 // tab handle. The return value contains the number of matches found on the | 309 // tab handle. The return value contains the number of matches found on the |
| 302 // page within the tab specified. The parameter 'search_string' specifies | 310 // page within the tab specified. The parameter 'search_string' specifies |
| 303 // what string to search for, 'forward' specifies whether to search in | 311 // what string to search for, 'forward' specifies whether to search in |
| 304 // forward direction (1=forward, 0=back), 'match_case' specifies case | 312 // forward direction (1=forward, 0=back), 'match_case' specifies case |
| 305 // sensitivity | 313 // sensitivity |
| 306 // (1=case sensitive, 0=case insensitive). If an error occurs, matches_found | 314 // (1=case sensitive, 0=case insensitive). If an error occurs, matches_found |
| 307 // will be -1. | 315 // will be -1. |
| 308 // | 316 // |
| 309 // NOTE: This message has been deprecated, please use the new message | 317 // NOTE: This message has been deprecated, please use the new message |
| 310 // AutomationMsg_Find below. | 318 // AutomationMsg_Find below. |
| 311 // | 319 // |
| 312 IPC_SYNC_MESSAGE_ROUTED4_2(AutomationMsg_FindInPage, // DEPRECATED. | 320 IPC_SYNC_MESSAGE_ROUTED4_2(AutomationMsg_FindInPage, // DEPRECATED. |
| 313 int, /* tab_handle */ | 321 int, /* tab_handle */ |
| 314 std::wstring, /* find_request */ | 322 std::wstring, /* find_request */ |
| 315 int, /* forward */ | 323 int, /* forward */ |
| 316 int /* match_case */, | 324 int /* match_case */, |
| 317 int /* active_ordinal */, | 325 int /* active_ordinal */, |
| 318 int /* matches_found */) | 326 int /* matches_found */) |
| 319 | 327 |
| 320 // This message sends a inspect element request for a given tab. The response | 328 // This message sends a inspect element request for a given tab. The response |
| 321 // contains the number of resources loaded by the inspector controller. | 329 // contains the number of resources loaded by the inspector controller. |
| 322 IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_InspectElement, | 330 IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_InspectElement, |
| 323 int, /* tab_handle */ | 331 int, /* tab_handle */ |
| 324 int, /* x */ | 332 int, /* x */ |
| 325 int /* y */, | 333 int /* y */, |
| 326 int) | 334 int) |
| 327 | 335 |
| 328 // This message requests the process ID of the tab that corresponds | 336 // This message requests the process ID of the tab that corresponds |
| 329 // to the given automation handle. | 337 // to the given automation handle. |
| 330 // The return value has an integer corresponding to the PID of the tab's | 338 // The return value has an integer corresponding to the PID of the tab's |
| 331 // renderer, 0 if the tab currently has no renderer process, or -1 on error. | 339 // renderer, 0 if the tab currently has no renderer process, or -1 on error. |
| 332 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_TabProcessID, | 340 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_TabProcessID, |
| 333 int /* tab_handle */, | 341 int /* tab_handle */, |
| 334 int /* process ID */) | 342 int /* process ID */) |
| 335 | 343 |
| 336 // This tells the browser to enable or disable the filtered network layer. | 344 // This tells the browser to enable or disable the filtered network layer. |
| 337 IPC_MESSAGE_ROUTED1(AutomationMsg_SetFilteredInet, | 345 IPC_MESSAGE_ROUTED1(AutomationMsg_SetFilteredInet, |
| 338 bool /* enabled */) | 346 bool /* enabled */) |
| 339 | 347 |
| 340 // Gets the directory that downloads will occur in for the active profile. | 348 // Gets the directory that downloads will occur in for the active profile. |
| 341 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_DownloadDirectory, | 349 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_DownloadDirectory, |
| 342 int /* tab_handle */, | 350 int /* tab_handle */, |
| 343 FilePath /* directory */) | 351 FilePath /* directory */) |
| 344 | 352 |
| 345 // This message requests the id of the view that has the focus in the | 353 // This message requests the id of the view that has the focus in the |
| 346 // specified window. If no view is focused, -1 is returned. Note that the | 354 // specified window. If no view is focused, -1 is returned. Note that the |
| 347 // window should either be a ViewWindow or a Browser. | 355 // window should either be a ViewWindow or a Browser. |
| 348 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_GetFocusedViewID, | 356 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_GetFocusedViewID, |
| 349 int /* view_handle */, | 357 int /* view_handle */, |
| 350 int /* focused_view_id */) | 358 int /* focused_view_id */) |
| 351 | 359 |
| 352 // This message shows/hides the window. | 360 // This message shows/hides the window. |
| 353 IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_SetWindowVisible, | 361 IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_SetWindowVisible, |
| 354 int /* view_handle */, | 362 int /* view_handle */, |
| 355 bool /* visible */, | 363 bool /* visible */, |
| 356 bool /* success */) | 364 bool /* success */) |
| 357 | 365 |
| 358 // Gets the active status of a window. | 366 // Gets the active status of a window. |
| 359 IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_IsWindowActive, | 367 IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_IsWindowActive, |
| 360 int /* view_handle */, | 368 int /* view_handle */, |
| 361 bool /* success */, | 369 bool /* success */, |
| 362 bool /* active */) | 370 bool /* active */) |
| 363 | 371 |
| 364 // Makes the specified window the active window. | 372 // Makes the specified window the active window. |
| 365 IPC_SYNC_MESSAGE_ROUTED1_0(AutomationMsg_ActivateWindow, | 373 IPC_SYNC_MESSAGE_ROUTED1_0(AutomationMsg_ActivateWindow, |
| 366 int /* view_handle */) | 374 int /* view_handle */) |
| 367 | 375 |
| 368 // Opens a new browser window. | 376 // Opens a new browser window. |
| 369 // TODO(sky): remove this and replace with OpenNewBrowserWindowOfType. | 377 // TODO(sky): remove this and replace with OpenNewBrowserWindowOfType. |
| 370 // Doing this requires updating the reference build. | 378 // Doing this requires updating the reference build. |
| 371 IPC_SYNC_MESSAGE_ROUTED1_0(AutomationMsg_OpenNewBrowserWindow, | 379 IPC_SYNC_MESSAGE_ROUTED1_0(AutomationMsg_OpenNewBrowserWindow, |
| 372 bool /* show */ ) | 380 bool /* show */ ) |
| 373 | 381 |
| 374 // This message requests the handle (int64 app-unique identifier) of the | 382 // This message requests the handle (int64 app-unique identifier) of the |
| 375 // current active top window. On error, the returned handle value is 0. | 383 // current active top window. On error, the returned handle value is 0. |
| 376 IPC_SYNC_MESSAGE_ROUTED0_1(AutomationMsg_ActiveWindow, int) | 384 IPC_SYNC_MESSAGE_ROUTED0_1(AutomationMsg_ActiveWindow, int) |
| 377 | 385 |
| 378 // This message requests the browser associated with the specified window | 386 // This message requests the browser associated with the specified window |
| 379 // handle. | 387 // handle. |
| 380 // The return value contains a success flag and the handle of the browser. | 388 // The return value contains a success flag and the handle of the browser. |
| 381 IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_BrowserForWindow, | 389 IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_BrowserForWindow, |
| 382 int /* window handle */, | 390 int /* window handle */, |
| 383 bool /* success flag */, | 391 bool /* success flag */, |
| 384 int /* browser handle */) | 392 int /* browser handle */) |
| 385 | 393 |
| 386 // This message requests the window associated with the specified browser | 394 // This message requests the window associated with the specified browser |
| 387 // handle. | 395 // handle. |
| 388 // The return value contains a success flag and the handle of the window. | 396 // The return value contains a success flag and the handle of the window. |
| 389 IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_WindowForBrowser, | 397 IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_WindowForBrowser, |
| 390 int /* browser handle */, | 398 int /* browser handle */, |
| 391 bool /* success flag */, | 399 bool /* success flag */, |
| 392 int /* window handle */) | 400 int /* window handle */) |
| 393 | 401 |
| 394 // This message requests the AutocompleteEdit associated with the specified | 402 // This message requests the AutocompleteEdit associated with the specified |
| 395 // browser handle. | 403 // browser handle. |
| 396 // The return value contains a success flag and the handle of the omnibox. | 404 // The return value contains a success flag and the handle of the omnibox. |
| 397 IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_AutocompleteEditForBrowser, | 405 IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_AutocompleteEditForBrowser, |
| 398 int /* browser handle */, | 406 int /* browser handle */, |
| 399 bool /* success flag */, | 407 bool /* success flag */, |
| 400 int /* AutocompleteEdit handle */) | 408 int /* AutocompleteEdit handle */) |
| 401 | 409 |
| 402 #if defined(OS_WIN) | 410 #if defined(OS_WIN) |
| 403 // TODO(estade): This message is defined later on for Mac and Linux. This is | 411 // TODO(estade): This message is defined later on for Mac and Linux. This is |
| 404 // to avoid adding a new IPC in the middle for those platforms (see comment | 412 // to avoid adding a new IPC in the middle for those platforms (see comment |
| 405 // at top). The message is exactly the same, so they should be remerged when | 413 // at top). The message is exactly the same, so they should be remerged when |
| 406 // all messages in this file have been made cross-platform (at which point we | 414 // all messages in this file have been made cross-platform (at which point we |
| 407 // will need to check in new reference builds). | 415 // will need to check in new reference builds). |
| 408 // | 416 // |
| 409 // This message requests that a mouse click be performed in window coordinate | 417 // This message requests that a mouse click be performed in window coordinate |
| 410 // space. | 418 // space. |
| 411 // Request: | 419 // Request: |
| 412 // int - the handle of the window that's the context for this click | 420 // int - the handle of the window that's the context for this click |
| 413 // gfx::Point - the point to click | 421 // gfx::Point - the point to click |
| 414 // int - the flags which identify the mouse button(s) for the click, as | 422 // int - the flags which identify the mouse button(s) for the click, as |
| 415 // defined in chrome/views/event.h | 423 // defined in chrome/views/event.h |
| 416 IPC_MESSAGE_ROUTED3(AutomationMsg_WindowClick, int, gfx::Point, int) | 424 IPC_MESSAGE_ROUTED3(AutomationMsg_WindowClick, int, gfx::Point, int) |
| 417 #endif // defined(OS_WIN) | 425 #endif // defined(OS_WIN) |
| 418 | 426 |
| 419 // This message requests that a key press be performed. | 427 // This message requests that a key press be performed. |
| 420 // Request: | 428 // Request: |
| 421 // int - the handle of the window that's the context for this click | 429 // int - the handle of the window that's the context for this click |
| 422 // int - the app::KeyboardCode of the key that was pressed. | 430 // int - the app::KeyboardCode of the key that was pressed. |
| 423 // int - the flags which identify the modifiers (shift, ctrl, alt) | 431 // int - the flags which identify the modifiers (shift, ctrl, alt) |
| 424 // associated for, as defined in chrome/views/event.h | 432 // associated for, as defined in chrome/views/event.h |
| 425 IPC_MESSAGE_ROUTED3(AutomationMsg_WindowKeyPress, int, int, int) | 433 IPC_MESSAGE_ROUTED3(AutomationMsg_WindowKeyPress, int, int, int) |
| 426 | 434 |
| 427 // This message notifies the AutomationProvider to create a tab which is | 435 // This message notifies the AutomationProvider to create a tab which is |
| 428 // hosted by an external process. | 436 // hosted by an external process. |
| 429 // Request: | 437 // Request: |
| 430 // ExternalTabSettings - settings for external tab | 438 // ExternalTabSettings - settings for external tab |
| 431 IPC_SYNC_MESSAGE_ROUTED1_4(AutomationMsg_CreateExternalTab, | 439 IPC_SYNC_MESSAGE_ROUTED1_4(AutomationMsg_CreateExternalTab, |
| 432 IPC::ExternalTabSettings /* settings*/, | 440 IPC::ExternalTabSettings /* settings*/, |
| 433 gfx::NativeWindow /* Tab container window */, | 441 gfx::NativeWindow /* Tab container window */, |
| 434 gfx::NativeWindow /* Tab window */, | 442 gfx::NativeWindow /* Tab window */, |
| 435 int /* Handle to the new tab */, | 443 int /* Handle to the new tab */, |
| 436 int /* Session Id of the new tab */) | 444 int /* Session Id of the new tab */) |
| 437 | 445 |
| 438 // This message notifies the AutomationProvider to navigate to a specified | 446 // This message notifies the AutomationProvider to navigate to a specified |
| 439 // url in the external tab with given handle. The first parameter is the | 447 // url in the external tab with given handle. The first parameter is the |
| 440 // handle to the tab resource. The second parameter is the target url. | 448 // handle to the tab resource. The second parameter is the target url. |
| 441 // The third parameter is the referrer. | 449 // The third parameter is the referrer. |
| 442 // The return value contains a status code which is nonnegative on success. | 450 // The return value contains a status code which is nonnegative on success. |
| 443 // see AutomationMsg_NavigationResponseValues for the navigation response. | 451 // see AutomationMsg_NavigationResponseValues for the navigation response. |
| 444 IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_NavigateInExternalTab, | 452 IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_NavigateInExternalTab, |
| 445 int, | 453 int, |
| 446 GURL, | 454 GURL, |
| 447 GURL, | 455 GURL, |
| 448 AutomationMsg_NavigationResponseValues) | 456 AutomationMsg_NavigationResponseValues) |
| 449 | 457 |
| 450 // This message is an outgoing message from Chrome to an external host. | 458 // This message is an outgoing message from Chrome to an external host. |
| 451 // It is a notification that the NavigationState was changed | 459 // It is a notification that the NavigationState was changed |
| 452 // Request: | 460 // Request: |
| 453 // -int: The flags specifying what changed | 461 // -int: The flags specifying what changed |
| 454 // (see TabContents::InvalidateTypes) | 462 // (see TabContents::InvalidateTypes) |
| 455 // Response: | 463 // Response: |
| 456 // None expected | 464 // None expected |
| 457 IPC_MESSAGE_ROUTED3(AutomationMsg_NavigationStateChanged, | 465 IPC_MESSAGE_ROUTED3(AutomationMsg_NavigationStateChanged, |
| 458 int, // tab handle | 466 int, // tab handle |
| 459 int, // TabContents::InvalidateTypes | 467 int, // TabContents::InvalidateTypes |
| 460 IPC::NavigationInfo) // title, url etc. | 468 IPC::NavigationInfo) // title, url etc. |
| 461 | 469 |
| 462 // This message is an outgoing message from Chrome to an external host. | 470 // This message is an outgoing message from Chrome to an external host. |
| 463 // It is a notification that the target URL has changed (the target URL | 471 // It is a notification that the target URL has changed (the target URL |
| 464 // is the URL of the link that the user is hovering on) | 472 // is the URL of the link that the user is hovering on) |
| 465 // Request: | 473 // Request: |
| 466 // -int: The tab handle | 474 // -int: The tab handle |
| 467 // -std::wstring: The new target URL | 475 // -std::wstring: The new target URL |
| 468 // Response: | 476 // Response: |
| 469 // None expected | 477 // None expected |
| 470 IPC_MESSAGE_ROUTED2(AutomationMsg_UpdateTargetUrl, int, std::wstring) | 478 IPC_MESSAGE_ROUTED2(AutomationMsg_UpdateTargetUrl, int, std::wstring) |
| 471 | 479 |
| 472 // This message notifies the AutomationProvider to show the specified html | 480 // This message notifies the AutomationProvider to show the specified html |
| 473 // text in an interstitial page in the tab with given handle. The first | 481 // text in an interstitial page in the tab with given handle. The first |
| 474 // parameter is the handle to the tab resource. The second parameter is the | 482 // parameter is the handle to the tab resource. The second parameter is the |
| 475 // html text to be displayed. | 483 // html text to be displayed. |
| 476 // The return value contains a success flag. | 484 // The return value contains a success flag. |
| 477 IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_ShowInterstitialPage, | 485 IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_ShowInterstitialPage, |
| 478 int, | 486 int, |
| 479 std::string, | 487 std::string, |
| 480 AutomationMsg_NavigationResponseValues) | 488 AutomationMsg_NavigationResponseValues) |
| 481 | 489 |
| 482 // This message notifies the AutomationProvider to hide the current | 490 // This message notifies the AutomationProvider to hide the current |
| 483 // interstitial page in the tab with given handle. The parameter is the | 491 // interstitial page in the tab with given handle. The parameter is the |
| 484 // handle to the tab resource. | 492 // handle to the tab resource. |
| 485 // The return value contains a success flag. | 493 // The return value contains a success flag. |
| 486 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_HideInterstitialPage, int, | 494 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_HideInterstitialPage, int, |
| 487 bool) | 495 bool) |
| 488 | 496 |
| 489 // This message requests that a tab be closed. | 497 // This message requests that a tab be closed. |
| 490 // Request: | 498 // Request: |
| 491 // - int: handle of the tab to close | 499 // - int: handle of the tab to close |
| 492 // - bool: if true the proxy blocks until the tab has completely closed, | 500 // - bool: if true the proxy blocks until the tab has completely closed, |
| 493 // otherwise the proxy only blocks until it initiates the close. | 501 // otherwise the proxy only blocks until it initiates the close. |
| 494 IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_CloseTab, int, bool, bool) | 502 IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_CloseTab, int, bool, bool) |
| 495 | 503 |
| 496 // This message requests that the browser be closed. | 504 // This message requests that the browser be closed. |
| 497 // Request: | 505 // Request: |
| 498 // - int: handle of the browser which contains the tab | 506 // - int: handle of the browser which contains the tab |
| 499 // Response: | 507 // Response: |
| 500 // - bool: whether the operation was successfull. | 508 // - bool: whether the operation was successfull. |
| 501 // - bool: whether the browser process will be terminated as a result (if | 509 // - bool: whether the browser process will be terminated as a result (if |
| 502 // this was the last closed browser window). | 510 // this was the last closed browser window). |
| 503 IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_CloseBrowser, int, bool, | 511 IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_CloseBrowser, int, bool, |
| 504 bool) | 512 bool) |
| 505 | 513 |
| 506 IPC_MESSAGE_ROUTED1(AutomationMsg_CloseBrowserRequestAsync, int) | 514 IPC_MESSAGE_ROUTED1(AutomationMsg_CloseBrowserRequestAsync, int) |
| 507 | 515 |
| 508 // Unused. | 516 // Unused. |
| 509 // Response: | 517 // Response: |
| 510 // None expected | 518 // None expected |
| 511 IPC_MESSAGE_ROUTED1(AutomationMsg_Unused, int) | 519 IPC_MESSAGE_ROUTED1(AutomationMsg_Unused, int) |
| 512 | 520 |
| 513 #if defined(OS_WIN) | 521 #if defined(OS_WIN) |
| 514 // TODO(port): Port these messages. | 522 // TODO(port): Port these messages. |
| 515 // | 523 // |
| 516 // This message is an outgoing message from Chrome to an external host. | 524 // This message is an outgoing message from Chrome to an external host. |
| 517 // It is a request to process a keyboard accelerator. | 525 // It is a request to process a keyboard accelerator. |
| 518 // Request: | 526 // Request: |
| 519 // -int: Tab handle | 527 // -int: Tab handle |
| 520 // -MSG: The keyboard message | 528 // -MSG: The keyboard message |
| 521 // Response: | 529 // Response: |
| 522 // None expected | 530 // None expected |
| 523 // TODO(sanjeevr): Ideally we need to add a response from the external | 531 // TODO(sanjeevr): Ideally we need to add a response from the external |
| 524 // host saying whether it processed the accelerator | 532 // host saying whether it processed the accelerator |
| 525 IPC_MESSAGE_ROUTED2(AutomationMsg_HandleAccelerator, int, MSG) | 533 IPC_MESSAGE_ROUTED2(AutomationMsg_HandleAccelerator, int, MSG) |
| 526 | 534 |
| 527 // This message is sent by the container of an externally hosted tab to | 535 // This message is sent by the container of an externally hosted tab to |
| 528 // reflect any accelerator keys that it did not process. This gives the | 536 // reflect any accelerator keys that it did not process. This gives the |
| 529 // tab a chance to handle the keys | 537 // tab a chance to handle the keys |
| 530 // Request: | 538 // Request: |
| 531 // - int: handle of the tab | 539 // - int: handle of the tab |
| 532 // -MSG: The keyboard message that the container did not handle | 540 // -MSG: The keyboard message that the container did not handle |
| 533 // Response: | 541 // Response: |
| 534 // None expected | 542 // None expected |
| 535 IPC_MESSAGE_ROUTED2(AutomationMsg_ProcessUnhandledAccelerator, int, MSG) | 543 IPC_MESSAGE_ROUTED2(AutomationMsg_ProcessUnhandledAccelerator, int, MSG) |
| 536 #endif // defined(OS_WIN) | 544 #endif // defined(OS_WIN) |
| 537 | 545 |
| 538 // Sent by the external tab to the host to notify that the user has tabbed | 546 // Sent by the external tab to the host to notify that the user has tabbed |
| 539 // out of the tab. | 547 // out of the tab. |
| 540 // Request: | 548 // Request: |
| 541 // - int: Tab handle | 549 // - int: Tab handle |
| 542 // - bool: |reverse| set to true when shift-tabbing out of the tab, false | 550 // - bool: |reverse| set to true when shift-tabbing out of the tab, false |
| 543 // otherwise. | 551 // otherwise. |
| 544 // Response: | 552 // Response: |
| 545 // None expected | 553 // None expected |
| 546 IPC_MESSAGE_ROUTED2(AutomationMsg_TabbedOut, int, bool) | 554 IPC_MESSAGE_ROUTED2(AutomationMsg_TabbedOut, int, bool) |
| 547 | 555 |
| 548 // Sent by the external tab host to ask focus to be set to either the first | 556 // Sent by the external tab host to ask focus to be set to either the first |
| 549 // or last element on the page. | 557 // or last element on the page. |
| 550 // Request: | 558 // Request: |
| 551 // - int: handle of the tab | 559 // - int: handle of the tab |
| 552 // - bool: |reverse| | 560 // - bool: |reverse| |
| 553 // true: Focus will be set to the last focusable element | 561 // true: Focus will be set to the last focusable element |
| 554 // false: Focus will be set to the first focusable element | 562 // false: Focus will be set to the first focusable element |
| 555 // - bool: |restore_focus_to_view| | 563 // - bool: |restore_focus_to_view| |
| 556 // true: The renderer view associated with the current tab will be | 564 // true: The renderer view associated with the current tab will be |
| 557 // infomed that it is receiving focus. | 565 // infomed that it is receiving focus. |
| 558 // Response: | 566 // Response: |
| 559 // None expected | 567 // None expected |
| 560 IPC_MESSAGE_ROUTED3(AutomationMsg_SetInitialFocus, int, bool, bool) | 568 IPC_MESSAGE_ROUTED3(AutomationMsg_SetInitialFocus, int, bool, bool) |
| 561 | 569 |
| 562 // This message is an outgoing message from Chrome to an external host. | 570 // This message is an outgoing message from Chrome to an external host. |
| 563 // It is a request to open a url | 571 // It is a request to open a url |
| 564 // Request: | 572 // Request: |
| 565 // -int: Tab handle | 573 // -int: Tab handle |
| 566 // -GURL: The URL to open | 574 // -GURL: The URL to open |
| 567 // -GURL: The referrer | 575 // -GURL: The referrer |
| 568 // -int: The WindowOpenDisposition that specifies where the URL should | 576 // -int: The WindowOpenDisposition that specifies where the URL should |
| 569 // be opened (new tab, new window etc). | 577 // be opened (new tab, new window etc). |
| 570 // Response: | 578 // Response: |
| 571 // None expected | 579 // None expected |
| 572 IPC_MESSAGE_ROUTED4(AutomationMsg_OpenURL, int, GURL, GURL, int) | 580 IPC_MESSAGE_ROUTED4(AutomationMsg_OpenURL, int, GURL, GURL, int) |
| 573 | 581 |
| 574 // This message requests the provider to wait until the specified tab has | 582 // This message requests the provider to wait until the specified tab has |
| 575 // finished restoring after session restore. | 583 // finished restoring after session restore. |
| 576 // Request: | 584 // Request: |
| 577 // - int: handle of the tab | 585 // - int: handle of the tab |
| 578 // Response: | 586 // Response: |
| 579 // - bool: whether the operation was successful. | 587 // - bool: whether the operation was successful. |
| 580 IPC_SYNC_MESSAGE_ROUTED1_0(AutomationMsg_WaitForTabToBeRestored, int) | 588 IPC_SYNC_MESSAGE_ROUTED1_0(AutomationMsg_WaitForTabToBeRestored, int) |
| 581 | 589 |
| 582 // This message is an outgoing message from Chrome to an external host. | 590 // This message is an outgoing message from Chrome to an external host. |
| 583 // It is a notification that a navigation happened | 591 // It is a notification that a navigation happened |
| 584 // Request: | 592 // Request: |
| 585 // -int: Tab handle | 593 // -int: Tab handle |
| 586 // | 594 // |
| 587 // Response: | 595 // Response: |
| 588 // None expected | 596 // None expected |
| 589 IPC_MESSAGE_ROUTED2(AutomationMsg_DidNavigate, int, IPC::NavigationInfo) | 597 IPC_MESSAGE_ROUTED2(AutomationMsg_DidNavigate, int, IPC::NavigationInfo) |
| 590 | 598 |
| 591 // This message requests the different security states of the page displayed | 599 // This message requests the different security states of the page displayed |
| 592 // in the specified tab. | 600 // in the specified tab. |
| 593 // Request: | 601 // Request: |
| 594 // - int: handle of the tab | 602 // - int: handle of the tab |
| 595 // Response: | 603 // Response: |
| 596 // - bool: whether the operation was successful. | 604 // - bool: whether the operation was successful. |
| 597 // - SecurityStyle: the security style of the tab. | 605 // - SecurityStyle: the security style of the tab. |
| 598 // - int: the status of the server's ssl cert (0 means no errors or no ssl | 606 // - int: the status of the server's ssl cert (0 means no errors or no ssl |
| 599 // was used). | 607 // was used). |
| 600 // - int: the insecure content state, 0 means no insecure contents. | 608 // - int: the insecure content state, 0 means no insecure contents. |
| 601 | 609 |
| 602 IPC_SYNC_MESSAGE_ROUTED1_4(AutomationMsg_GetSecurityState, | 610 IPC_SYNC_MESSAGE_ROUTED1_4(AutomationMsg_GetSecurityState, |
| 603 int, | 611 int, |
| 604 bool, | 612 bool, |
| 605 SecurityStyle, | 613 SecurityStyle, |
| 606 int, | 614 int, |
| 607 int) | 615 int) |
| 608 | 616 |
| 609 // This message requests the page type of the page displayed in the specified | 617 // This message requests the page type of the page displayed in the specified |
| 610 // tab (normal, error or interstitial). | 618 // tab (normal, error or interstitial). |
| 611 // Request: | 619 // Request: |
| 612 // - int: handle of the tab | 620 // - int: handle of the tab |
| 613 // Response: | 621 // Response: |
| 614 // - bool: whether the operation was successful. | 622 // - bool: whether the operation was successful. |
| 615 // - PageType: the type of the page currently displayed. | 623 // - PageType: the type of the page currently displayed. |
| 616 IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_GetPageType, int, bool, PageType) | 624 IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_GetPageType, int, bool, PageType) |
| 617 | 625 |
| 618 // This message simulates the user action on the SSL blocking page showing in | 626 // This message simulates the user action on the SSL blocking page showing in |
| 619 // the specified tab. This message is only effective if an interstitial page | 627 // the specified tab. This message is only effective if an interstitial page |
| 620 // is showing in the tab. | 628 // is showing in the tab. |
| 621 // Request: | 629 // Request: |
| 622 // - int: handle of the tab | 630 // - int: handle of the tab |
| 623 // - bool: whether to proceed or abort the navigation | 631 // - bool: whether to proceed or abort the navigation |
| 624 // Response: | 632 // Response: |
| 625 // - AutomationMsg_NavigationResponseValues: result of the operation. | 633 // - AutomationMsg_NavigationResponseValues: result of the operation. |
| 626 IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_ActionOnSSLBlockingPage, int, bool, | 634 IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_ActionOnSSLBlockingPage, int, bool, |
| 627 AutomationMsg_NavigationResponseValues) | 635 AutomationMsg_NavigationResponseValues) |
| 628 | 636 |
| 629 // Message to request that a browser window is brought to the front and | 637 // Message to request that a browser window is brought to the front and |
| 630 // activated. | 638 // activated. |
| 631 // Request: | 639 // Request: |
| 632 // - int: handle of the browser window. | 640 // - int: handle of the browser window. |
| 633 // Response: | 641 // Response: |
| 634 // - bool: True if the browser is brought to the front. | 642 // - bool: True if the browser is brought to the front. |
| 635 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_BringBrowserToFront, int, bool) | 643 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_BringBrowserToFront, int, bool) |
| 636 | 644 |
| 637 // Message to request whether a certain item is enabled of disabled in the | 645 // Message to request whether a certain item is enabled of disabled in the |
| 638 // menu in the browser window | 646 // menu in the browser window |
| 639 // | 647 // |
| 640 // Request: | 648 // Request: |
| 641 // - int: handle of the browser window. | 649 // - int: handle of the browser window. |
| 642 // - int: IDC message identifier to query if enabled | 650 // - int: IDC message identifier to query if enabled |
| 643 // Response: | 651 // Response: |
| 644 // - bool: True if the command is enabled on the menu | 652 // - bool: True if the command is enabled on the menu |
| 645 IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_IsMenuCommandEnabled, int, int, bool) | 653 IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_IsMenuCommandEnabled, int, int, bool) |
| 646 | 654 |
| 647 // This message notifies the AutomationProvider to print the tab with given | 655 // This message notifies the AutomationProvider to print the tab with given |
| 648 // handle. The first parameter is the handle to the tab resource. The | 656 // handle. The first parameter is the handle to the tab resource. The |
| 649 // return value contains a bool which is true on success. | 657 // return value contains a bool which is true on success. |
| 650 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_PrintNow, int, bool) | 658 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_PrintNow, int, bool) |
| 651 | 659 |
| 652 // This message notifies the AutomationProvider to reload the current page in | 660 // This message notifies the AutomationProvider to reload the current page in |
| 653 // the tab with given handle. The first parameter is the handle to the tab | 661 // the tab with given handle. The first parameter is the handle to the tab |
| 654 // resource. The return value contains a status code which is nonnegative on | 662 // resource. The return value contains a status code which is nonnegative on |
| 655 // success. | 663 // success. |
| 656 // see AutomationMsg_NavigationResponseValues for the navigation response. | 664 // see AutomationMsg_NavigationResponseValues for the navigation response. |
| 657 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_Reload, int, | 665 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_Reload, int, |
| 658 AutomationMsg_NavigationResponseValues) | 666 AutomationMsg_NavigationResponseValues) |
| 659 | 667 |
| 660 // This message requests the handle (int64 app-unique identifier) of the | 668 // This message requests the handle (int64 app-unique identifier) of the |
| 661 // last active browser window, or the browser at index 0 if there is no last | 669 // last active browser window, or the browser at index 0 if there is no last |
| 662 // active browser, or it no longer exists. Returns 0 if no browser windows | 670 // active browser, or it no longer exists. Returns 0 if no browser windows |
| 663 // exist. | 671 // exist. |
| 664 IPC_SYNC_MESSAGE_ROUTED0_1(AutomationMsg_LastActiveBrowserWindow, int) | 672 IPC_SYNC_MESSAGE_ROUTED0_1(AutomationMsg_LastActiveBrowserWindow, int) |
| 665 | 673 |
| 666 // This message notifies the AutomationProvider to save the page with given | 674 // This message notifies the AutomationProvider to save the page with given |
| 667 // handle. The first parameter is the handle to the tab resource. The second | 675 // handle. The first parameter is the handle to the tab resource. The second |
| 668 // parameter is the main HTML file name. The third parameter is the directory | 676 // parameter is the main HTML file name. The third parameter is the directory |
| 669 // for saving resources. The fourth parameter is the saving type: 0 for HTML | 677 // for saving resources. The fourth parameter is the saving type: 0 for HTML |
| 670 // only; 1 for complete web page. | 678 // only; 1 for complete web page. |
| 671 // The return value contains a bool which is true on success. | 679 // The return value contains a bool which is true on success. |
| 672 IPC_SYNC_MESSAGE_ROUTED4_1(AutomationMsg_SavePage, int, FilePath, FilePath, | 680 IPC_SYNC_MESSAGE_ROUTED4_1(AutomationMsg_SavePage, int, FilePath, FilePath, |
| 673 int, bool) | 681 int, bool) |
| 674 | 682 |
| 675 // This message requests the text currently being displayed in the | 683 // This message requests the text currently being displayed in the |
| 676 // AutocompleteEdit. The parameter is the handle to the AutocompleteEdit. | 684 // AutocompleteEdit. The parameter is the handle to the AutocompleteEdit. |
| 677 // The return value is a string indicating the text in the AutocompleteEdit. | 685 // The return value is a string indicating the text in the AutocompleteEdit. |
| 678 IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_AutocompleteEditGetText, | 686 IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_AutocompleteEditGetText, |
| 679 int /* autocomplete edit handle */, | 687 int /* autocomplete edit handle */, |
| 680 bool /* the requested autocomplete edit exists */, | 688 bool /* the requested autocomplete edit exists */, |
| 681 std::wstring /* omnibox text */) | 689 std::wstring /* omnibox text */) |
| 682 | 690 |
| 683 // This message sets the text being displayed in the AutocompleteEdit. The | 691 // This message sets the text being displayed in the AutocompleteEdit. The |
| 684 // first parameter is the handle to the omnibox and the second parameter is | 692 // first parameter is the handle to the omnibox and the second parameter is |
| 685 // the text to be displayed in the AutocompleteEdit. | 693 // the text to be displayed in the AutocompleteEdit. |
| 686 // The return value has no parameters and is returned when the operation has | 694 // The return value has no parameters and is returned when the operation has |
| 687 // completed. | 695 // completed. |
| 688 IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_AutocompleteEditSetText, | 696 IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_AutocompleteEditSetText, |
| 689 int /* autocomplete edit handle */, | 697 int /* autocomplete edit handle */, |
| 690 std::wstring /* text to set */, | 698 std::wstring /* text to set */, |
| 691 bool /* the requested autocomplete edit exists */) | 699 bool /* the requested autocomplete edit exists */) |
| 692 | 700 |
| 693 // This message requests if a query to a autocomplete provider is still in | 701 // This message requests if a query to a autocomplete provider is still in |
| 694 // progress. The first parameter in the request is the handle to the | 702 // progress. The first parameter in the request is the handle to the |
| 695 // autocomplete edit. | 703 // autocomplete edit. |
| 696 // The first return value indicates if the request succeeded. | 704 // The first return value indicates if the request succeeded. |
| 697 // The second return value indicates if a query is still in progress. | 705 // The second return value indicates if a query is still in progress. |
| 698 IPC_SYNC_MESSAGE_ROUTED1_2( \ | 706 IPC_SYNC_MESSAGE_ROUTED1_2( \ |
| 699 AutomationMsg_AutocompleteEditIsQueryInProgress, | 707 AutomationMsg_AutocompleteEditIsQueryInProgress, |
| 700 int /* autocomplete edit handle*/, | 708 int /* autocomplete edit handle*/, |
| 701 bool /* the requested autocomplete edit exists */, | 709 bool /* the requested autocomplete edit exists */, |
| 702 bool /* indicates if a query is in progress */) | 710 bool /* indicates if a query is in progress */) |
| 703 | 711 |
| 704 // This message requests a list of the autocomplete messages currently being | 712 // This message requests a list of the autocomplete messages currently being |
| 705 // displayed by the popup. The parameter in the request is a handle to the | 713 // displayed by the popup. The parameter in the request is a handle to the |
| 706 // autocomplete edit. | 714 // autocomplete edit. |
| 707 // The first return value indicates if the request was successful, while | 715 // The first return value indicates if the request was successful, while |
| 708 // while the second is the actual list of matches. | 716 // while the second is the actual list of matches. |
| 709 IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_AutocompleteEditGetMatches, | 717 IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_AutocompleteEditGetMatches, |
| 710 int /* autocomplete edit handle*/, | 718 int /* autocomplete edit handle*/, |
| 711 bool /* the requested autocomplete edit exists */, | 719 bool /* the requested autocomplete edit exists */, |
| 712 std::vector<AutocompleteMatchData> /* matches */) | 720 std::vector<AutocompleteMatchData> /* matches */) |
| 713 | 721 |
| 714 // This message requests the execution of a browser command in the browser | 722 // This message requests the execution of a browser command in the browser |
| 715 // for which the handle is specified. | 723 // for which the handle is specified. |
| 716 // The return value contains a boolean, whether the command was dispatched. | 724 // The return value contains a boolean, whether the command was dispatched. |
| 717 IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_WindowExecuteCommandAsync, | 725 IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_WindowExecuteCommandAsync, |
| 718 int /* automation handle */, | 726 int /* automation handle */, |
| 719 int /* browser command */, | 727 int /* browser command */, |
| 720 bool /* success flag */) | 728 bool /* success flag */) |
| 721 | 729 |
| 722 // This message requests the execution of a browser command in the browser | 730 // This message requests the execution of a browser command in the browser |
| 723 // for which the handle is specified. | 731 // for which the handle is specified. |
| 724 // The return value contains a boolean, whether the command was dispatched | 732 // The return value contains a boolean, whether the command was dispatched |
| 725 // and successful executed. | 733 // and successful executed. |
| 726 IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_WindowExecuteCommand, | 734 IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_WindowExecuteCommand, |
| 727 int /* automation handle */, | 735 int /* automation handle */, |
| 728 int /* browser command */, | 736 int /* browser command */, |
| 729 bool /* success flag */) | 737 bool /* success flag */) |
| 730 | 738 |
| 731 | 739 |
| 732 // This message opens the Find window within a tab corresponding to the | 740 // This message opens the Find window within a tab corresponding to the |
| 733 // supplied tab handle. | 741 // supplied tab handle. |
| 734 IPC_MESSAGE_ROUTED1(AutomationMsg_OpenFindInPage, | 742 IPC_MESSAGE_ROUTED1(AutomationMsg_OpenFindInPage, |
| 735 int /* tab_handle */) | 743 int /* tab_handle */) |
| 736 | 744 |
| 737 // Posts a message from external host to chrome renderer. | 745 // Posts a message from external host to chrome renderer. |
| 738 IPC_MESSAGE_ROUTED4(AutomationMsg_HandleMessageFromExternalHost, | 746 IPC_MESSAGE_ROUTED4(AutomationMsg_HandleMessageFromExternalHost, |
| 739 int /* automation handle */, | 747 int /* automation handle */, |
| 740 std::string /* message */, | 748 std::string /* message */, |
| 741 std::string /* origin */, | 749 std::string /* origin */, |
| 742 std::string /* target */) | 750 std::string /* target */) |
| 743 | 751 |
| 744 // A message for an external host. | 752 // A message for an external host. |
| 745 IPC_MESSAGE_ROUTED4(AutomationMsg_ForwardMessageToExternalHost, | 753 IPC_MESSAGE_ROUTED4(AutomationMsg_ForwardMessageToExternalHost, |
| 746 int, /* handle */ | 754 int, /* handle */ |
| 747 std::string /* message */, | 755 std::string /* message */, |
| 748 std::string /* origin */, | 756 std::string /* origin */, |
| 749 std::string /* target */) | 757 std::string /* target */) |
| 750 | 758 |
| 751 // This message starts a find within a tab corresponding to the supplied | 759 // This message starts a find within a tab corresponding to the supplied |
| 752 // tab handle. The parameter |request| specifies what to search for. | 760 // tab handle. The parameter |request| specifies what to search for. |
| 753 // If an error occurs, |matches_found| will be -1. | 761 // If an error occurs, |matches_found| will be -1. |
| 754 // | 762 // |
| 755 IPC_SYNC_MESSAGE_ROUTED2_2(AutomationMsg_Find, | 763 IPC_SYNC_MESSAGE_ROUTED2_2(AutomationMsg_Find, |
| 756 int /* tab_handle */, | 764 int /* tab_handle */, |
| 757 AutomationMsg_Find_Params /* params */, | 765 AutomationMsg_Find_Params /* params */, |
| 758 int /* active_ordinal */, | 766 int /* active_ordinal */, |
| 759 int /* matches_found */) | 767 int /* matches_found */) |
| 760 | 768 |
| 761 // Is the Find window fully visible (and not animating) for the specified | 769 // Is the Find window fully visible (and not animating) for the specified |
| 762 // tab? | 770 // tab? |
| 763 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_FindWindowVisibility, | 771 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_FindWindowVisibility, |
| 764 int /* tab_handle */, | 772 int /* tab_handle */, |
| 765 bool /* is_visible */) | 773 bool /* is_visible */) |
| 766 | 774 |
| 767 // Where is the Find window located. |x| and |y| will be -1, -1 on failure. | 775 // Where is the Find window located. |x| and |y| will be -1, -1 on failure. |
| 768 IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_FindWindowLocation, | 776 IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_FindWindowLocation, |
| 769 int /* tab_handle */, | 777 int /* tab_handle */, |
| 770 int /* x */, | 778 int /* x */, |
| 771 int /* y */) | 779 int /* y */) |
| 772 | 780 |
| 773 // Is the Bookmark bar visible? The return value will indicate whether it is | 781 // Is the Bookmark bar visible? The return value will indicate whether it is |
| 774 // visible or not and whether it is being animated into (or out of its place). | 782 // visible or not and whether it is being animated into (or out of its place). |
| 775 IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_BookmarkBarVisibility, | 783 IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_BookmarkBarVisibility, |
| 776 int /* browser_handle */, | 784 int /* browser_handle */, |
| 777 bool, /* is_visible */ | 785 bool, /* is_visible */ |
| 778 bool /* still_animating */) | 786 bool /* still_animating */) |
| 779 | 787 |
| 780 // This message requests the number of related info bars opened. It | 788 // This message requests the number of related info bars opened. It |
| 781 // returns -1 if an error occurred. | 789 // returns -1 if an error occurred. |
| 782 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_GetInfoBarCount, | 790 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_GetInfoBarCount, |
| 783 int /* tab_handle */, | 791 int /* tab_handle */, |
| 784 int /* info bar count */) | 792 int /* info bar count */) |
| 785 | 793 |
| 786 // This message triggers the action associated with the "accept" button in | 794 // This message triggers the action associated with the "accept" button in |
| 787 // the info-bar at the specified index. If |wait for navigation| is true, it | 795 // the info-bar at the specified index. If |wait for navigation| is true, it |
| 788 // won't return until a navigation has occurred. | 796 // won't return until a navigation has occurred. |
| 789 IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_ClickInfoBarAccept, | 797 IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_ClickInfoBarAccept, |
| 790 int /* tab_handle */, | 798 int /* tab_handle */, |
| 791 int /* info bar index */, | 799 int /* info bar index */, |
| 792 bool /* wait for navigation */, | 800 bool /* wait for navigation */, |
| 793 | 801 |
| 794 /* navigation result */ | 802 /* navigation result */ |
| 795 AutomationMsg_NavigationResponseValues) | 803 AutomationMsg_NavigationResponseValues) |
| 796 | 804 |
| 797 // This message retrieves the last time a navigation occurred in the specified | 805 // This message retrieves the last time a navigation occurred in the specified |
| 798 // tab. The value is intended to be used with WaitForNavigation. | 806 // tab. The value is intended to be used with WaitForNavigation. |
| 799 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_GetLastNavigationTime, | 807 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_GetLastNavigationTime, |
| 800 int /* tab_handle */, | 808 int /* tab_handle */, |
| 801 int64 /* last navigation time */) | 809 int64 /* last navigation time */) |
| 802 | 810 |
| 803 // This messages is used to block until a new navigation occurs (if there is | 811 // This messages is used to block until a new navigation occurs (if there is |
| 804 // none more recent then the time specified). | 812 // none more recent then the time specified). |
| 805 IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_WaitForNavigation, | 813 IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_WaitForNavigation, |
| 806 int /* tab_handle */, | 814 int /* tab_handle */, |
| 807 int64 /* last navigation time */, | 815 int64 /* last navigation time */, |
| 808 | 816 |
| 809 /* navigation result */ | 817 /* navigation result */ |
| 810 AutomationMsg_NavigationResponseValues) | 818 AutomationMsg_NavigationResponseValues) |
| 811 | 819 |
| 812 // This messages sets an int-value preference. | 820 // This messages sets an int-value preference. |
| 813 IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_SetIntPreference, | 821 IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_SetIntPreference, |
| 814 int /* browser handle */, | 822 int /* browser handle */, |
| 815 std::string /* pref name */, | 823 std::string /* pref name */, |
| 816 int /* value */, | 824 int /* value */, |
| 817 bool /* success */) | 825 bool /* success */) |
| 818 | 826 |
| 819 // Queries whether an app modal dialog is currently being shown. (i.e. a | 827 // Queries whether an app modal dialog is currently being shown. (i.e. a |
| 820 // javascript alert) and which buttons it contains. | 828 // javascript alert) and which buttons it contains. |
| 821 IPC_SYNC_MESSAGE_ROUTED0_2(AutomationMsg_ShowingAppModalDialog, | 829 IPC_SYNC_MESSAGE_ROUTED0_2(AutomationMsg_ShowingAppModalDialog, |
| 822 bool /* showing dialog */, | 830 bool /* showing dialog */, |
| 823 int /* view::DelegateDialog::DialogButton */) | 831 int /* view::DelegateDialog::DialogButton */) |
| 824 | 832 |
| 825 // This message triggers the specified button for the currently showing | 833 // This message triggers the specified button for the currently showing |
| 826 // modal dialog. | 834 // modal dialog. |
| 827 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_ClickAppModalDialogButton, | 835 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_ClickAppModalDialogButton, |
| 828 int /* view::DelegateDialog::DialogButton */, | 836 int /* view::DelegateDialog::DialogButton */, |
| 829 bool /* success */) | 837 bool /* success */) |
| 830 | 838 |
| 831 // This messages sets a string-value preference. | 839 // This messages sets a string-value preference. |
| 832 IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_SetStringPreference, | 840 IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_SetStringPreference, |
| 833 int /* browser handle */, | 841 int /* browser handle */, |
| 834 std::string /* pref name */, | 842 std::string /* pref name */, |
| 835 std::string /* pref value */, | 843 std::string /* pref value */, |
| 836 bool) | 844 bool) |
| 837 | 845 |
| 838 // This messages gets a boolean-value preference. | 846 // This messages gets a boolean-value preference. |
| 839 IPC_SYNC_MESSAGE_ROUTED2_2(AutomationMsg_GetBooleanPreference, | 847 IPC_SYNC_MESSAGE_ROUTED2_2(AutomationMsg_GetBooleanPreference, |
| 840 int /* browser handle */, | 848 int /* browser handle */, |
| 841 std::string /* pref name */, | 849 std::string /* pref name */, |
| 842 bool /* success */, | 850 bool /* success */, |
| 843 bool /* pref value */) | 851 bool /* pref value */) |
| 844 | 852 |
| 845 // This messages sets a boolean-value preference. | 853 // This messages sets a boolean-value preference. |
| 846 IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_SetBooleanPreference, | 854 IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_SetBooleanPreference, |
| 847 int /* browser handle */, | 855 int /* browser handle */, |
| 848 std::string /* pref name */, | 856 std::string /* pref name */, |
| 849 bool /* pref value */, | 857 bool /* pref value */, |
| 850 bool /* success */) | 858 bool /* success */) |
| 851 | 859 |
| 852 // Queries the current used encoding name of the page in the specified | 860 // Queries the current used encoding name of the page in the specified |
| 853 // web content tab. | 861 // web content tab. |
| 854 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_GetPageCurrentEncoding, | 862 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_GetPageCurrentEncoding, |
| 855 int /* tab handle */, | 863 int /* tab handle */, |
| 856 std::string /* current used encoding name */) | 864 std::string /* current used encoding name */) |
| 857 | 865 |
| 858 // Uses the specified encoding to override the encoding of the page in the | 866 // Uses the specified encoding to override the encoding of the page in the |
| 859 // specified web content tab. | 867 // specified web content tab. |
| 860 IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_OverrideEncoding, | 868 IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_OverrideEncoding, |
| 861 int /* tab handle */, | 869 int /* tab handle */, |
| 862 std::string /* overrided encoding name */, | 870 std::string /* overrided encoding name */, |
| 863 bool /* success */) | 871 bool /* success */) |
| 864 | 872 |
| 865 // Used to disable the dialog box that prompts the user for a path when | 873 // Used to disable the dialog box that prompts the user for a path when |
| 866 // saving a web page. | 874 // saving a web page. |
| 867 IPC_SYNC_MESSAGE_ROUTED1_0(AutomationMsg_SavePackageShouldPromptUser, | 875 IPC_SYNC_MESSAGE_ROUTED1_0(AutomationMsg_SavePackageShouldPromptUser, |
| 868 bool /* false if we want to not show the dialog */) | 876 bool /* false if we want to not show the dialog */) |
| 869 | 877 |
| 870 // This message is an outgoing message from Chrome to an external host. | 878 // This message is an outgoing message from Chrome to an external host. |
| 871 // It is a notification that a navigation failed | 879 // It is a notification that a navigation failed |
| 872 // Request: | 880 // Request: |
| 873 // -int : Tab handle | 881 // -int : Tab handle |
| 874 // -int : The status code. | 882 // -int : The status code. |
| 875 // -GURL: The URL we failed to navigate to. | 883 // -GURL: The URL we failed to navigate to. |
| 876 // Response: | 884 // Response: |
| 877 // None expected | 885 // None expected |
| 878 IPC_MESSAGE_ROUTED3(AutomationMsg_NavigationFailed, int, int, GURL) | 886 IPC_MESSAGE_ROUTED3(AutomationMsg_NavigationFailed, int, int, GURL) |
| 879 | 887 |
| 880 #if defined(OS_WIN) | 888 #if defined(OS_WIN) |
| 881 // This message is an outgoing message from an automation client to Chrome. | 889 // This message is an outgoing message from an automation client to Chrome. |
| 882 // It is used to reposition a chrome tab window. | 890 // It is used to reposition a chrome tab window. |
| 883 IPC_MESSAGE_ROUTED2(AutomationMsg_TabReposition, | 891 IPC_MESSAGE_ROUTED2(AutomationMsg_TabReposition, |
| 884 int /* tab handle */, | 892 int /* tab handle */, |
| 885 IPC::Reposition_Params /* SetWindowPos params */) | 893 IPC::Reposition_Params /* SetWindowPos params */) |
| 886 #endif // defined(OS_WIN) | 894 #endif // defined(OS_WIN) |
| 887 | 895 |
| 888 // Gets the title of the top level browser window. | 896 // Gets the title of the top level browser window. |
| 889 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_WindowTitle, | 897 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_WindowTitle, |
| 890 int /* automation handle */, | 898 int /* automation handle */, |
| 891 string16 /* title text */ ) | 899 string16 /* title text */ ) |
| 892 | 900 |
| 893 // Tab load complete | 901 // Tab load complete |
| 894 IPC_MESSAGE_ROUTED2(AutomationMsg_TabLoaded, | 902 IPC_MESSAGE_ROUTED2(AutomationMsg_TabLoaded, |
| 895 int, // tab handle | 903 int, // tab handle |
| 896 GURL) | 904 GURL) |
| 897 | 905 |
| 898 // This message requests the tabstrip index of the tab with the given handle. | 906 // This message requests the tabstrip index of the tab with the given handle. |
| 899 // The return value contains the index, which will be -1 on failure. | 907 // The return value contains the index, which will be -1 on failure. |
| 900 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_TabIndex, int, int) | 908 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_TabIndex, int, int) |
| 901 | 909 |
| 902 // This message requests the handle (int64 app-unique identifier) of | 910 // This message requests the handle (int64 app-unique identifier) of |
| 903 // a valid normal browser window, i.e. normal type and non-incognito mode. | 911 // a valid normal browser window, i.e. normal type and non-incognito mode. |
| 904 // On error, the returned handle value is 0. | 912 // On error, the returned handle value is 0. |
| 905 IPC_SYNC_MESSAGE_ROUTED0_1(AutomationMsg_FindNormalBrowserWindow, int) | 913 IPC_SYNC_MESSAGE_ROUTED0_1(AutomationMsg_FindNormalBrowserWindow, int) |
| 906 | 914 |
| 907 // This message requests the number of normal browser windows, i.e. normal | 915 // This message requests the number of normal browser windows, i.e. normal |
| 908 // type and non-incognito mode that the app currently has open. The return | 916 // type and non-incognito mode that the app currently has open. The return |
| 909 // value is the number of windows. | 917 // value is the number of windows. |
| 910 IPC_SYNC_MESSAGE_ROUTED0_1(AutomationMsg_NormalBrowserWindowCount, int) | 918 IPC_SYNC_MESSAGE_ROUTED0_1(AutomationMsg_NormalBrowserWindowCount, int) |
| 911 | 919 |
| 912 // Used to put the browser into "extension automation mode" for a given | 920 // Used to put the browser into "extension automation mode" for a given |
| 913 // set of Chrome Extensions API functions for the current profile, or turn | 921 // set of Chrome Extensions API functions for the current profile, or turn |
| 914 // off automation mode. The specified tab is used as the conduit for all | 922 // off automation mode. The specified tab is used as the conduit for all |
| 915 // automated API functions. It must be an external tab (as in | 923 // automated API functions. It must be an external tab (as in |
| 916 // AutomationMsg_CreateExternalTab). | 924 // AutomationMsg_CreateExternalTab). |
| 917 IPC_MESSAGE_ROUTED2(AutomationMsg_SetEnableExtensionAutomation, | 925 IPC_MESSAGE_ROUTED2(AutomationMsg_SetEnableExtensionAutomation, |
| 918 // Tab handle. | 926 // Tab handle. |
| 919 int, | 927 int, |
| 920 // Empty to disable automation, non-empty to enable | 928 // Empty to disable automation, non-empty to enable |
| 921 // automation of the specified API functions, single | 929 // automation of the specified API functions, single |
| 922 // entry of "*" to enable automation of all API | 930 // entry of "*" to enable automation of all API |
| 923 // functions. | 931 // functions. |
| 924 std::vector<std::string>) | 932 std::vector<std::string>) |
| 925 | 933 |
| 926 // This message tells the browser to start using the new proxy configuration | 934 // This message tells the browser to start using the new proxy configuration |
| 927 // represented by the given JSON string. The parameters used in the JSON | 935 // represented by the given JSON string. The parameters used in the JSON |
| 928 // string are defined in automation_constants.h. | 936 // string are defined in automation_constants.h. |
| 929 IPC_MESSAGE_ROUTED1(AutomationMsg_SetProxyConfig, | 937 IPC_MESSAGE_ROUTED1(AutomationMsg_SetProxyConfig, |
| 930 std::string /* proxy_config_json_string */) | 938 std::string /* proxy_config_json_string */) |
| 931 | 939 |
| 932 // Sets Download Shelf visibility for the specified browser. | 940 // Sets Download Shelf visibility for the specified browser. |
| 933 IPC_SYNC_MESSAGE_ROUTED2_0(AutomationMsg_SetShelfVisibility, | 941 IPC_SYNC_MESSAGE_ROUTED2_0(AutomationMsg_SetShelfVisibility, |
| 934 int /* browser_handle */, | 942 int /* browser_handle */, |
| 935 bool /* is_visible */) | 943 bool /* is_visible */) |
| 936 | 944 |
| 937 // This message requests the number of blocked popups in a certain tab with | 945 // This message requests the number of blocked popups in a certain tab with |
| 938 // the given handle. The return value is the number of blocked popups, or -1 | 946 // the given handle. The return value is the number of blocked popups, or -1 |
| 939 // if this request failed. | 947 // if this request failed. |
| 940 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_BlockedPopupCount, | 948 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_BlockedPopupCount, |
| 941 int /* tab_handle */, | 949 int /* tab_handle */, |
| 942 int /* blocked_popup_count */) | 950 int /* blocked_popup_count */) |
| 943 | 951 |
| 944 // This message retrieves the locale of the browser process. On success | 952 // This message retrieves the locale of the browser process. On success |
| 945 // |chrome_locale| will contain the locale as reported by ICU. On failure | 953 // |chrome_locale| will contain the locale as reported by ICU. On failure |
| 946 // |chrome_locale| is the empty string. | 954 // |chrome_locale| is the empty string. |
| 947 IPC_SYNC_MESSAGE_ROUTED0_1(AutomationMsg_GetBrowserLocale, | 955 IPC_SYNC_MESSAGE_ROUTED0_1(AutomationMsg_GetBrowserLocale, |
| 948 string16 /* chrome_locale */) | 956 string16 /* chrome_locale */) |
| 949 | 957 |
| 950 #if defined(OS_WIN) | 958 #if defined(OS_WIN) |
| 951 IPC_MESSAGE_ROUTED4(AutomationMsg_ForwardContextMenuToExternalHost, | 959 IPC_MESSAGE_ROUTED4(AutomationMsg_ForwardContextMenuToExternalHost, |
| 952 int /* tab_handle */, | 960 int /* tab_handle */, |
| 953 HANDLE /* source menu handle */, | 961 HANDLE /* source menu handle */, |
| 954 int /* align flags */, | 962 int /* align flags */, |
| 955 IPC::MiniContextMenuParams /* params */) | 963 IPC::MiniContextMenuParams /* params */) |
| 956 | 964 |
| 957 IPC_MESSAGE_ROUTED2(AutomationMsg_ForwardContextMenuCommandToChrome, | 965 IPC_MESSAGE_ROUTED2(AutomationMsg_ForwardContextMenuCommandToChrome, |
| 958 int /* tab_handle */, | 966 int /* tab_handle */, |
| 959 int /* selected_command */) | 967 int /* selected_command */) |
| 960 #endif // OS_WIN | 968 #endif // OS_WIN |
| 961 | 969 |
| 962 // A URL request to be fetched via automation | 970 // A URL request to be fetched via automation |
| 963 IPC_MESSAGE_ROUTED3(AutomationMsg_RequestStart, | 971 IPC_MESSAGE_ROUTED3(AutomationMsg_RequestStart, |
| 964 int /* tab_handle */, | 972 int /* tab_handle */, |
| 965 int /* request_id */, | 973 int /* request_id */, |
| 966 IPC::AutomationURLRequest /* request */) | 974 IPC::AutomationURLRequest /* request */) |
| 967 | 975 |
| 968 // Read data from a URL request to be fetched via automation | 976 // Read data from a URL request to be fetched via automation |
| 969 IPC_MESSAGE_ROUTED3(AutomationMsg_RequestRead, | 977 IPC_MESSAGE_ROUTED3(AutomationMsg_RequestRead, |
| 970 int /* tab_handle */, | 978 int /* tab_handle */, |
| 971 int /* request_id */, | 979 int /* request_id */, |
| 972 int /* bytes_to_read */) | 980 int /* bytes_to_read */) |
| 973 | 981 |
| 974 // Response to a AutomationMsg_RequestStart message | 982 // Response to a AutomationMsg_RequestStart message |
| 975 IPC_MESSAGE_ROUTED3(AutomationMsg_RequestStarted, | 983 IPC_MESSAGE_ROUTED3(AutomationMsg_RequestStarted, |
| 976 int /* tab_handle */, | 984 int /* tab_handle */, |
| 977 int /* request_id */, | 985 int /* request_id */, |
| 978 IPC::AutomationURLResponse /* response */) | 986 IPC::AutomationURLResponse /* response */) |
| 979 | 987 |
| 980 // Data read via automation | 988 // Data read via automation |
| 981 IPC_MESSAGE_ROUTED3(AutomationMsg_RequestData, | 989 IPC_MESSAGE_ROUTED3(AutomationMsg_RequestData, |
| 982 int /* tab_handle */, | 990 int /* tab_handle */, |
| 983 int /* request_id */, | 991 int /* request_id */, |
| 984 std::string /* data */) | 992 std::string /* data */) |
| 985 | 993 |
| 986 IPC_MESSAGE_ROUTED3(AutomationMsg_RequestEnd, | 994 IPC_MESSAGE_ROUTED3(AutomationMsg_RequestEnd, |
| 987 int /* tab_handle */, | 995 int /* tab_handle */, |
| 988 int /* request_id */, | 996 int /* request_id */, |
| 989 URLRequestStatus /* status */) | 997 URLRequestStatus /* status */) |
| 990 | 998 |
| 991 IPC_MESSAGE_ROUTED1(AutomationMsg_PrintAsync, | 999 IPC_MESSAGE_ROUTED1(AutomationMsg_PrintAsync, |
| 992 int /* tab_handle */) | 1000 int /* tab_handle */) |
| 993 | 1001 |
| 994 IPC_MESSAGE_ROUTED3(AutomationMsg_SetCookieAsync, | 1002 IPC_MESSAGE_ROUTED3(AutomationMsg_SetCookieAsync, |
| 995 int /* tab_handle */, | 1003 int /* tab_handle */, |
| 996 GURL /* url */, | 1004 GURL /* url */, |
| 997 std::string /* cookie */) | 1005 std::string /* cookie */) |
| 998 | 1006 |
| 999 IPC_MESSAGE_ROUTED1(AutomationMsg_SelectAll, | 1007 IPC_MESSAGE_ROUTED1(AutomationMsg_SelectAll, |
| 1000 int /* tab handle */) | 1008 int /* tab handle */) |
| 1001 | 1009 |
| 1002 IPC_MESSAGE_ROUTED1(AutomationMsg_Cut, | 1010 IPC_MESSAGE_ROUTED1(AutomationMsg_Cut, |
| 1003 int /* tab handle */) | 1011 int /* tab handle */) |
| 1004 | 1012 |
| 1005 IPC_MESSAGE_ROUTED1(AutomationMsg_Copy, | 1013 IPC_MESSAGE_ROUTED1(AutomationMsg_Copy, |
| 1006 int /* tab handle */) | 1014 int /* tab handle */) |
| 1007 | 1015 |
| 1008 IPC_MESSAGE_ROUTED1(AutomationMsg_Paste, | 1016 IPC_MESSAGE_ROUTED1(AutomationMsg_Paste, |
| 1009 int /* tab handle */) | 1017 int /* tab handle */) |
| 1010 | 1018 |
| 1011 IPC_MESSAGE_ROUTED1(AutomationMsg_ReloadAsync, | 1019 IPC_MESSAGE_ROUTED1(AutomationMsg_ReloadAsync, |
| 1012 int /* tab handle */) | 1020 int /* tab handle */) |
| 1013 | 1021 |
| 1014 IPC_MESSAGE_ROUTED1(AutomationMsg_StopAsync, | 1022 IPC_MESSAGE_ROUTED1(AutomationMsg_StopAsync, |
| 1015 int /* tab handle */) | 1023 int /* tab handle */) |
| 1016 | 1024 |
| 1017 // Returns the number of times a filter was used to service an URL request. | 1025 // Returns the number of times a filter was used to service an URL request. |
| 1018 // See AutomationMsg_SetFilteredInet. | 1026 // See AutomationMsg_SetFilteredInet. |
| 1019 IPC_SYNC_MESSAGE_ROUTED0_1(AutomationMsg_GetFilteredInetHitCount, | 1027 IPC_SYNC_MESSAGE_ROUTED0_1(AutomationMsg_GetFilteredInetHitCount, |
| 1020 int /* hit_count */) | 1028 int /* hit_count */) |
| 1021 | 1029 |
| 1022 // Is the browser in fullscreen mode? | 1030 // Is the browser in fullscreen mode? |
| 1023 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_IsFullscreen, | 1031 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_IsFullscreen, |
| 1024 int /* browser_handle */, | 1032 int /* browser_handle */, |
| 1025 bool /* is_fullscreen */) | 1033 bool /* is_fullscreen */) |
| 1026 | 1034 |
| 1027 // Is the fullscreen bubble visible? | 1035 // Is the fullscreen bubble visible? |
| 1028 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_IsFullscreenBubbleVisible, | 1036 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_IsFullscreenBubbleVisible, |
| 1029 int /* browser_handle */, | 1037 int /* browser_handle */, |
| 1030 bool /* is_visible */) | 1038 bool /* is_visible */) |
| 1031 | 1039 |
| 1032 #if defined(OS_POSIX) | 1040 #if defined(OS_POSIX) |
| 1033 // See previous definition of this message for explanation of why it is | 1041 // See previous definition of this message for explanation of why it is |
| 1034 // defined twice. | 1042 // defined twice. |
| 1035 IPC_MESSAGE_ROUTED3(AutomationMsg_WindowClick, int, gfx::Point, int) | 1043 IPC_MESSAGE_ROUTED3(AutomationMsg_WindowClick, int, gfx::Point, int) |
| 1036 #endif | 1044 #endif |
| 1037 | 1045 |
| 1038 // This message notifies the AutomationProvider to navigate to a specified | 1046 // This message notifies the AutomationProvider to navigate to a specified |
| 1039 // url in the tab with given handle. The first parameter is the handle to | 1047 // url in the tab with given handle. The first parameter is the handle to |
| 1040 // the tab resource. The second parameter is the target url. The third | 1048 // the tab resource. The second parameter is the target url. The third |
| 1041 // parameter is the number of navigations that are required for a successful | 1049 // parameter is the number of navigations that are required for a successful |
| 1042 // return value. See AutomationMsg_NavigationResponseValues for the return | 1050 // return value. See AutomationMsg_NavigationResponseValues for the return |
| 1043 // value. | 1051 // value. |
| 1044 IPC_SYNC_MESSAGE_ROUTED3_1( | 1052 IPC_SYNC_MESSAGE_ROUTED3_1( |
| 1045 AutomationMsg_NavigateToURLBlockUntilNavigationsComplete, int, GURL, int, | 1053 AutomationMsg_NavigateToURLBlockUntilNavigationsComplete, int, GURL, int, |
| 1046 AutomationMsg_NavigationResponseValues) | 1054 AutomationMsg_NavigationResponseValues) |
| 1047 | 1055 |
| 1048 // This message notifies the AutomationProvider to navigate to a specified | 1056 // This message notifies the AutomationProvider to navigate to a specified |
| 1049 // navigation entry index in the external tab with given handle. The first | 1057 // navigation entry index in the external tab with given handle. The first |
| 1050 // parameter is the handle to the tab resource. The second parameter is the | 1058 // parameter is the handle to the tab resource. The second parameter is the |
| 1051 // index of navigation entry. | 1059 // index of navigation entry. |
| 1052 // The return value contains a status code which is nonnegative on success. | 1060 // The return value contains a status code which is nonnegative on success. |
| 1053 // see AutomationMsg_NavigationResponseValues for the navigation response. | 1061 // see AutomationMsg_NavigationResponseValues for the navigation response. |
| 1054 IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_NavigateExternalTabAtIndex, int, int, | 1062 IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_NavigateExternalTabAtIndex, int, int, |
| 1055 AutomationMsg_NavigationResponseValues) | 1063 AutomationMsg_NavigationResponseValues) |
| 1056 | 1064 |
| 1057 // This message requests the provider to wait until the window count | 1065 // This message requests the provider to wait until the window count |
| 1058 // reached the specified value. | 1066 // reached the specified value. |
| 1059 // Request: | 1067 // Request: |
| 1060 // - int: target browser window count | 1068 // - int: target browser window count |
| 1061 // Response: | 1069 // Response: |
| 1062 // - bool: whether the operation was successful. | 1070 // - bool: whether the operation was successful. |
| 1063 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_WaitForBrowserWindowCountToBecome, | 1071 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_WaitForBrowserWindowCountToBecome, |
| 1064 int, bool) | 1072 int, bool) |
| 1065 | 1073 |
| 1066 // This message requests the provider to wait until an application modal | 1074 // This message requests the provider to wait until an application modal |
| 1067 // dialog is shown. | 1075 // dialog is shown. |
| 1068 // Response: | 1076 // Response: |
| 1069 // - bool: whether the operation was successful | 1077 // - bool: whether the operation was successful |
| 1070 IPC_SYNC_MESSAGE_ROUTED0_1(AutomationMsg_WaitForAppModalDialogToBeShown, bool) | 1078 IPC_SYNC_MESSAGE_ROUTED0_1(AutomationMsg_WaitForAppModalDialogToBeShown, bool) |
| 1071 | 1079 |
| 1072 // This message notifies the AutomationProvider to navigate back in session | 1080 // This message notifies the AutomationProvider to navigate back in session |
| 1073 // history in the tab with given handle. The first parameter is the handle | 1081 // history in the tab with given handle. The first parameter is the handle |
| 1074 // to the tab resource. The second parameter is the number of navigations the | 1082 // to the tab resource. The second parameter is the number of navigations the |
| 1075 // provider will wait for. | 1083 // provider will wait for. |
| 1076 // See AutomationMsg_NavigationResponseValues for the navigation response | 1084 // See AutomationMsg_NavigationResponseValues for the navigation response |
| 1077 // values. | 1085 // values. |
| 1078 IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_GoBackBlockUntilNavigationsComplete, | 1086 IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_GoBackBlockUntilNavigationsComplete, |
| 1079 int, int, | 1087 int, int, |
| 1080 AutomationMsg_NavigationResponseValues) | 1088 AutomationMsg_NavigationResponseValues) |
| 1081 | 1089 |
| 1082 // This message notifies the AutomationProvider to navigate forward in session | 1090 // This message notifies the AutomationProvider to navigate forward in session |
| 1083 // history in the tab with given handle. The first parameter is the handle | 1091 // history in the tab with given handle. The first parameter is the handle |
| 1084 // to the tab resource. The second parameter is the number of navigations | 1092 // to the tab resource. The second parameter is the number of navigations |
| 1085 // the provider will wait for. | 1093 // the provider will wait for. |
| 1086 // See AutomationMsg_NavigationResponseValues for the navigation response | 1094 // See AutomationMsg_NavigationResponseValues for the navigation response |
| 1087 // values. | 1095 // values. |
| 1088 IPC_SYNC_MESSAGE_ROUTED2_1( | 1096 IPC_SYNC_MESSAGE_ROUTED2_1( |
| 1089 AutomationMsg_GoForwardBlockUntilNavigationsComplete, int, int, | 1097 AutomationMsg_GoForwardBlockUntilNavigationsComplete, int, int, |
| 1090 AutomationMsg_NavigationResponseValues) | 1098 AutomationMsg_NavigationResponseValues) |
| 1091 | 1099 |
| 1092 // This message is used by automation clients to upload histogram data to the | 1100 // This message is used by automation clients to upload histogram data to the |
| 1093 // browser process. | 1101 // browser process. |
| 1094 IPC_MESSAGE_ROUTED1(AutomationMsg_RecordHistograms, | 1102 IPC_MESSAGE_ROUTED1(AutomationMsg_RecordHistograms, |
| 1095 std::vector<std::string> /* histogram_list */) | 1103 std::vector<std::string> /* histogram_list */) |
| 1096 | 1104 |
| 1097 IPC_MESSAGE_ROUTED2(AutomationMsg_AttachExternalTab, | 1105 IPC_MESSAGE_ROUTED2(AutomationMsg_AttachExternalTab, |
| 1098 int /* 'source' tab_handle */, | 1106 int /* 'source' tab_handle */, |
| 1099 IPC::AttachExternalTabParams) | 1107 IPC::AttachExternalTabParams) |
| 1100 | 1108 |
| 1101 // Sent when the automation client connects to an existing tab. | 1109 // Sent when the automation client connects to an existing tab. |
| 1102 IPC_SYNC_MESSAGE_ROUTED3_4(AutomationMsg_ConnectExternalTab, | 1110 IPC_SYNC_MESSAGE_ROUTED3_4(AutomationMsg_ConnectExternalTab, |
| 1103 uint64 /* cookie */, | 1111 uint64 /* cookie */, |
| 1104 bool /* allow/block tab*/, | 1112 bool /* allow/block tab*/, |
| 1105 gfx::NativeWindow /* parent window */, | 1113 gfx::NativeWindow /* parent window */, |
| 1106 gfx::NativeWindow /* Tab container window */, | 1114 gfx::NativeWindow /* Tab container window */, |
| 1107 gfx::NativeWindow /* Tab window */, | 1115 gfx::NativeWindow /* Tab window */, |
| 1108 int /* Handle to the new tab */, | 1116 int /* Handle to the new tab */, |
| 1109 int /* Session Id of the new tab */) | 1117 int /* Session Id of the new tab */) |
| 1110 | 1118 |
| 1111 #if defined(OS_POSIX) | 1119 #if defined(OS_POSIX) |
| 1112 // TODO(estade): this should be merged with the windows message of the same | 1120 // TODO(estade): this should be merged with the windows message of the same |
| 1113 // name. See comment for WindowClick. | 1121 // name. See comment for WindowClick. |
| 1114 IPC_SYNC_MESSAGE_ROUTED4_1(AutomationMsg_WindowDrag, | 1122 IPC_SYNC_MESSAGE_ROUTED4_1(AutomationMsg_WindowDrag, |
| 1115 int, std::vector<gfx::Point>, int, bool, bool) | 1123 int, std::vector<gfx::Point>, int, bool, bool) |
| 1116 #endif // defined(OS_POSIX) | 1124 #endif // defined(OS_POSIX) |
| 1117 | 1125 |
| 1118 // This message gets the bounds of the window. | 1126 // This message gets the bounds of the window. |
| 1119 // Request: | 1127 // Request: |
| 1120 // int - the handle of the window to query | 1128 // int - the handle of the window to query |
| 1121 // Response: | 1129 // Response: |
| 1122 // gfx::Rect - the bounds of the window | 1130 // gfx::Rect - the bounds of the window |
| 1123 // bool - true if the query was successful | 1131 // bool - true if the query was successful |
| 1124 IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_GetWindowBounds, int, gfx::Rect, | 1132 IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_GetWindowBounds, int, gfx::Rect, |
| 1125 bool) | 1133 bool) |
| 1126 | 1134 |
| 1127 // Simulate an end of session. Normally this happens when the user | 1135 // Simulate an end of session. Normally this happens when the user |
| 1128 // shuts down the machine or logs off. | 1136 // shuts down the machine or logs off. |
| 1129 // Request: | 1137 // Request: |
| 1130 // int - the handle of the browser | 1138 // int - the handle of the browser |
| 1131 // Response: | 1139 // Response: |
| 1132 // bool - true if succesful | 1140 // bool - true if succesful |
| 1133 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_TerminateSession, int, bool) | 1141 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_TerminateSession, int, bool) |
| 1134 | 1142 |
| 1135 // Returns whether the window is maximized. | 1143 // Returns whether the window is maximized. |
| 1136 // Request: | 1144 // Request: |
| 1137 // int - the handle of the window | 1145 // int - the handle of the window |
| 1138 // Response: | 1146 // Response: |
| 1139 // bool - true if the window is maximized | 1147 // bool - true if the window is maximized |
| 1140 // bool - true if query is successful | 1148 // bool - true if query is successful |
| 1141 IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_IsWindowMaximized, int, bool, bool) | 1149 IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_IsWindowMaximized, int, bool, bool) |
| 1142 | 1150 |
| 1143 IPC_MESSAGE_ROUTED2(AutomationMsg_SetPageFontSize, | 1151 IPC_MESSAGE_ROUTED2(AutomationMsg_SetPageFontSize, |
| 1144 int /* tab_handle */, | 1152 int /* tab_handle */, |
| 1145 int /* The font size */) | 1153 int /* The font size */) |
| 1146 | 1154 |
| 1147 // Returns a metric event duration that was last recorded. Returns -1 if the | 1155 // Returns a metric event duration that was last recorded. Returns -1 if the |
| 1148 // event hasn't occurred yet. | 1156 // event hasn't occurred yet. |
| 1149 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_GetMetricEventDuration, | 1157 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_GetMetricEventDuration, |
| 1150 std::string /* event_name */, | 1158 std::string /* event_name */, |
| 1151 int /* duration ms */) | 1159 int /* duration ms */) |
| 1152 | 1160 |
| 1153 // Sent by automation provider - go to history entry via automation. | 1161 // Sent by automation provider - go to history entry via automation. |
| 1154 IPC_MESSAGE_ROUTED2(AutomationMsg_RequestGoToHistoryEntryOffset, | 1162 IPC_MESSAGE_ROUTED2(AutomationMsg_RequestGoToHistoryEntryOffset, |
| 1155 int, // tab handle | 1163 int, // tab handle |
| 1156 int) // numbers of entries (negative or positive) | 1164 int) // numbers of entries (negative or positive) |
| 1157 | 1165 |
| 1158 // Silently install the extension in the given crx file. | 1166 // Silently install the extension in the given crx file. |
| 1159 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_InstallExtension, | 1167 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_InstallExtension, |
| 1160 FilePath /* full path to crx file */, | 1168 FilePath /* full path to crx file */, |
| 1161 AutomationMsg_ExtensionResponseValues) | 1169 AutomationMsg_ExtensionResponseValues) |
| 1162 | 1170 |
| 1163 // Silently load the extension in the given directory. This expects an | 1171 // Silently load the extension in the given directory. This expects an |
| 1164 // extension expanded into the directory, not a crx file. | 1172 // extension expanded into the directory, not a crx file. |
| 1165 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_LoadExpandedExtension, | 1173 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_LoadExpandedExtension, |
| 1166 FilePath /* root directory of extension */, | 1174 FilePath /* root directory of extension */, |
| 1167 AutomationMsg_ExtensionResponseValues) | 1175 AutomationMsg_ExtensionResponseValues) |
| 1168 | 1176 |
| 1169 // Retrieves a list of the root directories of all enabled extensions | 1177 // Retrieves a list of the root directories of all enabled extensions |
| 1170 // that have been installed into Chrome by dropping a .crx file onto | 1178 // that have been installed into Chrome by dropping a .crx file onto |
| 1171 // Chrome or an equivalent action (including loaded extensions). | 1179 // Chrome or an equivalent action (including loaded extensions). |
| 1172 // Other types of extensions are not included on the list (e.g. "component" | 1180 // Other types of extensions are not included on the list (e.g. "component" |
| 1173 // or "external" extensions) since they are generally not useful for testing | 1181 // or "external" extensions) since they are generally not useful for testing |
| 1174 // (e.g. an external extension could mess with an automated test if it's | 1182 // (e.g. an external extension could mess with an automated test if it's |
| 1175 // present on some systems only). | 1183 // present on some systems only). |
| 1176 IPC_SYNC_MESSAGE_ROUTED0_1(AutomationMsg_GetEnabledExtensions, | 1184 IPC_SYNC_MESSAGE_ROUTED0_1(AutomationMsg_GetEnabledExtensions, |
| 1177 std::vector<FilePath>) | 1185 std::vector<FilePath>) |
| 1178 | 1186 |
| 1179 // This message requests the type of the window with the given handle. The | 1187 // This message requests the type of the window with the given handle. The |
| 1180 // return value contains the type (Browser::Type), or -1 if the request | 1188 // return value contains the type (Browser::Type), or -1 if the request |
| 1181 // failed. | 1189 // failed. |
| 1182 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_Type, int, int) | 1190 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_Type, int, int) |
| 1183 | 1191 |
| 1184 // Opens a new browser window of a specific type. | 1192 // Opens a new browser window of a specific type. |
| 1185 IPC_SYNC_MESSAGE_ROUTED2_0(AutomationMsg_OpenNewBrowserWindowOfType, | 1193 IPC_SYNC_MESSAGE_ROUTED2_0(AutomationMsg_OpenNewBrowserWindowOfType, |
| 1186 int /* Type (Browser::Type) */, | 1194 int /* Type (Browser::Type) */, |
| 1187 bool /* show */ ) | 1195 bool /* show */ ) |
| 1188 | 1196 |
| 1189 // This message requests that the mouse be moved to this location, in | 1197 // This message requests that the mouse be moved to this location, in |
| 1190 // window coordinate space. | 1198 // window coordinate space. |
| 1191 // Request: | 1199 // Request: |
| 1192 // int - the handle of the window that's the context for this click | 1200 // int - the handle of the window that's the context for this click |
| 1193 // gfx::Point - the location to move to | 1201 // gfx::Point - the location to move to |
| 1194 IPC_MESSAGE_ROUTED2(AutomationMsg_WindowMouseMove, int, gfx::Point) | 1202 IPC_MESSAGE_ROUTED2(AutomationMsg_WindowMouseMove, int, gfx::Point) |
| 1195 | 1203 |
| 1196 // Called when requests should be downloaded using a host browser's | 1204 // Called when requests should be downloaded using a host browser's |
| 1197 // download mechanism when chrome is being embedded. | 1205 // download mechanism when chrome is being embedded. |
| 1198 IPC_MESSAGE_ROUTED2(AutomationMsg_DownloadRequestInHost, | 1206 IPC_MESSAGE_ROUTED2(AutomationMsg_DownloadRequestInHost, |
| 1199 int /* tab_handle */, | 1207 int /* tab_handle */, |
| 1200 int /* request_id */) | 1208 int /* request_id */) |
| 1201 | 1209 |
| 1202 // Shuts down the session service for the browser identified by | 1210 // Shuts down the session service for the browser identified by |
| 1203 // |browser_handle|. On success |result| is set to true. | 1211 // |browser_handle|. On success |result| is set to true. |
| 1204 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_ShutdownSessionService, | 1212 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_ShutdownSessionService, |
| 1205 int /* browser_handle */, | 1213 int /* browser_handle */, |
| 1206 bool /* result */) | 1214 bool /* result */) |
| 1207 | 1215 |
| 1208 IPC_MESSAGE_ROUTED1(AutomationMsg_SaveAsAsync, | 1216 IPC_MESSAGE_ROUTED1(AutomationMsg_SaveAsAsync, |
| 1209 int /* tab handle */) | 1217 int /* tab handle */) |
| 1210 | 1218 |
| 1211 #if defined(OS_WIN) | 1219 #if defined(OS_WIN) |
| 1212 // An incoming message from an automation host to Chrome. Signals that | 1220 // An incoming message from an automation host to Chrome. Signals that |
| 1213 // the browser containing |tab_handle| has moved. | 1221 // the browser containing |tab_handle| has moved. |
| 1214 IPC_MESSAGE_ROUTED1(AutomationMsg_BrowserMove, | 1222 IPC_MESSAGE_ROUTED1(AutomationMsg_BrowserMove, |
| 1215 int /* tab handle */) | 1223 int /* tab handle */) |
| 1216 #endif | 1224 #endif |
| 1217 | 1225 |
| 1218 // Used to get cookies for the given URL. | 1226 // Used to get cookies for the given URL. |
| 1219 IPC_MESSAGE_ROUTED3(AutomationMsg_GetCookiesFromHost, | 1227 IPC_MESSAGE_ROUTED3(AutomationMsg_GetCookiesFromHost, |
| 1220 int /* tab_handle */, | 1228 int /* tab_handle */, |
| 1221 GURL /* url */, | 1229 GURL /* url */, |
| 1222 int /* opaque_cookie_id */) | 1230 int /* opaque_cookie_id */) |
| 1223 | 1231 |
| 1224 IPC_MESSAGE_ROUTED5(AutomationMsg_GetCookiesHostResponse, | 1232 IPC_MESSAGE_ROUTED5(AutomationMsg_GetCookiesHostResponse, |
| 1225 int /* tab_handle */, | 1233 int /* tab_handle */, |
| 1226 bool /* success */, | 1234 bool /* success */, |
| 1227 GURL /* url */, | 1235 GURL /* url */, |
| 1228 std::string /* cookies */, | 1236 std::string /* cookies */, |
| 1229 int /* opaque_cookie_id */) | 1237 int /* opaque_cookie_id */) |
| 1230 | 1238 |
| 1231 // If the given host is empty, then the default content settings are | 1239 // If the given host is empty, then the default content settings are |
| 1232 // modified. | 1240 // modified. |
| 1233 IPC_SYNC_MESSAGE_ROUTED4_1(AutomationMsg_SetContentSetting, | 1241 IPC_SYNC_MESSAGE_ROUTED4_1(AutomationMsg_SetContentSetting, |
| 1234 int /* browser handle */, | 1242 int /* browser handle */, |
| 1235 std::string /* host */, | 1243 std::string /* host */, |
| 1236 ContentSettingsType /* content type */, | 1244 ContentSettingsType /* content type */, |
| 1237 ContentSetting /* setting */, | 1245 ContentSetting /* setting */, |
| 1238 bool /* success */) | 1246 bool /* success */) |
| 1239 | 1247 |
| 1240 #if defined(OS_CHROMEOS) | 1248 #if defined(OS_CHROMEOS) |
| 1241 // Logs in through the browser's login wizard if available. | 1249 // Logs in through the browser's login wizard if available. |
| 1242 IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_LoginWithUserAndPass, | 1250 IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_LoginWithUserAndPass, |
| 1243 std::string /* username*/, | 1251 std::string /* username*/, |
| 1244 std::string /* password*/, | 1252 std::string /* password*/, |
| 1245 bool /* Whether successful*/) | 1253 bool /* Whether successful*/) |
| 1246 #endif | 1254 #endif |
| 1247 | 1255 |
| 1248 // Return the bookmarks encoded as a JSON string. | 1256 // Return the bookmarks encoded as a JSON string. |
| 1249 IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_GetBookmarksAsJSON, | 1257 IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_GetBookmarksAsJSON, |
| 1250 int /* browser_handle */, | 1258 int /* browser_handle */, |
| 1251 std::string /* bookmarks as a JSON string */, | 1259 std::string /* bookmarks as a JSON string */, |
| 1252 bool /* success */) | 1260 bool /* success */) |
| 1253 | 1261 |
| 1254 // Wait for the bookmark model to load. | 1262 // Wait for the bookmark model to load. |
| 1255 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_WaitForBookmarkModelToLoad, | 1263 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_WaitForBookmarkModelToLoad, |
| 1256 int /* browser_handle */, | 1264 int /* browser_handle */, |
| 1257 bool /* success */) | 1265 bool /* success */) |
| 1258 | 1266 |
| 1259 // Bookmark addition, modification, and removal. | 1267 // Bookmark addition, modification, and removal. |
| 1260 // Bookmarks are indexed by their id. | 1268 // Bookmarks are indexed by their id. |
| 1261 IPC_SYNC_MESSAGE_ROUTED4_1(AutomationMsg_AddBookmarkGroup, | 1269 IPC_SYNC_MESSAGE_ROUTED4_1(AutomationMsg_AddBookmarkGroup, |
| 1262 int /* browser_handle */, | 1270 int /* browser_handle */, |
| 1263 int64 /* parent_id */, | 1271 int64 /* parent_id */, |
| 1264 int /* index */, | 1272 int /* index */, |
| 1265 std::wstring /* title */, | 1273 std::wstring /* title */, |
| 1266 bool /* success */) | 1274 bool /* success */) |
| 1267 IPC_SYNC_MESSAGE_ROUTED5_1(AutomationMsg_AddBookmarkURL, | 1275 IPC_SYNC_MESSAGE_ROUTED5_1(AutomationMsg_AddBookmarkURL, |
| 1268 int /* browser_handle */, | 1276 int /* browser_handle */, |
| 1269 int64 /* parent_id */, | 1277 int64 /* parent_id */, |
| 1270 int /* index */, | 1278 int /* index */, |
| 1271 std::wstring /* title */, | 1279 std::wstring /* title */, |
| 1272 GURL /* url */, | 1280 GURL /* url */, |
| 1273 bool /* success */) | 1281 bool /* success */) |
| 1274 IPC_SYNC_MESSAGE_ROUTED4_1(AutomationMsg_ReparentBookmark, | 1282 IPC_SYNC_MESSAGE_ROUTED4_1(AutomationMsg_ReparentBookmark, |
| 1275 int /* browser_handle */, | 1283 int /* browser_handle */, |
| 1276 int64 /* id */, | 1284 int64 /* id */, |
| 1277 int64 /* new_parent_id */, | 1285 int64 /* new_parent_id */, |
| 1278 int /* index */, | 1286 int /* index */, |
| 1279 bool /* success */) | 1287 bool /* success */) |
| 1280 IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_SetBookmarkTitle, | 1288 IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_SetBookmarkTitle, |
| 1281 int /* browser_handle */, | 1289 int /* browser_handle */, |
| 1282 int64 /* id */, | 1290 int64 /* id */, |
| 1283 std::wstring /* title */, | 1291 std::wstring /* title */, |
| 1284 bool /* success */) | 1292 bool /* success */) |
| 1285 IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_SetBookmarkURL, | 1293 IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_SetBookmarkURL, |
| 1286 int /* browser_handle */, | 1294 int /* browser_handle */, |
| 1287 int64 /* id */, | 1295 int64 /* id */, |
| 1288 GURL /* url */, | 1296 GURL /* url */, |
| 1289 bool /* success */) | 1297 bool /* success */) |
| 1290 IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_RemoveBookmark, | 1298 IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_RemoveBookmark, |
| 1291 int /* browser_handle */, | 1299 int /* browser_handle */, |
| 1292 int64 /* id */, | 1300 int64 /* id */, |
| 1293 bool /* success */) | 1301 bool /* success */) |
| 1294 | 1302 |
| 1295 // This message informs the browser process to remove the history entries | 1303 // This message informs the browser process to remove the history entries |
| 1296 // for the specified types across all time ranges. See | 1304 // for the specified types across all time ranges. See |
| 1297 // browsing_data_remover.h for a list of REMOVE_* types supported in the | 1305 // browsing_data_remover.h for a list of REMOVE_* types supported in the |
| 1298 // remove_mask parameter. | 1306 // remove_mask parameter. |
| 1299 IPC_MESSAGE_ROUTED1(AutomationMsg_RemoveBrowsingData, int) | 1307 IPC_MESSAGE_ROUTED1(AutomationMsg_RemoveBrowsingData, int) |
| 1300 | 1308 |
| 1301 // Block until the focused view id changes to something other than | 1309 // Block until the focused view id changes to something other than |
| 1302 // |previous_view_id|. | 1310 // |previous_view_id|. |
| 1303 IPC_SYNC_MESSAGE_ROUTED2_2(AutomationMsg_WaitForFocusedViewIDToChange, | 1311 IPC_SYNC_MESSAGE_ROUTED2_2(AutomationMsg_WaitForFocusedViewIDToChange, |
| 1304 int /* window handle */, | 1312 int /* window handle */, |
| 1305 int /* previous_view_id */, | 1313 int /* previous_view_id */, |
| 1306 bool /* success */, | 1314 bool /* success */, |
| 1307 int /* new_view_id */) | 1315 int /* new_view_id */) |
| 1308 | 1316 |
| 1309 // To avoid race conditions, waiting until a popup menu opens is a | 1317 // To avoid race conditions, waiting until a popup menu opens is a |
| 1310 // three-step process: | 1318 // three-step process: |
| 1311 // 1. Call StartTrackingPopupMenus. | 1319 // 1. Call StartTrackingPopupMenus. |
| 1312 // 2. Call an automation method that results in opening the popup menu. | 1320 // 2. Call an automation method that results in opening the popup menu. |
| 1313 // 3. Call WaitForPopupMenuToOpen and check for success. | 1321 // 3. Call WaitForPopupMenuToOpen and check for success. |
| 1314 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_StartTrackingPopupMenus, | 1322 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_StartTrackingPopupMenus, |
| 1315 int /* browser handle */, | 1323 int /* browser handle */, |
| 1316 bool /* success */) | 1324 bool /* success */) |
| 1317 IPC_SYNC_MESSAGE_ROUTED0_1(AutomationMsg_WaitForPopupMenuToOpen, | 1325 IPC_SYNC_MESSAGE_ROUTED0_1(AutomationMsg_WaitForPopupMenuToOpen, |
| 1318 bool /* success */) | 1326 bool /* success */) |
| 1319 | 1327 |
| 1320 // Generic pyauto pattern to help avoid future addition of | 1328 // Generic pyauto pattern to help avoid future addition of |
| 1321 // automation messages. | 1329 // automation messages. |
| 1322 IPC_SYNC_MESSAGE_ROUTED2_2(AutomationMsg_SendJSONRequest, | 1330 IPC_SYNC_MESSAGE_ROUTED2_2(AutomationMsg_SendJSONRequest, |
| 1323 int /* browser_handle */, | 1331 int /* browser_handle */, |
| 1324 std::string /* JSON request */, | 1332 std::string /* JSON request */, |
| 1325 std::string /* JSON response */, | 1333 std::string /* JSON response */, |
| 1326 bool /* success */) | 1334 bool /* success */) |
| 1327 | 1335 |
| 1328 // Installs an extension from the crx file and returns its id. | 1336 // Installs an extension from the crx file and returns its id. |
| 1329 // On error, |extension handle| will be 0. | 1337 // On error, |extension handle| will be 0. |
| 1330 IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_InstallExtensionAndGetHandle, | 1338 IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_InstallExtensionAndGetHandle, |
| 1331 FilePath /* full path to crx file */, | 1339 FilePath /* full path to crx file */, |
| 1332 bool /* with UI */, | 1340 bool /* with UI */, |
| 1333 int /* extension handle */) | 1341 int /* extension handle */) |
| 1334 | 1342 |
| 1335 // Waits for the next extension test result. Sets |test result| as the | 1343 // Waits for the next extension test result. Sets |test result| as the |
| 1336 // received result and |message| as any accompanying message with the | 1344 // received result and |message| as any accompanying message with the |
| 1337 // result, which could be the empty string. | 1345 // result, which could be the empty string. |
| 1338 IPC_SYNC_MESSAGE_ROUTED0_2(AutomationMsg_WaitForExtensionTestResult, | 1346 IPC_SYNC_MESSAGE_ROUTED0_2(AutomationMsg_WaitForExtensionTestResult, |
| 1339 bool /* test result */, | 1347 bool /* test result */, |
| 1340 std::string /* message */) | 1348 std::string /* message */) |
| 1341 | 1349 |
| 1342 // Uninstalls an extension. On success |success| is true. | 1350 // Uninstalls an extension. On success |success| is true. |
| 1343 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_UninstallExtension, | 1351 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_UninstallExtension, |
| 1344 int /* extension handle */, | 1352 int /* extension handle */, |
| 1345 bool /* success */) | 1353 bool /* success */) |
| 1346 | 1354 |
| 1347 // Enables an extension. On success |success| is true. | 1355 // Enables an extension. On success |success| is true. |
| 1348 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_EnableExtension, | 1356 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_EnableExtension, |
| 1349 int /* extension handle */, | 1357 int /* extension handle */, |
| 1350 bool /* success */) | 1358 bool /* success */) |
| 1351 | 1359 |
| 1352 // Disables an extension. On success |success| is true. | 1360 // Disables an extension. On success |success| is true. |
| 1353 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_DisableExtension, | 1361 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_DisableExtension, |
| 1354 int /* extension handle */, | 1362 int /* extension handle */, |
| 1355 bool /* success */) | 1363 bool /* success */) |
| 1356 | 1364 |
| 1357 // Executes the action associated with the given extension. This executes | 1365 // Executes the action associated with the given extension. This executes |
| 1358 // the extension's page or browser action in the given browser, but does | 1366 // the extension's page or browser action in the given browser, but does |
| 1359 // not open popups. On success |success| is true. | 1367 // not open popups. On success |success| is true. |
| 1360 IPC_SYNC_MESSAGE_ROUTED2_1( | 1368 IPC_SYNC_MESSAGE_ROUTED2_1( |
| 1361 AutomationMsg_ExecuteExtensionActionInActiveTabAsync, | 1369 AutomationMsg_ExecuteExtensionActionInActiveTabAsync, |
| 1362 int /* extension handle */, | 1370 int /* extension handle */, |
| 1363 int /* browser handle */, | 1371 int /* browser handle */, |
| 1364 bool /* success */) | 1372 bool /* success */) |
| 1365 | 1373 |
| 1366 // Moves the browser action to the given index in the browser action toolbar. | 1374 // Moves the browser action to the given index in the browser action toolbar. |
| 1367 // On success |success| is true. | 1375 // On success |success| is true. |
| 1368 IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_MoveExtensionBrowserAction, | 1376 IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_MoveExtensionBrowserAction, |
| 1369 int /* extension handle */, | 1377 int /* extension handle */, |
| 1370 int /* index */, | 1378 int /* index */, |
| 1371 bool /* success */) | 1379 bool /* success */) |
| 1372 | 1380 |
| 1373 // Gets an extension property |property type|. On success |success| is true, | 1381 // Gets an extension property |property type|. On success |success| is true, |
| 1374 // and |property value| is set. | 1382 // and |property value| is set. |
| 1375 IPC_SYNC_MESSAGE_ROUTED2_2(AutomationMsg_GetExtensionProperty, | 1383 IPC_SYNC_MESSAGE_ROUTED2_2(AutomationMsg_GetExtensionProperty, |
| 1376 int /* extension handle */, | 1384 int /* extension handle */, |
| 1377 AutomationMsg_ExtensionProperty /* property type */, | 1385 AutomationMsg_ExtensionProperty /* property type */, |
| 1378 bool /* success */, | 1386 bool /* success */, |
| 1379 std::string /* property value */) | 1387 std::string /* property value */) |
| 1380 | 1388 |
| 1381 // Resets to the default theme. | 1389 // Resets to the default theme. |
| 1382 IPC_SYNC_MESSAGE_ROUTED0_0(AutomationMsg_ResetToDefaultTheme) | 1390 IPC_SYNC_MESSAGE_ROUTED0_0(AutomationMsg_ResetToDefaultTheme) |
| 1383 | 1391 |
| 1384 // Navigates asynchronously to a URL with a certain disposition, | 1392 // Navigates asynchronously to a URL with a certain disposition, |
| 1385 // like in a new tab. | 1393 // like in a new tab. |
| 1386 IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_NavigationAsyncWithDisposition, | 1394 IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_NavigationAsyncWithDisposition, |
| 1387 int /* tab handle */, | 1395 int /* tab handle */, |
| 1388 GURL, | 1396 GURL, |
| 1389 WindowOpenDisposition, | 1397 WindowOpenDisposition, |
| 1390 bool /* result */) | 1398 bool /* result */) |
| 1391 | 1399 |
| 1392 | 1400 |
| 1393 // This message requests the cookie be deleted for given url in the | 1401 // This message requests the cookie be deleted for given url in the |
| 1394 // profile of the tab identified by the first parameter. The second | 1402 // profile of the tab identified by the first parameter. The second |
| 1395 // parameter is the cookie name. | 1403 // parameter is the cookie name. |
| 1396 IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_DeleteCookie, GURL, std::string, | 1404 IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_DeleteCookie, GURL, std::string, |
| 1397 int /* tab handle */, | 1405 int /* tab handle */, |
| 1398 bool /* result */) | 1406 bool /* result */) |
| 1399 | 1407 |
| 1400 // This message triggers the collected cookies dialog for a specific tab. | 1408 // This message triggers the collected cookies dialog for a specific tab. |
| 1401 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_ShowCollectedCookiesDialog, | 1409 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_ShowCollectedCookiesDialog, |
| 1402 int /* tab handle */, | 1410 int /* tab handle */, |
| 1403 bool /* result */) | 1411 bool /* result */) |
| 1404 | 1412 |
| 1405 // This message requests the external tab identified by the tab handle | 1413 // This message requests the external tab identified by the tab handle |
| 1406 // passed in be closed. | 1414 // passed in be closed. |
| 1407 // Request: | 1415 // Request: |
| 1408 // -int: Tab handle | 1416 // -int: Tab handle |
| 1409 // Response: | 1417 // Response: |
| 1410 // None expected | 1418 // None expected |
| 1411 IPC_MESSAGE_ROUTED1(AutomationMsg_CloseExternalTab, int) | 1419 IPC_MESSAGE_ROUTED1(AutomationMsg_CloseExternalTab, int) |
| 1412 | 1420 |
| 1413 // This message requests that the external tab identified by the tab handle | 1421 // This message requests that the external tab identified by the tab handle |
| 1414 // runs unload handlers if any on the current page. | 1422 // runs unload handlers if any on the current page. |
| 1415 // Request: | 1423 // Request: |
| 1416 // -int: Tab handle | 1424 // -int: Tab handle |
| 1417 // -bool: result: true->unload, false->don't unload | 1425 // -bool: result: true->unload, false->don't unload |
| 1418 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_RunUnloadHandlers, int, bool) | 1426 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_RunUnloadHandlers, int, bool) |
| 1419 | 1427 |
| 1420 // This message sets the current zoom level on the tab | 1428 // This message sets the current zoom level on the tab |
| 1421 // Request: | 1429 // Request: |
| 1422 // -int: Tab handle | 1430 // -int: Tab handle |
| 1423 // -int: Zoom level. Values ZOOM_OUT = -1, RESET = 0, ZOOM_IN = 1 | 1431 // -int: Zoom level. Values ZOOM_OUT = -1, RESET = 0, ZOOM_IN = 1 |
| 1424 // Response: | 1432 // Response: |
| 1425 // None expected | 1433 // None expected |
| 1426 IPC_MESSAGE_ROUTED2(AutomationMsg_SetZoomLevel, int, int) | 1434 IPC_MESSAGE_ROUTED2(AutomationMsg_SetZoomLevel, int, int) |
| 1427 | 1435 |
| 1428 // Waits for tab count to reach target value. | 1436 // Waits for tab count to reach target value. |
| 1429 IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_WaitForTabCountToBecome, | 1437 IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_WaitForTabCountToBecome, |
| 1430 int /* browser handle */, | 1438 int /* browser handle */, |
| 1431 int /* target tab count */, | 1439 int /* target tab count */, |
| 1432 bool /* success */) | 1440 bool /* success */) |
| 1433 | 1441 |
| 1434 // Waits for the infobar count to reach given number. | 1442 // Waits for the infobar count to reach given number. |
| 1435 IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_WaitForInfoBarCount, | 1443 IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_WaitForInfoBarCount, |
| 1436 int /* tab handle */, | 1444 int /* tab handle */, |
| 1437 int /* target count */, | 1445 int /* target count */, |
| 1438 bool /* success */) | 1446 bool /* success */) |
| 1439 | 1447 |
| 1440 // Waits for the autocomplete edit to receive focus. | 1448 // Waits for the autocomplete edit to receive focus. |
| 1441 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_WaitForAutocompleteEditFocus, | 1449 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_WaitForAutocompleteEditFocus, |
| 1442 int /* autocomplete edit handle */, | 1450 int /* autocomplete edit handle */, |
| 1443 bool /* success */) | 1451 bool /* success */) |
| 1444 | 1452 |
| 1445 // Loads all blocked plug-ins on the page. | 1453 // Loads all blocked plug-ins on the page. |
| 1446 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_LoadBlockedPlugins, | 1454 IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_LoadBlockedPlugins, |
| 1447 int /* tab handle */, | 1455 int /* tab handle */, |
| 1448 bool /* success */) | 1456 bool /* success */) |
| 1449 | 1457 |
| 1450 // Captures the entire page for the tab, including those portions not in | 1458 // Captures the entire page for the tab, including those portions not in |
| 1451 // view, and saves the image as a PNG in the given file location. | 1459 // view, and saves the image as a PNG in the given file location. |
| 1452 // Request: | 1460 // Request: |
| 1453 // -int: Tab handle | 1461 // -int: Tab handle |
| 1454 // -FilePath: Path to save the captured image to | 1462 // -FilePath: Path to save the captured image to |
| 1455 // Response: | 1463 // Response: |
| 1456 // -bool: Whether the method succeeded | 1464 // -bool: Whether the method succeeded |
| 1457 IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_CaptureEntirePageAsPNG, int, | 1465 IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_CaptureEntirePageAsPNG, int, |
| 1458 FilePath, bool) | 1466 FilePath, bool) |
| 1459 | |
| 1460 IPC_END_MESSAGES(Automation) | |
| OLD | NEW |