summaryrefslogtreecommitdiffstats
path: root/chrome/common/prerender_messages.h
diff options
context:
space:
mode:
authorcbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-09 14:06:50 +0000
committercbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-09 14:06:50 +0000
commita0358d77904f3c4959f0411a53448e5944019689 (patch)
tree95336b076c8820c040853fdbece0456394f9e328 /chrome/common/prerender_messages.h
parent874a8fc3c78909bf1db133e26ca38ed948b235ff (diff)
downloadchromium_src-a0358d77904f3c4959f0411a53448e5944019689.zip
chromium_src-a0358d77904f3c4959f0411a53448e5944019689.tar.gz
chromium_src-a0358d77904f3c4959f0411a53448e5944019689.tar.bz2
Prerendered pages are swapped in at browser::Navigate time.
They used to get swapped in by observing provisional loads. This is being changed to Navigate so renderer-issued navigations into a prerender can be handled with the same mechanism that is used to handle renderer-issued navigations which need to cross process boundaries, such as clicking into a hosted app. For browser issued navigations, this means that we will immediately swap in the prerender, instead of sending a Navigate message to the render view and swapping in on the provisional load statement. For renderer issued navigations, decidePolicyForNavigation will ultimately cancel the navigation in the renderer and send an OpenURL up to the browser process. In order to make the renderer know that a navigation could be prerendered, a set of prerendered URLs need to be sent to a render process. BUG=104493 TEST=Existing browser tests, manual tests that omnibox prerenders work. There should be no user-visible changes. Review URL: http://codereview.chromium.org/9623018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125836 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/prerender_messages.h')
-rw-r--r--chrome/common/prerender_messages.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/chrome/common/prerender_messages.h b/chrome/common/prerender_messages.h
new file mode 100644
index 0000000..4c965a9
--- /dev/null
+++ b/chrome/common/prerender_messages.h
@@ -0,0 +1,25 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Multiply-included message file, no traditional include guard.
+#include "googleurl/src/gurl.h"
+#include "ipc/ipc_message.h"
+#include "ipc/ipc_message_macros.h"
+#include "ipc/ipc_param_traits.h"
+
+#define IPC_MESSAGE_START PrerenderMsgStart
+
+// Tells a renderer if it's currently being prerendered. Must only be set
+// to true before any navigation occurs, and only set to false at most once
+// after that.
+IPC_MESSAGE_ROUTED1(PrerenderMsg_SetIsPrerendering,
+ bool /* whether the RenderView is prerendering */)
+
+// Specifies that a URL is currently being prerendered.
+IPC_MESSAGE_CONTROL1(PrerenderMsg_AddPrerenderURL,
+ GURL /* url */)
+
+// Specifies that a URL is no longer being prerendered.
+IPC_MESSAGE_CONTROL1(PrerenderMsg_RemovePrerenderURL,
+ GURL /* url */)