1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // Defines the IPC messages used by the automation interface.
7 // NOTE: All IPC messages have either a routing_id of 0 (for asynchronous
8 // messages), or one that's been assigned by the proxy (for calls
9 // which expect a response). The routing_id shouldn't be used for
10 // any other purpose in these message types.
12 // NOTE: All the new IPC messages should go at the end.
13 // The test <--> browser IPC message IDs need to match the reference
14 // builds. Since we now define the IDs based on __LINE__, to allow these
15 // IPC messages to be used to control an old version of Chrome we need
16 // the message IDs to remain the same. This means that you should not
17 // change the line number of these types of messages.
20 #define IPC_MESSAGE_START AutomationMsgStart
22 // This message is fired when the AutomationProvider is up and running
23 // in the app (the app is not fully up at this point). The parameter to this
24 // message is the version string of the automation provider. This parameter
25 // is defined to be the version string as returned by
26 // chrome::VersionInfo::Version().
27 // The client can choose to use this version string to decide whether or not
28 // it can talk to the provider.
29 IPC_MESSAGE_CONTROL1(AutomationMsg_Hello
,
32 // This message is fired when the initial tab(s) are finished loading.
33 IPC_MESSAGE_CONTROL0(AutomationMsg_InitialLoadsComplete
)
35 // This message notifies the AutomationProvider to append a new tab the
36 // window with the given handle. The return value contains the index of
37 // the new tab, or -1 if the request failed.
38 // The second parameter is the url to be loaded in the new tab.
39 IPC_SYNC_MESSAGE_CONTROL2_1(AutomationMsg_AppendTab
,
44 // This message requests the (zero-based) index for the currently
45 // active tab in the window with the given handle. The return value contains
46 // the index of the active tab, or -1 if the request failed.
47 IPC_SYNC_MESSAGE_CONTROL1_1(AutomationMsg_ActiveTabIndex
,
51 // This message notifies the AutomationProvider to active the tab.
52 // The first parameter is the handle to window resource.
53 // The second parameter is the (zero-based) index to be activated
54 IPC_SYNC_MESSAGE_CONTROL2_1(AutomationMsg_ActivateTab
,
59 // This message requests the cookie value for given url in the
60 // profile of the tab identified by the second parameter. The first
61 // parameter is the URL string. The response contains the length of the
62 // cookie value string. On failure, this length = -1.
63 IPC_SYNC_MESSAGE_CONTROL2_2(AutomationMsg_GetCookies
,
69 // 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
71 // 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.
73 // The return value is a non-negative value on success.
74 IPC_SYNC_MESSAGE_CONTROL3_1(AutomationMsg_DEPRECATED_SetCookie
,
80 // This message is used to implement the asynchronous version of
82 IPC_SYNC_MESSAGE_CONTROL2_1(AutomationMsg_NavigationAsync
,
87 // This message requests the number of browser windows that the app currently
88 // has open. The return value is the number of windows.
89 IPC_SYNC_MESSAGE_CONTROL0_1(AutomationMsg_BrowserWindowCount
,
92 // This message requests the handle (int64 app-unique identifier) of the
93 // window with the given (zero-based) index. On error, the returned handle
95 IPC_SYNC_MESSAGE_CONTROL1_1(AutomationMsg_BrowserWindow
,
99 // This message requests the number of tabs in the window with the given
100 // handle. The return value contains the number of tabs, or -1 if the
102 IPC_SYNC_MESSAGE_CONTROL1_1(AutomationMsg_TabCount
,
106 // This message requests the handle of the tab with the given (zero-based)
107 // index in the given app window. First parameter specifies the given window
108 // handle, second specifies the given tab_index. On error, the returned handle
110 IPC_SYNC_MESSAGE_CONTROL2_1(AutomationMsg_Tab
,
115 // This message requests the the title of the tab with the given handle.
116 // The return value contains the size of the title string. On error, this
117 // value should be -1 and empty string. Note that the title can be empty in
118 // which case the size would be 0.
119 IPC_SYNC_MESSAGE_CONTROL1_2(AutomationMsg_TabTitle
,
124 // This message requests the url of the tab with the given handle.
125 // The return value contains a success flag and the URL string. The URL will
126 // be empty on failure, and it still may be empty on success.
127 IPC_SYNC_MESSAGE_CONTROL1_2(AutomationMsg_TabURL
,
128 int /* tab handle */,
129 bool /* success flag */,
132 // This message notifies the AutomationProxy that a handle that it has
133 // previously been given is now invalid. (For instance, if the handle
134 // represented a window which has now been closed.) The parameter
135 // value is the handle.
136 IPC_MESSAGE_CONTROL1(AutomationMsg_InvalidateHandle
,
139 // This message notifies the AutomationProvider that a handle is no
140 // longer being used, so it can stop paying attention to the
141 // associated resource. The parameter value is the handle.
142 IPC_MESSAGE_CONTROL1(AutomationMsg_HandleUnused
,
145 // This message requests that the AutomationProvider executes a JavaScript,
146 // which is sent embedded in a 'javascript:' URL.
147 // The javascript is executed in context of child frame whose xpath
148 // is passed as parameter (context_frame). The execution results in
149 // a serialized JSON string response.
150 IPC_SYNC_MESSAGE_CONTROL3_1(AutomationMsg_DomOperation
,
151 int /* tab handle */,
152 std::wstring
/* context_frame */,
153 std::wstring
/* the javascript to be executed */,
154 std::string
/* the serialized json string containg
155 the result of a javascript
158 // Is the Download Shelf visible for the specified browser?
159 IPC_SYNC_MESSAGE_CONTROL1_1(AutomationMsg_DEPRECATED_ShelfVisibility
,
160 int /* browser_handle */,
161 bool /* is_visible */)
163 // This message requests the bounds of the specified View element in
164 // window coordinates.
166 // int - the handle of the window in which the view appears
167 // int - the ID of the view, as specified in chrome/browser/ui/view_ids.h
168 // bool - whether the bounds should be returned in the screen coordinates
169 // (if true) or in the browser coordinates (if false).
171 // bool - true if the view was found
172 // gfx::Rect - the bounds of the view, in window coordinates
173 IPC_SYNC_MESSAGE_CONTROL3_2(AutomationMsg_WindowViewBounds
,
180 // This message sets the bounds of the window.
182 // int - the handle of the window to resize
183 // gfx::Rect - the bounds of the window
185 // bool - true if the resize was successful
186 IPC_SYNC_MESSAGE_CONTROL2_1(AutomationMsg_SetWindowBounds
,
191 // TODO(port): Port these messages.
193 // This message requests that a drag be performed in window coordinate space
195 // int - the handle of the window that's the context for this drag
196 // std::vector<gfx::Point> - the path of the drag in window coordinate
197 // space; it should have at least 2 points
199 // int - the flags which identify the mouse button(s) for the drag, as
200 // defined in chrome/views/event.h
202 // bool - true if the drag could be performed
203 IPC_SYNC_MESSAGE_CONTROL4_1(AutomationMsg_DEPRECATED_WindowDrag
,
205 std::vector
<gfx::Point
>,
210 // Similar to AutomationMsg_InitialLoadsComplete, this indicates that the
211 // new tab ui has completed the initial load of its data.
212 // Time is how many milliseconds the load took.
213 IPC_MESSAGE_CONTROL1(AutomationMsg_InitialNewTabUILoadComplete
,
216 // This tells the browser to enable or disable the filtered network layer.
217 IPC_MESSAGE_CONTROL1(AutomationMsg_DEPRECATED_SetFilteredInet
,
220 // Gets the directory that downloads will occur in for the active profile.
221 IPC_SYNC_MESSAGE_CONTROL1_1(AutomationMsg_DEPRECATED_DownloadDirectory
,
222 int /* tab_handle */,
223 base::FilePath
/* directory */)
225 // Opens a new browser window.
226 // TODO(sky): remove this and replace with OpenNewBrowserWindowOfType.
227 // Doing this requires updating the reference build.
228 IPC_SYNC_MESSAGE_CONTROL1_0(AutomationMsg_OpenNewBrowserWindow
,
231 // This message requests the handle (int64 app-unique identifier) of the
232 // current active top window. On error, the returned handle value is 0.
233 IPC_SYNC_MESSAGE_CONTROL0_1(AutomationMsg_DEPRECATED_ActiveWindow
,
236 // This message requests the window associated with the specified browser
238 // The return value contains a success flag and the handle of the window.
239 IPC_SYNC_MESSAGE_CONTROL1_2(AutomationMsg_WindowForBrowser
,
240 int /* browser handle */,
241 bool /* success flag */,
242 int /* window handle */)
244 // This message requests that a key press be performed.
246 // int - the handle of the window that's the context for this click
247 // int - the ui::KeyboardCode of the key that was pressed.
248 // int - the flags which identify the modifiers (shift, ctrl, alt)
249 // associated for, as defined in chrome/views/event.h
250 IPC_MESSAGE_CONTROL3(AutomationMsg_DEPRECATED_WindowKeyPress
,
255 // This message notifies the AutomationProvider to create a tab which is
256 // hosted by an external process.
258 // ExternalTabSettings - settings for external tab
259 IPC_SYNC_MESSAGE_CONTROL1_4(AutomationMsg_CreateExternalTab
,
260 ExternalTabSettings
/* settings*/,
261 HWND
/* Tab container window */,
262 HWND
/* Tab window */,
263 int /* Handle to the new tab */,
264 int /* Session Id of the new tab */)
265 #endif // defined(OS_WIN)
266 // This message notifies the AutomationProvider to navigate to a specified
267 // url in the external tab with given handle. The first parameter is the
268 // handle to the tab resource. The second parameter is the target url.
269 // The third parameter is the referrer.
270 // The return value contains a status code which is nonnegative on success.
271 // see AutomationMsg_NavigationResponseValues for the navigation response.
272 IPC_SYNC_MESSAGE_CONTROL3_1(AutomationMsg_NavigateInExternalTab
,
276 AutomationMsg_NavigationResponseValues
)
278 // This message is an outgoing message from Chrome to an external host.
279 // It is a notification that the NavigationState was changed
281 // -int: The flags specifying what changed
282 // (see content::InvalidateTypes)
285 IPC_MESSAGE_ROUTED2(AutomationMsg_NavigationStateChanged
,
286 int, // content::InvalidateTypes
287 NavigationInfo
) // title, url etc.
289 // This message is an outgoing message from Chrome to an external host.
290 // It is a notification that the target URL has changed (the target URL
291 // is the URL of the link that the user is hovering on)
293 // -std::wstring: The new target URL
296 IPC_MESSAGE_ROUTED1(AutomationMsg_UpdateTargetUrl
,
300 // This message requests that a tab be closed.
302 // - int: handle of the tab to close
303 // - bool: if true the proxy blocks until the tab has completely closed,
304 // otherwise the proxy only blocks until it initiates the close.
305 IPC_SYNC_MESSAGE_CONTROL2_1(AutomationMsg_CloseTab
,
310 // This message requests that the browser be closed.
312 // - int: handle of the browser which contains the tab
314 // - bool: whether the operation was successfull.
315 // - bool: whether the browser process will be terminated as a result (if
316 // this was the last closed browser window).
317 IPC_SYNC_MESSAGE_CONTROL1_2(AutomationMsg_CloseBrowser
,
323 // TODO(port): Port these messages.
325 // This message is an outgoing message from Chrome to an external host.
326 // It is a request to process a keyboard accelerator.
328 // -MSG: The keyboard message
331 // TODO(sanjeevr): Ideally we need to add a response from the external
332 // host saying whether it processed the accelerator
333 IPC_MESSAGE_ROUTED1(AutomationMsg_HandleAccelerator
,
336 // This message is sent by the container of an externally hosted tab to
337 // reflect any accelerator keys that it did not process. This gives the
338 // tab a chance to handle the keys
340 // - int: handle of the tab
341 // -MSG: The keyboard message that the container did not handle
344 IPC_MESSAGE_CONTROL2(AutomationMsg_ProcessUnhandledAccelerator
,
347 #endif // defined(OS_WIN)
349 // Sent by the external tab to the host to notify that the user has tabbed
352 // - bool: |reverse| set to true when shift-tabbing out of the tab, false
356 IPC_MESSAGE_ROUTED1(AutomationMsg_TabbedOut
,
359 // Sent by the external tab host to ask focus to be set to either the first
360 // or last element on the page.
362 // - int: handle of the tab
364 // true: Focus will be set to the last focusable element
365 // false: Focus will be set to the first focusable element
366 // - bool: |restore_focus_to_view|
367 // true: The renderer view associated with the current tab will be
368 // infomed that it is receiving focus.
371 IPC_MESSAGE_CONTROL3(AutomationMsg_SetInitialFocus
,
376 // This message is an outgoing message from Chrome to an external host.
377 // It is a request to open a url
379 // -GURL: The URL to open
380 // -GURL: The referrer
381 // -int: The WindowOpenDisposition that specifies where the URL should
382 // be opened (new tab, new window etc).
385 IPC_MESSAGE_ROUTED3(AutomationMsg_OpenURL
,
390 // This message requests the provider to wait until the specified tab has
391 // finished restoring after session restore.
393 // - int: handle of the tab
395 // - bool: whether the operation was successful.
396 IPC_SYNC_MESSAGE_CONTROL1_1(AutomationMsg_DEPRECATED_WaitForTabToBeRestored
,
399 // This message is an outgoing message from Chrome to an external host.
400 // It is a notification that a navigation happened
405 IPC_MESSAGE_ROUTED1(AutomationMsg_DidNavigate
,
408 // This message requests the different security states of the page displayed
409 // in the specified tab.
411 // - int: handle of the tab
413 // - bool: whether the operation was successful.
414 // - SecurityStyle: the security style of the tab.
415 // - net::CertStatus: the status of the server's ssl cert (0 means no errors or
417 // - int: the insecure content state, 0 means no insecure contents.
419 IPC_SYNC_MESSAGE_CONTROL1_4(AutomationMsg_DEPRECATED_GetSecurityState
,
422 content::SecurityStyle
,
426 // This message requests the page type of the page displayed in the specified
427 // tab (normal, error or interstitial).
429 // - int: handle of the tab
431 // - bool: whether the operation was successful.
432 // - PageType: the type of the page currently displayed.
433 IPC_SYNC_MESSAGE_CONTROL1_2(AutomationMsg_DEPRECATED_GetPageType
,
438 // This message simulates the user action on the SSL blocking page showing in
439 // the specified tab. This message is only effective if an interstitial page
440 // is showing in the tab.
442 // - int: handle of the tab
443 // - bool: whether to proceed or abort the navigation
445 // - AutomationMsg_NavigationResponseValues: result of the operation.
446 IPC_SYNC_MESSAGE_CONTROL2_1(AutomationMsg_DEPRECATED_ActionOnSSLBlockingPage
,
449 AutomationMsg_NavigationResponseValues
)
451 // Message to request that a browser window is brought to the front and
454 // - int: handle of the browser window.
456 // - bool: True if the browser is brought to the front.
457 IPC_SYNC_MESSAGE_CONTROL1_1(AutomationMsg_BringBrowserToFront
,
461 // Message to request whether a certain item is enabled of disabled in the
462 // menu in the browser window
465 // - int: handle of the browser window.
466 // - int: IDC message identifier to query if enabled
468 // - bool: True if the command is enabled on the menu
469 IPC_SYNC_MESSAGE_CONTROL2_1(AutomationMsg_DEPRECATED_IsMenuCommandEnabled
,
474 // This message notifies the AutomationProvider to reload the current page in
475 // the tab with given handle. The first parameter is the handle to the tab
476 // resource. The return value contains a status code which is nonnegative on
478 // see AutomationMsg_NavigationResponseValues for the navigation response.
479 IPC_SYNC_MESSAGE_CONTROL1_1(AutomationMsg_Reload
,
481 AutomationMsg_NavigationResponseValues
)
483 // This message requests the execution of a browser command in the browser
484 // for which the handle is specified.
485 // The return value contains a boolean, whether the command was dispatched.
486 IPC_SYNC_MESSAGE_CONTROL2_1(AutomationMsg_WindowExecuteCommandAsync
,
487 int /* automation handle */,
488 int /* browser command */,
489 bool /* success flag */)
491 // This message requests the execution of a browser command in the browser
492 // for which the handle is specified.
493 // The return value contains a boolean, whether the command was dispatched
494 // and successful executed.
495 IPC_SYNC_MESSAGE_CONTROL2_1(AutomationMsg_WindowExecuteCommand
,
496 int /* automation handle */,
497 int /* browser command */,
498 bool /* success flag */)
501 // This message opens the Find window within a tab corresponding to the
502 // supplied tab handle.
503 IPC_MESSAGE_CONTROL1(AutomationMsg_DEPRECATED_OpenFindInPage
,
504 int /* tab_handle */)
506 // Posts a message from external host to chrome renderer.
507 IPC_MESSAGE_CONTROL4(AutomationMsg_HandleMessageFromExternalHost
,
508 int /* automation handle */,
509 std::string
/* message */,
510 std::string
/* origin */,
511 std::string
/* target */)
513 // A message for an external host.
514 IPC_MESSAGE_ROUTED3(AutomationMsg_ForwardMessageToExternalHost
,
515 std::string
/* message */,
516 std::string
/* origin */,
517 std::string
/* target */)
519 // This message starts a find within a tab corresponding to the supplied
520 // tab handle. The parameter |request| specifies what to search for.
521 // If an error occurs, |matches_found| will be -1.
523 IPC_SYNC_MESSAGE_CONTROL2_2(AutomationMsg_Find
,
524 int /* tab_handle */,
525 AutomationMsg_Find_Params
/* params */,
526 int /* active_ordinal */,
527 int /* matches_found */)
529 // Is the Find window fully visible (and not animating) for the specified
531 IPC_SYNC_MESSAGE_CONTROL1_1(AutomationMsg_FindWindowVisibility
,
532 int /* tab_handle */,
533 bool /* is_visible */)
535 // Gets the bookmark bar visibility, animating and detached states.
536 // TODO(phajdan.jr): Adjust the last param when the reference build is updated.
537 IPC_SYNC_MESSAGE_CONTROL1_3(AutomationMsg_BookmarkBarVisibility
,
538 int /* browser_handle */,
539 bool, /* is_visible */
540 bool, /* still_animating */ bool /* is_detached */)
542 // Uses the specified encoding to override the encoding of the page in the
543 // specified web content tab.
544 IPC_SYNC_MESSAGE_CONTROL2_1(AutomationMsg_OverrideEncoding
,
545 int /* tab handle */,
546 std::string
/* overrided encoding name */,
549 // This message is an outgoing message from Chrome to an external host.
550 // It is a notification that a navigation failed
552 // -int : The status code.
553 // -GURL: The URL we failed to navigate to.
556 IPC_MESSAGE_ROUTED2(AutomationMsg_NavigationFailed
,
561 // This message is an outgoing message from an automation client to Chrome.
562 // It is used to reposition a chrome tab window.
563 IPC_MESSAGE_CONTROL2(AutomationMsg_TabReposition
,
564 int /* tab handle */,
565 Reposition_Params
/* SetWindowPos params */)
566 #endif // defined(OS_WIN)
569 IPC_MESSAGE_ROUTED1(AutomationMsg_TabLoaded
,
572 // This message requests the tabstrip index of the tab with the given handle.
573 // The return value contains the index, which will be -1 on failure.
574 IPC_SYNC_MESSAGE_CONTROL1_1(AutomationMsg_TabIndex
,
578 // This message requests the handle (int64 app-unique identifier) of
579 // a valid tabbed browser window, i.e. normal type and non-incognito mode.
580 // On error, the returned handle value is 0.
581 IPC_SYNC_MESSAGE_CONTROL0_1(AutomationMsg_DEPRECATED_FindTabbedBrowserWindow
,
584 // This message requests the number of normal browser windows, i.e. normal
585 // type and non-incognito mode that the app currently has open. The return
586 // value is the number of windows.
587 IPC_SYNC_MESSAGE_CONTROL0_1(AutomationMsg_NormalBrowserWindowCount
,
590 // This message tells the browser to start using the new proxy configuration
591 // represented by the given JSON string. The parameters used in the JSON
592 // string are defined in automation_constants.h.
593 IPC_MESSAGE_CONTROL1(AutomationMsg_SetProxyConfig
,
594 std::string
/* proxy_config_json_string */)
596 // Sets Download Shelf visibility for the specified browser.
597 IPC_SYNC_MESSAGE_CONTROL2_0(AutomationMsg_DEPRECATED_SetShelfVisibility
,
598 int /* browser_handle */,
599 bool /* is_visible */)
602 IPC_MESSAGE_ROUTED3(AutomationMsg_ForwardContextMenuToExternalHost
,
603 ContextMenuModel
/* description of menu */,
604 int /* align flags */,
605 MiniContextMenuParams
/* params */)
607 IPC_MESSAGE_CONTROL2(AutomationMsg_ForwardContextMenuCommandToChrome
,
608 int /* tab_handle */,
609 int /* selected_command */)
612 // A URL request to be fetched via automation
613 IPC_MESSAGE_ROUTED2(AutomationMsg_RequestStart
,
614 int /* request_id */,
615 AutomationURLRequest
/* request */)
617 // Read data from a URL request to be fetched via automation
618 IPC_MESSAGE_ROUTED2(AutomationMsg_RequestRead
,
619 int /* request_id */,
620 int /* bytes_to_read */)
622 // Response to a AutomationMsg_RequestStart message
623 IPC_MESSAGE_ROUTED2(AutomationMsg_RequestStarted
,
624 int /* request_id */,
625 AutomationURLResponse
/* response */)
627 // Data read via automation
628 IPC_MESSAGE_ROUTED2(AutomationMsg_RequestData
,
629 int /* request_id */,
630 std::string
/* data */)
632 IPC_MESSAGE_ROUTED2(AutomationMsg_RequestEnd
,
633 int /* request_id */,
634 net::URLRequestStatus
/* status */)
636 IPC_MESSAGE_CONTROL1(AutomationMsg_PrintAsync
,
637 int /* tab_handle */)
639 IPC_MESSAGE_ROUTED2(AutomationMsg_SetCookieAsync
,
641 std::string
/* cookie */)
643 IPC_MESSAGE_CONTROL1(AutomationMsg_SelectAll
,
644 int /* tab handle */)
646 IPC_MESSAGE_CONTROL1(AutomationMsg_Cut
,
647 int /* tab handle */)
649 IPC_MESSAGE_CONTROL1(AutomationMsg_Copy
,
650 int /* tab handle */)
652 IPC_MESSAGE_CONTROL1(AutomationMsg_Paste
,
653 int /* tab handle */)
655 IPC_MESSAGE_CONTROL1(AutomationMsg_ReloadAsync
,
656 int /* tab handle */)
658 IPC_MESSAGE_CONTROL1(AutomationMsg_StopAsync
,
659 int /* tab handle */)
661 // This message notifies the AutomationProvider to navigate to a specified
662 // url in the tab with given handle. The first parameter is the handle to
663 // the tab resource. The second parameter is the target url. The third
664 // parameter is the number of navigations that are required for a successful
665 // return value. See AutomationMsg_NavigationResponseValues for the return
667 IPC_SYNC_MESSAGE_CONTROL3_1(
668 AutomationMsg_NavigateToURLBlockUntilNavigationsComplete
,
672 AutomationMsg_NavigationResponseValues
)
674 // This message notifies the AutomationProvider to navigate to a specified
675 // navigation entry index in the external tab with given handle. The first
676 // parameter is the handle to the tab resource. The second parameter is the
677 // index of navigation entry.
678 // The return value contains a status code which is nonnegative on success.
679 // see AutomationMsg_NavigationResponseValues for the navigation response.
680 IPC_SYNC_MESSAGE_CONTROL2_1(AutomationMsg_NavigateExternalTabAtIndex
,
683 AutomationMsg_NavigationResponseValues
)
685 // This message requests the provider to wait until the window count
686 // reached the specified value.
688 // - int: target browser window count
690 // - bool: whether the operation was successful.
691 IPC_SYNC_MESSAGE_CONTROL1_1(AutomationMsg_WaitForBrowserWindowCountToBecome
,
695 // This message notifies the AutomationProvider to navigate back in session
696 // history in the tab with given handle. The first parameter is the handle
697 // to the tab resource. The second parameter is the number of navigations the
698 // provider will wait for.
699 // See AutomationMsg_NavigationResponseValues for the navigation response
701 IPC_SYNC_MESSAGE_CONTROL2_1(AutomationMsg_GoBackBlockUntilNavigationsComplete
,
704 AutomationMsg_NavigationResponseValues
)
706 // This message notifies the AutomationProvider to navigate forward in session
707 // history in the tab with given handle. The first parameter is the handle
708 // to the tab resource. The second parameter is the number of navigations
709 // the provider will wait for.
710 // See AutomationMsg_NavigationResponseValues for the navigation response
712 IPC_SYNC_MESSAGE_CONTROL2_1(
713 AutomationMsg_GoForwardBlockUntilNavigationsComplete
,
716 AutomationMsg_NavigationResponseValues
)
718 IPC_MESSAGE_ROUTED1(AutomationMsg_AttachExternalTab
,
719 AttachExternalTabParams
)
721 // Sent when the automation client connects to an existing tab.
722 IPC_SYNC_MESSAGE_CONTROL3_4(AutomationMsg_ConnectExternalTab
,
724 bool /* allow/block tab*/,
725 HWND
/* parent window */,
726 HWND
/* Tab container window */,
727 HWND
/* Tab window */,
728 int /* Handle to the new tab */,
729 int /* Session Id of the new tab */)
730 #endif // defined(OS_WIN)
731 // Simulate an end of session. Normally this happens when the user
732 // shuts down the machine or logs off.
734 // int - the handle of the browser
736 // bool - true if succesful
737 IPC_SYNC_MESSAGE_CONTROL1_1(AutomationMsg_TerminateSession
,
741 IPC_MESSAGE_CONTROL2(AutomationMsg_SetPageFontSize
,
742 int /* tab_handle */,
743 int /* The font size */)
745 // Returns a metric event duration that was last recorded. Returns -1 if the
746 // event hasn't occurred yet.
747 IPC_SYNC_MESSAGE_CONTROL1_1(AutomationMsg_GetMetricEventDuration
,
748 std::string
/* event_name */,
749 int /* duration ms */)
751 // Sent by automation provider - go to history entry via automation.
752 IPC_MESSAGE_ROUTED1(AutomationMsg_RequestGoToHistoryEntryOffset
,
753 int) // numbers of entries (negative or positive)
755 // This message requests the type of the window with the given handle. The
756 // return value contains the type (Browser::Type), or -1 if the request
758 IPC_SYNC_MESSAGE_CONTROL1_1(AutomationMsg_Type
,
762 // Opens a new browser window of a specific type.
763 IPC_SYNC_MESSAGE_CONTROL2_0(AutomationMsg_OpenNewBrowserWindowOfType
,
764 int /* Type (Browser::Type) */,
767 // This message requests that the mouse be moved to this location, in
768 // window coordinate space.
770 // int - the handle of the window that's the context for this click
771 // gfx::Point - the location to move to
772 IPC_MESSAGE_CONTROL2(AutomationMsg_DEPRECATED_WindowMouseMove
,
776 // Called when requests should be downloaded using a host browser's
777 // download mechanism when chrome is being embedded.
778 IPC_MESSAGE_ROUTED1(AutomationMsg_DownloadRequestInHost
,
779 int /* request_id */)
781 IPC_MESSAGE_CONTROL1(AutomationMsg_SaveAsAsync
,
782 int /* tab handle */)
785 // An incoming message from an automation host to Chrome. Signals that
786 // the browser containing |tab_handle| has moved.
787 IPC_MESSAGE_CONTROL1(AutomationMsg_BrowserMove
,
788 int /* tab handle */)
791 // Used to get cookies for the given URL.
792 IPC_MESSAGE_ROUTED2(AutomationMsg_GetCookiesFromHost
,
794 int /* opaque_cookie_id */)
796 IPC_MESSAGE_CONTROL5(AutomationMsg_GetCookiesHostResponse
,
797 int /* tab_handle */,
800 std::string
/* cookies */,
801 int /* opaque_cookie_id */)
803 // Return the bookmarks encoded as a JSON string.
804 IPC_SYNC_MESSAGE_CONTROL1_2(AutomationMsg_DEPRECATED_GetBookmarksAsJSON
,
805 int /* browser_handle */,
806 std::string
/* bookmarks as a JSON string */,
809 // Wait for the bookmark model to load.
810 IPC_SYNC_MESSAGE_CONTROL1_1(AutomationMsg_WaitForBookmarkModelToLoad
,
811 int /* browser_handle */,
814 // Bookmark addition, modification, and removal.
815 // Bookmarks are indexed by their id.
816 IPC_SYNC_MESSAGE_CONTROL4_1(AutomationMsg_DEPRECATED_AddBookmarkGroup
,
817 int /* browser_handle */,
818 int64
/* parent_id */,
820 std::wstring
/* title */,
822 IPC_SYNC_MESSAGE_CONTROL5_1(AutomationMsg_DEPRECATED_AddBookmarkURL
,
823 int /* browser_handle */,
824 int64
/* parent_id */,
826 std::wstring
/* title */,
829 IPC_SYNC_MESSAGE_CONTROL4_1(AutomationMsg_DEPRECATED_ReparentBookmark
,
830 int /* browser_handle */,
832 int64
/* new_parent_id */,
835 IPC_SYNC_MESSAGE_CONTROL3_1(AutomationMsg_DEPRECATED_SetBookmarkTitle
,
836 int /* browser_handle */,
838 std::wstring
/* title */,
840 IPC_SYNC_MESSAGE_CONTROL3_1(AutomationMsg_DEPRECATED_SetBookmarkURL
,
841 int /* browser_handle */,
845 IPC_SYNC_MESSAGE_CONTROL2_1(AutomationMsg_DEPRECATED_RemoveBookmark
,
846 int /* browser_handle */,
850 // This message informs the browser process to remove the history entries
851 // for the specified types across all time ranges. See
852 // browsing_data_remover.h for a list of REMOVE_* types supported in the
853 // remove_mask parameter.
854 IPC_MESSAGE_CONTROL1(AutomationMsg_RemoveBrowsingData
,
857 // Generic pyauto pattern to help avoid future addition of
858 // automation messages.
859 IPC_SYNC_MESSAGE_CONTROL2_2(AutomationMsg_SendJSONRequestWithBrowserHandle
,
860 int /* browser_handle */,
861 std::string
/* JSON request */,
862 std::string
/* JSON response */,
865 // Resets to the default theme.
866 IPC_SYNC_MESSAGE_CONTROL0_0(AutomationMsg_DEPRECATED_ResetToDefaultTheme
)
868 // This message requests the external tab identified by the tab handle
869 // passed in be closed.
873 IPC_MESSAGE_ROUTED0(AutomationMsg_CloseExternalTab
)
875 // This message requests that the external tab identified by the tab handle
876 // runs unload handlers if any on the current page.
879 // -bool: result: true->unload, false->don't unload
880 IPC_SYNC_MESSAGE_CONTROL1_1(AutomationMsg_RunUnloadHandlers
,
884 // This message sets the current zoom level on the tab
887 // -int: Zoom level. Values ZOOM_OUT = -1, RESET = 0, ZOOM_IN = 1
890 IPC_MESSAGE_CONTROL2(AutomationMsg_SetZoomLevel
,
894 // Waits for tab count to reach target value.
895 IPC_SYNC_MESSAGE_CONTROL2_1(AutomationMsg_WaitForTabCountToBecome
,
896 int /* browser handle */,
897 int /* target tab count */,
900 // Waits for the infobar count to reach given number.
901 IPC_SYNC_MESSAGE_CONTROL2_1(AutomationMsg_WaitForInfoBarCount
,
902 int /* tab handle */,
903 size_t /* target count */,
906 // Notify the JavaScript engine in the render to change its parameters
907 // while performing stress testing.
908 IPC_MESSAGE_CONTROL3(AutomationMsg_JavaScriptStressTestControl
,
909 int /* tab handle */,
911 int /* type or run */)
913 // This message posts a task to the PROCESS_LAUNCHER thread. Once processed
914 // the response is sent back. This is useful when you want to make sure all
915 // changes to the number of processes have completed.
916 IPC_SYNC_MESSAGE_CONTROL0_0(AutomationMsg_WaitForProcessLauncherThreadToGoIdle
)
918 // This message is an outgoing message from Chrome to an external host.
919 // It is a notification that a popup window position or dimentions have
922 // gfx::Rect - the bounds of the window
925 IPC_MESSAGE_ROUTED1(AutomationMsg_MoveWindow
,
926 gfx::Rect
/* window position and dimentions */)
928 // Call BeginTracing on the browser TraceController. This will tell all
929 // processes to start collecting trace events via base/debug/trace_event.h.
930 IPC_SYNC_MESSAGE_CONTROL1_1(AutomationMsg_BeginTracing
,
931 std::string
/* category_patterns */,
934 // End tracing (called after BeginTracing). This blocks until tracing has
935 // stopped on all processes and all the events are ready to be retrieved.
936 IPC_SYNC_MESSAGE_CONTROL0_2(AutomationMsg_EndTracing
,
937 base::FilePath
/* result_file_path */,
940 // Used on Mac OS X to read the number of active Mach ports used in the browser
942 IPC_SYNC_MESSAGE_CONTROL0_1(AutomationMsg_GetMachPortCount
,
943 int /* number of Mach ports */)
945 // Generic pyauto pattern to help avoid future addition of
946 // automation messages.
947 IPC_SYNC_MESSAGE_CONTROL2_2(AutomationMsg_SendJSONRequest
,
948 int /* window_index */,
949 std::string
/* JSON request */,
950 std::string
/* JSON response */,