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

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: Don't break unittest Created 8 years, 6 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 2852 matching lines...) Expand 10 before | Expand all | Expand 10 after
2863 } 2863 }
2864 2864
2865 FOR_EACH_OBSERVER( 2865 FOR_EACH_OBSERVER(
2866 RenderViewObserver, observers_, DidStartProvisionalLoad(frame)); 2866 RenderViewObserver, observers_, DidStartProvisionalLoad(frame));
2867 2867
2868 Send(new ViewHostMsg_DidStartProvisionalLoadForFrame( 2868 Send(new ViewHostMsg_DidStartProvisionalLoadForFrame(
2869 routing_id_, frame->identifier(), is_top_most, GetOpenerUrl(), 2869 routing_id_, frame->identifier(), is_top_most, GetOpenerUrl(),
2870 ds->request().url())); 2870 ds->request().url()));
2871 } 2871 }
2872 2872
2873 void RenderViewImpl::didReceiveServerRedirectForProvisionalLoad(
2874 WebFrame* frame) {
2875 if (frame->parent())
2876 return;
2877 // Received a redirect on the main frame.
2878 WebDataSource* data_source = frame->provisionalDataSource();
2879 if (!data_source) {
2880 // Should only be invoked when we have a data source.
2881 NOTREACHED();
2882 return;
2883 }
2884 std::vector<GURL> redirects;
2885 GetRedirectChain(data_source, &redirects);
2886 if (redirects.size() >= 2) {
2887 Send(new ViewHostMsg_DidRedirectProvisionalLoad(routing_id_, page_id_,
2888 GetOpenerUrl(), redirects[redirects.size() - 2], redirects.back()));
2889 }
2890 }
2891
2892 void RenderViewImpl::didFailProvisionalLoad(WebFrame* frame, 2873 void RenderViewImpl::didFailProvisionalLoad(WebFrame* frame,
2893 const WebURLError& error) { 2874 const WebURLError& error) {
2894 // Notify the browser that we failed a provisional load with an error. 2875 // Notify the browser that we failed a provisional load with an error.
2895 // 2876 //
2896 // Note: It is important this notification occur before DidStopLoading so the 2877 // Note: It is important this notification occur before DidStopLoading so the
2897 // SSL manager can react to the provisional load failure before being 2878 // SSL manager can react to the provisional load failure before being
2898 // notified the load stopped. 2879 // notified the load stopped.
2899 // 2880 //
2900 WebDataSource* ds = frame->provisionalDataSource(); 2881 WebDataSource* ds = frame->provisionalDataSource();
2901 DCHECK(ds); 2882 DCHECK(ds);
(...skipping 2639 matching lines...) Expand 10 before | Expand all | Expand 10 after
5541 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { 5522 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const {
5542 return !!RenderThreadImpl::current()->compositor_thread(); 5523 return !!RenderThreadImpl::current()->compositor_thread();
5543 } 5524 }
5544 5525
5545 void RenderViewImpl::OnJavaBridgeInit() { 5526 void RenderViewImpl::OnJavaBridgeInit() {
5546 DCHECK(!java_bridge_dispatcher_); 5527 DCHECK(!java_bridge_dispatcher_);
5547 #if defined(ENABLE_JAVA_BRIDGE) 5528 #if defined(ENABLE_JAVA_BRIDGE)
5548 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); 5529 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this);
5549 #endif 5530 #endif
5550 } 5531 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698