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 |