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

Side by Side Diff: chrome/browser/prerender/prerender_contents.cc

Issue 8515027: Define the public version of the browser side RenderProcessHost interface. This interface is not ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/prefs/browser_prefs.cc ('k') | chrome/browser/prerender/prerender_manager.cc » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "chrome/browser/prerender/prerender_contents.h" 5 #include "chrome/browser/prerender/prerender_contents.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/process_util.h" 10 #include "base/process_util.h"
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 tab_contents_delegate_.reset(new TabContentsDelegateImpl(this)); 275 tab_contents_delegate_.reset(new TabContentsDelegateImpl(this));
276 new_contents->set_delegate(tab_contents_delegate_.get()); 276 new_contents->set_delegate(tab_contents_delegate_.get());
277 277
278 // Set the size of the prerender TabContents. 278 // Set the size of the prerender TabContents.
279 prerender_contents_->view()->SizeContents(tab_bounds.size()); 279 prerender_contents_->view()->SizeContents(tab_bounds.size());
280 280
281 // Register as an observer of the RenderViewHost so we get messages. 281 // Register as an observer of the RenderViewHost so we get messages.
282 render_view_host_observer_.reset( 282 render_view_host_observer_.reset(
283 new PrerenderRenderViewHostObserver(this, render_view_host_mutable())); 283 new PrerenderRenderViewHostObserver(this, render_view_host_mutable()));
284 284
285 child_id_ = render_view_host()->process()->id(); 285 child_id_ = render_view_host()->process()->GetID();
286 route_id_ = render_view_host()->routing_id(); 286 route_id_ = render_view_host()->routing_id();
287 287
288 // Register this with the ResourceDispatcherHost as a prerender 288 // Register this with the ResourceDispatcherHost as a prerender
289 // RenderViewHost. This must be done before the Navigate message to catch all 289 // RenderViewHost. This must be done before the Navigate message to catch all
290 // resource requests, but as it is on the same thread as the Navigate message 290 // resource requests, but as it is on the same thread as the Navigate message
291 // (IO) there is no race condition. 291 // (IO) there is no race condition.
292 prerender_tracker_->OnPrerenderingStarted( 292 prerender_tracker_->OnPrerenderingStarted(
293 child_id_, 293 child_id_,
294 route_id_, 294 route_id_,
295 prerender_manager_); 295 prerender_manager_);
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 bool PrerenderContents::IsCrossSiteNavigationPending() const { 677 bool PrerenderContents::IsCrossSiteNavigationPending() const {
678 if (!prerender_contents_.get() || !prerender_contents_->tab_contents()) 678 if (!prerender_contents_.get() || !prerender_contents_->tab_contents())
679 return false; 679 return false;
680 const TabContents* tab_contents = prerender_contents_->tab_contents(); 680 const TabContents* tab_contents = prerender_contents_->tab_contents();
681 return (tab_contents->GetSiteInstance() != 681 return (tab_contents->GetSiteInstance() !=
682 tab_contents->GetPendingSiteInstance()); 682 tab_contents->GetPendingSiteInstance());
683 } 683 }
684 684
685 685
686 } // namespace prerender 686 } // namespace prerender
OLDNEW
« no previous file with comments | « chrome/browser/prefs/browser_prefs.cc ('k') | chrome/browser/prerender/prerender_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698