Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 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. |
| 4 | |
| 5 | // Multiply-included message file, no traditional include guard. |
| 6 | #include "content/public/common/common_param_traits.h" |
| 7 | #include "content/public/common/referrer.h" |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 8 | #include "ipc/ipc_message.h" |
| 9 | #include "ipc/ipc_message_macros.h" |
| 10 | #include "ipc/ipc_param_traits.h" |
Torne (Richard Coles) | 868fa2f | 2013-06-11 10:57:03 +0100 | [diff] [blame] | 11 | #include "third_party/WebKit/public/platform/WebReferrerPolicy.h" |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 12 | #include "ui/gfx/size.h" |
Ben Murdoch | 7dbb3d5 | 2013-07-17 14:55:54 +0100 | [diff] [blame] | 13 | #include "url/gurl.h" |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 14 | |
| 15 | #define IPC_MESSAGE_START PrerenderMsgStart |
| 16 | |
| 17 | // PrerenderLinkManager Messages |
| 18 | // These are messages sent from the renderer to the browser in |
| 19 | // relation to <link rel=prerender> elements. |
| 20 | |
| 21 | // Notifies of the insertion of a <link rel=prerender> element in the |
| 22 | // document. |
| 23 | IPC_MESSAGE_CONTROL5(PrerenderHostMsg_AddLinkRelPrerender, |
| 24 | int /* prerender_id, assigned by WebPrerendererClient */, |
| 25 | GURL /* url */, |
| 26 | content::Referrer, |
| 27 | gfx::Size, |
| 28 | int /* render_view_route_id of launcher */) |
| 29 | |
| 30 | // Notifies on removal of a <link rel=prerender> element from the document. |
| 31 | IPC_MESSAGE_CONTROL1(PrerenderHostMsg_CancelLinkRelPrerender, |
| 32 | int /* prerender_id, assigned by WebPrerendererClient */) |
| 33 | |
| 34 | // Notifies on unloading a <link rel=prerender> element from a frame. |
| 35 | IPC_MESSAGE_CONTROL1(PrerenderHostMsg_AbandonLinkRelPrerender, |
| 36 | int /* prerender_id, assigned by WebPrerendererClient */) |
| 37 | |
| 38 | // PrerenderDispatcher Messages |
| 39 | // These are messages sent from the browser to the renderer in relation to |
| 40 | // running prerenders. |
| 41 | |
| 42 | // Tells a renderer if it's currently being prerendered. Must only be set |
| 43 | // to true before any navigation occurs, and only set to false at most once |
| 44 | // after that. |
| 45 | IPC_MESSAGE_ROUTED1(PrerenderMsg_SetIsPrerendering, |
| 46 | bool /* whether the RenderView is prerendering */) |
| 47 | |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 48 | // Signals to launcher that a prerender is running. |
| 49 | IPC_MESSAGE_CONTROL1(PrerenderMsg_OnPrerenderStart, |
| 50 | int /* prerender_id */) |
| 51 | |
| 52 | // Signals to launcher that a prerender is running. |
| 53 | IPC_MESSAGE_CONTROL1(PrerenderMsg_OnPrerenderStopLoading, |
| 54 | int /* prerender_id */) |
| 55 | |
| 56 | // Signals to a launcher that a new alias has been added to a prerender. |
Torne (Richard Coles) | 90dce4d | 2013-05-29 14:40:03 +0100 | [diff] [blame] | 57 | IPC_MESSAGE_CONTROL1(PrerenderMsg_OnPrerenderAddAlias, |
Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame] | 58 | GURL /* url */) |
| 59 | |
Torne (Richard Coles) | 90dce4d | 2013-05-29 14:40:03 +0100 | [diff] [blame] | 60 | // Signals to a launcher that a new alias has been added to a prerender. |
| 61 | IPC_MESSAGE_CONTROL1(PrerenderMsg_OnPrerenderRemoveAliases, |
| 62 | std::vector<GURL> /* urls */) |
| 63 | |
Torne (Richard Coles) | 2a99a7e | 2013-03-28 15:31:22 +0000 | [diff] [blame] | 64 | // Signals to a launcher that a prerender is no longer running. |
| 65 | IPC_MESSAGE_CONTROL1(PrerenderMsg_OnPrerenderStop, |
| 66 | int /* prerender_id */) |