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

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

Issue 7631063: Prefix all IPC messages used by src\chrome with Chrome. For e.g ChromeViewMsg_, ChromeViewHostMsg... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/plugin_observer.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 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 371
372 Details<RenderViewHost> new_render_view_host(details); 372 Details<RenderViewHost> new_render_view_host(details);
373 OnRenderViewHostCreated(new_render_view_host.ptr()); 373 OnRenderViewHostCreated(new_render_view_host.ptr());
374 374
375 // When a new RenderView is created for a prerendering TabContents, 375 // When a new RenderView is created for a prerendering TabContents,
376 // tell the new RenderView it's being used for prerendering before any 376 // tell the new RenderView it's being used for prerendering before any
377 // navigations occur. Note that this is always triggered before the 377 // navigations occur. Note that this is always triggered before the
378 // first navigation, so there's no need to send the message just after 378 // first navigation, so there's no need to send the message just after
379 // the TabContents is created. 379 // the TabContents is created.
380 new_render_view_host->Send( 380 new_render_view_host->Send(
381 new ViewMsg_SetIsPrerendering(new_render_view_host->routing_id(), 381 new ChromeViewMsg_SetIsPrerendering(
382 true)); 382 new_render_view_host->routing_id(),
383 true));
383 } 384 }
384 break; 385 break;
385 } 386 }
386 387
387 case content::NOTIFICATION_TAB_CONTENTS_CONNECTED: { 388 case content::NOTIFICATION_TAB_CONTENTS_CONNECTED: {
388 if (prerender_contents_.get()) { 389 if (prerender_contents_.get()) {
389 DCHECK_EQ(Source<TabContents>(source).ptr(), 390 DCHECK_EQ(Source<TabContents>(source).ptr(),
390 prerender_contents_->tab_contents()); 391 prerender_contents_->tab_contents());
391 // Set the new TabContents and its RenderViewHost as hidden, to reduce 392 // Set the new TabContents and its RenderViewHost as hidden, to reduce
392 // resource usage. This can only be done after the size has been sent 393 // resource usage. This can only be done after the size has been sent
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 bool PrerenderContents::IsCrossSiteNavigationPending() const { 618 bool PrerenderContents::IsCrossSiteNavigationPending() const {
618 if (!prerender_contents_.get() || !prerender_contents_->tab_contents()) 619 if (!prerender_contents_.get() || !prerender_contents_->tab_contents())
619 return false; 620 return false;
620 const TabContents* tab_contents = prerender_contents_->tab_contents(); 621 const TabContents* tab_contents = prerender_contents_->tab_contents();
621 return (tab_contents->GetSiteInstance() != 622 return (tab_contents->GetSiteInstance() !=
622 tab_contents->GetPendingSiteInstance()); 623 tab_contents->GetPendingSiteInstance());
623 } 624 }
624 625
625 626
626 } // namespace prerender 627 } // namespace prerender
OLDNEW
« no previous file with comments | « chrome/browser/plugin_observer.cc ('k') | chrome/browser/prerender/prerender_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698