Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(228)

Side by Side Diff: chrome/common/automation_messages_internal.h

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

Powered by Google App Engine
This is Rietveld 408576698