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

Unified Diff: chrome/renderer/prerender/prerender_extra_data.cc

Issue 9875026: **NOTFORLANDING** New link rel=prerender API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch sets 3-7 against trunk, for combined browsing Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/prerender/prerender_extra_data.cc
diff --git a/chrome/renderer/prerender/prerender_extra_data.cc b/chrome/renderer/prerender/prerender_extra_data.cc
new file mode 100644
index 0000000000000000000000000000000000000000..372b6e29da0ea7c3900e697d332e26ade84a09b9
--- /dev/null
+++ b/chrome/renderer/prerender/prerender_extra_data.cc
@@ -0,0 +1,27 @@
+// 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.
+
+#include "chrome/renderer/prerender/prerender_extra_data.h"
+
+#include "base/logging.h"
+
+namespace prerender {
+
+PrerenderExtraData::PrerenderExtraData(
+ int prerender_id,
+ int render_view_route_id,
+ const gfx::Size& size)
+ : prerender_id_(prerender_id),
+ render_view_route_id_(render_view_route_id),
+ size_(size) {
+}
+
+// static
+const PrerenderExtraData& PrerenderExtraData::fromPrerender(
+ const WebKit::WebPrerender& prerender) {
+ DCHECK(prerender.extraData());
+ return static_cast<const PrerenderExtraData&>(*prerender.extraData());
+}
+
+} // namespace webkit_glue

Powered by Google App Engine
This is Rietveld 408576698