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

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

Issue 1008913002: Remove RenderViewHost parameter from WebContentsObserver::Did{Start|Stop}Loading. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 9 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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 <functional> 8 #include <functional>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 void PrerenderContents::RenderFrameCreated( 538 void PrerenderContents::RenderFrameCreated(
539 content::RenderFrameHost* render_frame_host) { 539 content::RenderFrameHost* render_frame_host) {
540 // When a new RenderFrame is created for a prerendering WebContents, tell the 540 // When a new RenderFrame is created for a prerendering WebContents, tell the
541 // new RenderFrame it's being used for prerendering before any navigations 541 // new RenderFrame it's being used for prerendering before any navigations
542 // occur. Note that this is always triggered before the first navigation, so 542 // occur. Note that this is always triggered before the first navigation, so
543 // there's no need to send the message just after the WebContents is created. 543 // there's no need to send the message just after the WebContents is created.
544 render_frame_host->Send(new PrerenderMsg_SetIsPrerendering( 544 render_frame_host->Send(new PrerenderMsg_SetIsPrerendering(
545 render_frame_host->GetRoutingID(), true)); 545 render_frame_host->GetRoutingID(), true));
546 } 546 }
547 547
548 void PrerenderContents::DidStopLoading( 548 void PrerenderContents::DidStopLoading() {
549 content::RenderViewHost* render_view_host) {
550 has_stopped_loading_ = true; 549 has_stopped_loading_ = true;
551 NotifyPrerenderStopLoading(); 550 NotifyPrerenderStopLoading();
552 } 551 }
553 552
554 void PrerenderContents::DocumentLoadedInFrame( 553 void PrerenderContents::DocumentLoadedInFrame(
555 content::RenderFrameHost* render_frame_host) { 554 content::RenderFrameHost* render_frame_host) {
556 if (!render_frame_host->GetParent()) 555 if (!render_frame_host->GetParent())
557 NotifyPrerenderDomContentLoaded(); 556 NotifyPrerenderDomContentLoaded();
558 } 557 }
559 558
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
749 void PrerenderContents::AddResourceThrottle( 748 void PrerenderContents::AddResourceThrottle(
750 const base::WeakPtr<PrerenderResourceThrottle>& throttle) { 749 const base::WeakPtr<PrerenderResourceThrottle>& throttle) {
751 resource_throttles_.push_back(throttle); 750 resource_throttles_.push_back(throttle);
752 } 751 }
753 752
754 void PrerenderContents::AddNetworkBytes(int64 bytes) { 753 void PrerenderContents::AddNetworkBytes(int64 bytes) {
755 network_bytes_ += bytes; 754 network_bytes_ += bytes;
756 } 755 }
757 756
758 } // namespace prerender 757 } // namespace prerender
OLDNEW
« no previous file with comments | « chrome/browser/prerender/prerender_contents.h ('k') | chrome/browser/prerender/prerender_tab_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698