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

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

Issue 2179903005: [Prerender] Change IPC from bool to enum for more prerender modes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prefetchProto
Patch Set: Rebase Created 4 years, 4 months 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
« no previous file with comments | « chrome/browser/prerender/prerender_contents.cc ('k') | chrome/common/prerender_types.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) 2012 The Chromium Authors. All rights reserved. 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 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 // Multiply-included message file, no traditional include guard. 5 // Multiply-included message file, no traditional include guard.
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "chrome/common/prerender_types.h"
9 #include "content/public/common/referrer.h" 10 #include "content/public/common/referrer.h"
10 #include "ipc/ipc_message.h" 11 #include "ipc/ipc_message.h"
11 #include "ipc/ipc_message_macros.h" 12 #include "ipc/ipc_message_macros.h"
12 #include "ipc/ipc_param_traits.h" 13 #include "ipc/ipc_param_traits.h"
13 #include "ui/gfx/geometry/size.h" 14 #include "ui/gfx/geometry/size.h"
14 #include "url/gurl.h" 15 #include "url/gurl.h"
15 #include "url/ipc/url_param_traits.h" 16 #include "url/ipc/url_param_traits.h"
16 17
17 #define IPC_MESSAGE_START PrerenderMsgStart 18 #define IPC_MESSAGE_START PrerenderMsgStart
18 19
20 IPC_ENUM_TRAITS_MAX_VALUE(prerender::PrerenderMode,
21 prerender::PRERENDER_MODE_COUNT - 1)
22
19 // PrerenderLinkManager Messages 23 // PrerenderLinkManager Messages
20 // These are messages sent from the renderer to the browser in 24 // These are messages sent from the renderer to the browser in
21 // relation to <link rel=prerender> elements. 25 // relation to <link rel=prerender> elements.
22 26
23 IPC_STRUCT_BEGIN(PrerenderAttributes) 27 IPC_STRUCT_BEGIN(PrerenderAttributes)
24 IPC_STRUCT_MEMBER(GURL, url) 28 IPC_STRUCT_MEMBER(GURL, url)
25 IPC_STRUCT_MEMBER(uint32_t, rel_types) 29 IPC_STRUCT_MEMBER(uint32_t, rel_types)
26 IPC_STRUCT_END() 30 IPC_STRUCT_END()
27 31
28 // Notifies of the insertion of a <link rel=prerender> element in the 32 // Notifies of the insertion of a <link rel=prerender> element in the
(...skipping 11 matching lines...) Expand all
40 44
41 // Notifies on unloading a <link rel=prerender> element from a frame. 45 // Notifies on unloading a <link rel=prerender> element from a frame.
42 IPC_MESSAGE_CONTROL1(PrerenderHostMsg_AbandonLinkRelPrerender, 46 IPC_MESSAGE_CONTROL1(PrerenderHostMsg_AbandonLinkRelPrerender,
43 int /* prerender_id, assigned by WebPrerendererClient */) 47 int /* prerender_id, assigned by WebPrerendererClient */)
44 48
45 // PrerenderDispatcher Messages 49 // PrerenderDispatcher Messages
46 // These are messages sent from the browser to the renderer in relation to 50 // These are messages sent from the browser to the renderer in relation to
47 // running prerenders. 51 // running prerenders.
48 52
49 // Tells a renderer if it's currently being prerendered. Must only be set 53 // Tells a renderer if it's currently being prerendered. Must only be set
50 // to true before any navigation occurs, and only set to false at most once 54 // before any navigation occurs, and only set to NO_PRERENDER at most once after
51 // after that. 55 // that.
52 IPC_MESSAGE_ROUTED1(PrerenderMsg_SetIsPrerendering, 56 IPC_MESSAGE_ROUTED1(PrerenderMsg_SetIsPrerendering, prerender::PrerenderMode)
53 bool /* whether the RenderView is prerendering */)
54 57
55 // Signals to launcher that a prerender is running. 58 // Signals to launcher that a prerender is running.
56 IPC_MESSAGE_CONTROL1(PrerenderMsg_OnPrerenderStart, 59 IPC_MESSAGE_CONTROL1(PrerenderMsg_OnPrerenderStart,
57 int /* prerender_id */) 60 int /* prerender_id */)
58 61
59 // Signals to launcher that a prerender is running. 62 // Signals to launcher that a prerender is running.
60 IPC_MESSAGE_CONTROL1(PrerenderMsg_OnPrerenderStopLoading, 63 IPC_MESSAGE_CONTROL1(PrerenderMsg_OnPrerenderStopLoading,
61 int /* prerender_id */) 64 int /* prerender_id */)
62 65
63 // Signals to launcher that a prerender has had it's 'domcontentloaded' event. 66 // Signals to launcher that a prerender has had it's 'domcontentloaded' event.
64 IPC_MESSAGE_CONTROL1(PrerenderMsg_OnPrerenderDomContentLoaded, 67 IPC_MESSAGE_CONTROL1(PrerenderMsg_OnPrerenderDomContentLoaded,
65 int /* prerender_id */) 68 int /* prerender_id */)
66 69
67 // Signals to a launcher that a new alias has been added to a prerender. 70 // Signals to a launcher that a new alias has been added to a prerender.
68 IPC_MESSAGE_CONTROL1(PrerenderMsg_OnPrerenderAddAlias, 71 IPC_MESSAGE_CONTROL1(PrerenderMsg_OnPrerenderAddAlias,
69 GURL /* url */) 72 GURL /* url */)
70 73
71 // Signals to a launcher that a new alias has been added to a prerender. 74 // Signals to a launcher that a new alias has been added to a prerender.
72 IPC_MESSAGE_CONTROL1(PrerenderMsg_OnPrerenderRemoveAliases, 75 IPC_MESSAGE_CONTROL1(PrerenderMsg_OnPrerenderRemoveAliases,
73 std::vector<GURL> /* urls */) 76 std::vector<GURL> /* urls */)
74 77
75 // Signals to a launcher that a prerender is no longer running. 78 // Signals to a launcher that a prerender is no longer running.
76 IPC_MESSAGE_CONTROL1(PrerenderMsg_OnPrerenderStop, 79 IPC_MESSAGE_CONTROL1(PrerenderMsg_OnPrerenderStop,
77 int /* prerender_id */) 80 int /* prerender_id */)
OLDNEW
« no previous file with comments | « chrome/browser/prerender/prerender_contents.cc ('k') | chrome/common/prerender_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698