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

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: Fix Android + Review comments 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 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 void PrerenderContents::RenderFrameCreated( 581 void PrerenderContents::RenderFrameCreated(
582 content::RenderFrameHost* render_frame_host) { 582 content::RenderFrameHost* render_frame_host) {
583 // When a new RenderFrame is created for a prerendering WebContents, tell the 583 // When a new RenderFrame is created for a prerendering WebContents, tell the
584 // new RenderFrame it's being used for prerendering before any navigations 584 // new RenderFrame it's being used for prerendering before any navigations
585 // occur. Note that this is always triggered before the first navigation, so 585 // occur. Note that this is always triggered before the first navigation, so
586 // there's no need to send the message just after the WebContents is created. 586 // there's no need to send the message just after the WebContents is created.
587 render_frame_host->Send(new PrerenderMsg_SetIsPrerendering( 587 render_frame_host->Send(new PrerenderMsg_SetIsPrerendering(
588 render_frame_host->GetRoutingID(), true)); 588 render_frame_host->GetRoutingID(), true));
589 } 589 }
590 590
591 void PrerenderContents::DidStopLoading( 591 void PrerenderContents::DidStopLoading() {
592 content::RenderViewHost* render_view_host) {
593 has_stopped_loading_ = true; 592 has_stopped_loading_ = true;
594 NotifyPrerenderStopLoading(); 593 NotifyPrerenderStopLoading();
595 } 594 }
596 595
597 void PrerenderContents::DocumentLoadedInFrame( 596 void PrerenderContents::DocumentLoadedInFrame(
598 content::RenderFrameHost* render_frame_host) { 597 content::RenderFrameHost* render_frame_host) {
599 if (!render_frame_host->GetParent()) 598 if (!render_frame_host->GetParent())
600 NotifyPrerenderDomContentLoaded(); 599 NotifyPrerenderDomContentLoaded();
601 } 600 }
602 601
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
853 void PrerenderContents::AddResourceThrottle( 852 void PrerenderContents::AddResourceThrottle(
854 const base::WeakPtr<PrerenderResourceThrottle>& throttle) { 853 const base::WeakPtr<PrerenderResourceThrottle>& throttle) {
855 resource_throttles_.push_back(throttle); 854 resource_throttles_.push_back(throttle);
856 } 855 }
857 856
858 void PrerenderContents::AddNetworkBytes(int64 bytes) { 857 void PrerenderContents::AddNetworkBytes(int64 bytes) {
859 network_bytes_ += bytes; 858 network_bytes_ += bytes;
860 } 859 }
861 860
862 } // namespace prerender 861 } // namespace prerender
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698