Home | History | Annotate | Download | only in prerender
      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.
      4 
      5 #include "chrome/renderer/prerender/prerender_extra_data.h"
      6 
      7 #include "base/logging.h"
      8 
      9 namespace prerender {
     10 
     11 PrerenderExtraData::PrerenderExtraData(
     12     int prerender_id,
     13     int render_view_route_id,
     14     const gfx::Size& size)
     15     : prerender_id_(prerender_id),
     16       render_view_route_id_(render_view_route_id),
     17       size_(size) {
     18 }
     19 
     20 PrerenderExtraData::~PrerenderExtraData() {
     21 }
     22 
     23 // static
     24 const PrerenderExtraData& PrerenderExtraData::FromPrerender(
     25     const blink::WebPrerender& prerender) {
     26   DCHECK(prerender.extraData());
     27   return static_cast<const PrerenderExtraData&>(*prerender.extraData());
     28 }
     29 
     30 }  // namespace prerender
     31 
     32