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

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 10316020: Remove WebContentsImpl::OnDidRedirectProvisionalLoad. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ...and remove from WebContentsObserver. Created 8 years, 7 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
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 "content/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 2744 matching lines...) Expand 10 before | Expand all | Expand 10 after
2755 } 2755 }
2756 2756
2757 FOR_EACH_OBSERVER( 2757 FOR_EACH_OBSERVER(
2758 RenderViewObserver, observers_, DidStartProvisionalLoad(frame)); 2758 RenderViewObserver, observers_, DidStartProvisionalLoad(frame));
2759 2759
2760 Send(new ViewHostMsg_DidStartProvisionalLoadForFrame( 2760 Send(new ViewHostMsg_DidStartProvisionalLoadForFrame(
2761 routing_id_, frame->identifier(), is_top_most, GetOpenerUrl(), 2761 routing_id_, frame->identifier(), is_top_most, GetOpenerUrl(),
2762 ds->request().url())); 2762 ds->request().url()));
2763 } 2763 }
2764 2764
2765 void RenderViewImpl::didReceiveServerRedirectForProvisionalLoad(
2766 WebFrame* frame) {
2767 if (frame->parent())
2768 return;
2769 // Received a redirect on the main frame.
2770 WebDataSource* data_source = frame->provisionalDataSource();
2771 if (!data_source) {
2772 // Should only be invoked when we have a data source.
2773 NOTREACHED();
2774 return;
2775 }
2776 std::vector<GURL> redirects;
2777 GetRedirectChain(data_source, &redirects);
2778 if (redirects.size() >= 2) {
2779 Send(new ViewHostMsg_DidRedirectProvisionalLoad(routing_id_, page_id_,
2780 GetOpenerUrl(), redirects[redirects.size() - 2], redirects.back()));
2781 }
2782 }
2783
2784 void RenderViewImpl::didFailProvisionalLoad(WebFrame* frame, 2765 void RenderViewImpl::didFailProvisionalLoad(WebFrame* frame,
2785 const WebURLError& error) { 2766 const WebURLError& error) {
2786 // Notify the browser that we failed a provisional load with an error. 2767 // Notify the browser that we failed a provisional load with an error.
2787 // 2768 //
2788 // Note: It is important this notification occur before DidStopLoading so the 2769 // Note: It is important this notification occur before DidStopLoading so the
2789 // SSL manager can react to the provisional load failure before being 2770 // SSL manager can react to the provisional load failure before being
2790 // notified the load stopped. 2771 // notified the load stopped.
2791 // 2772 //
2792 WebDataSource* ds = frame->provisionalDataSource(); 2773 WebDataSource* ds = frame->provisionalDataSource();
2793 DCHECK(ds); 2774 DCHECK(ds);
(...skipping 2527 matching lines...) Expand 10 before | Expand all | Expand 10 after
5321 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { 5302 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const {
5322 return !!RenderThreadImpl::current()->compositor_thread(); 5303 return !!RenderThreadImpl::current()->compositor_thread();
5323 } 5304 }
5324 5305
5325 void RenderViewImpl::OnJavaBridgeInit() { 5306 void RenderViewImpl::OnJavaBridgeInit() {
5326 DCHECK(!java_bridge_dispatcher_); 5307 DCHECK(!java_bridge_dispatcher_);
5327 #if defined(ENABLE_JAVA_BRIDGE) 5308 #if defined(ENABLE_JAVA_BRIDGE)
5328 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); 5309 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this);
5329 #endif 5310 #endif
5330 } 5311 }
OLDNEW
« chrome/browser/prerender/prerender_tab_helper.cc ('K') | « content/renderer/render_view_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698