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

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: Also fix unit test that referenced ViewHostMsg_DidRedirectProvisionalLoad 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 2745 matching lines...) Expand 10 before | Expand all | Expand 10 after
2756 } 2756 }
2757 2757
2758 FOR_EACH_OBSERVER( 2758 FOR_EACH_OBSERVER(
2759 RenderViewObserver, observers_, DidStartProvisionalLoad(frame)); 2759 RenderViewObserver, observers_, DidStartProvisionalLoad(frame));
2760 2760
2761 Send(new ViewHostMsg_DidStartProvisionalLoadForFrame( 2761 Send(new ViewHostMsg_DidStartProvisionalLoadForFrame(
2762 routing_id_, frame->identifier(), is_top_most, GetOpenerUrl(), 2762 routing_id_, frame->identifier(), is_top_most, GetOpenerUrl(),
2763 ds->request().url())); 2763 ds->request().url()));
2764 } 2764 }
2765 2765
2766 void RenderViewImpl::didReceiveServerRedirectForProvisionalLoad(
2767 WebFrame* frame) {
2768 if (frame->parent())
2769 return;
2770 // Received a redirect on the main frame.
2771 WebDataSource* data_source = frame->provisionalDataSource();
2772 if (!data_source) {
2773 // Should only be invoked when we have a data source.
2774 NOTREACHED();
2775 return;
2776 }
2777 std::vector<GURL> redirects;
2778 GetRedirectChain(data_source, &redirects);
2779 if (redirects.size() >= 2) {
2780 Send(new ViewHostMsg_DidRedirectProvisionalLoad(routing_id_, page_id_,
2781 GetOpenerUrl(), redirects[redirects.size() - 2], redirects.back()));
2782 }
2783 }
2784
2785 void RenderViewImpl::didFailProvisionalLoad(WebFrame* frame, 2766 void RenderViewImpl::didFailProvisionalLoad(WebFrame* frame,
2786 const WebURLError& error) { 2767 const WebURLError& error) {
2787 // Notify the browser that we failed a provisional load with an error. 2768 // Notify the browser that we failed a provisional load with an error.
2788 // 2769 //
2789 // Note: It is important this notification occur before DidStopLoading so the 2770 // Note: It is important this notification occur before DidStopLoading so the
2790 // SSL manager can react to the provisional load failure before being 2771 // SSL manager can react to the provisional load failure before being
2791 // notified the load stopped. 2772 // notified the load stopped.
2792 // 2773 //
2793 WebDataSource* ds = frame->provisionalDataSource(); 2774 WebDataSource* ds = frame->provisionalDataSource();
2794 DCHECK(ds); 2775 DCHECK(ds);
(...skipping 2511 matching lines...) Expand 10 before | Expand all | Expand 10 after
5306 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { 5287 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const {
5307 return !!RenderThreadImpl::current()->compositor_thread(); 5288 return !!RenderThreadImpl::current()->compositor_thread();
5308 } 5289 }
5309 5290
5310 void RenderViewImpl::OnJavaBridgeInit() { 5291 void RenderViewImpl::OnJavaBridgeInit() {
5311 DCHECK(!java_bridge_dispatcher_.get()); 5292 DCHECK(!java_bridge_dispatcher_.get());
5312 #if defined(ENABLE_JAVA_BRIDGE) 5293 #if defined(ENABLE_JAVA_BRIDGE)
5313 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); 5294 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this));
5314 #endif 5295 #endif
5315 } 5296 }
OLDNEW
« content/browser/web_contents/web_contents_impl.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