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 // Multiply-included message file, no traditional include guard.
6 #include "content/public/common/common_param_traits.h"
7 #include "content/public/common/referrer.h"
8 #include "ipc/ipc_message.h"
9 #include "ipc/ipc_message_macros.h"
10 #include "ipc/ipc_param_traits.h"
11 #include "ui/gfx/geometry/size.h"
14 #define IPC_MESSAGE_START PrerenderMsgStart
16 // PrerenderLinkManager Messages
17 // These are messages sent from the renderer to the browser in
18 // relation to <link rel=prerender> elements.
20 IPC_STRUCT_BEGIN(PrerenderAttributes
)
21 IPC_STRUCT_MEMBER(GURL
, url
)
22 IPC_STRUCT_MEMBER(uint32
, rel_types
)
25 // Notifies of the insertion of a <link rel=prerender> element in the
27 IPC_MESSAGE_CONTROL5(PrerenderHostMsg_AddLinkRelPrerender
,
28 int /* prerender_id, assigned by WebPrerendererClient */,
32 int /* render_view_route_id of launcher */)
34 // Notifies on removal of a <link rel=prerender> element from the document.
35 IPC_MESSAGE_CONTROL1(PrerenderHostMsg_CancelLinkRelPrerender
,
36 int /* prerender_id, assigned by WebPrerendererClient */)
38 // Notifies on unloading a <link rel=prerender> element from a frame.
39 IPC_MESSAGE_CONTROL1(PrerenderHostMsg_AbandonLinkRelPrerender
,
40 int /* prerender_id, assigned by WebPrerendererClient */)
42 // PrerenderDispatcher Messages
43 // These are messages sent from the browser to the renderer in relation to
44 // running prerenders.
46 // Tells a renderer if it's currently being prerendered. Must only be set
47 // to true before any navigation occurs, and only set to false at most once
49 IPC_MESSAGE_ROUTED1(PrerenderMsg_SetIsPrerendering
,
50 bool /* whether the RenderView is prerendering */)
52 // Signals to launcher that a prerender is running.
53 IPC_MESSAGE_CONTROL1(PrerenderMsg_OnPrerenderStart
,
54 int /* prerender_id */)
56 // Signals to launcher that a prerender is running.
57 IPC_MESSAGE_CONTROL1(PrerenderMsg_OnPrerenderStopLoading
,
58 int /* prerender_id */)
60 // Signals to launcher that a prerender has had it's 'domcontentloaded' event.
61 IPC_MESSAGE_CONTROL1(PrerenderMsg_OnPrerenderDomContentLoaded
,
62 int /* prerender_id */)
64 // Signals to a launcher that a new alias has been added to a prerender.
65 IPC_MESSAGE_CONTROL1(PrerenderMsg_OnPrerenderAddAlias
,
68 // Signals to a launcher that a new alias has been added to a prerender.
69 IPC_MESSAGE_CONTROL1(PrerenderMsg_OnPrerenderRemoveAliases
,
70 std::vector
<GURL
> /* urls */)
72 // Signals to a launcher that a prerender is no longer running.
73 IPC_MESSAGE_CONTROL1(PrerenderMsg_OnPrerenderStop
,
74 int /* prerender_id */)