OLD | NEW |
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 3218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3229 // Take note of AUTO_SUBFRAME loads here, so that we can know how to | 3229 // Take note of AUTO_SUBFRAME loads here, so that we can know how to |
3230 // load an error page. See didFailProvisionalLoad. | 3230 // load an error page. See didFailProvisionalLoad. |
3231 document_state->navigation_state()->set_transition_type( | 3231 document_state->navigation_state()->set_transition_type( |
3232 content::PAGE_TRANSITION_AUTO_SUBFRAME); | 3232 content::PAGE_TRANSITION_AUTO_SUBFRAME); |
3233 } | 3233 } |
3234 | 3234 |
3235 FOR_EACH_OBSERVER( | 3235 FOR_EACH_OBSERVER( |
3236 RenderViewObserver, observers_, DidStartProvisionalLoad(frame)); | 3236 RenderViewObserver, observers_, DidStartProvisionalLoad(frame)); |
3237 | 3237 |
3238 Send(new ViewHostMsg_DidStartProvisionalLoadForFrame( | 3238 Send(new ViewHostMsg_DidStartProvisionalLoadForFrame( |
3239 routing_id_, frame->identifier(), is_top_most, GetOpenerUrl(), | 3239 routing_id_, frame->identifier(), |
3240 ds->request().url())); | 3240 frame->parent() ? frame->parent()->identifier() : -1, |
| 3241 is_top_most, GetOpenerUrl(), ds->request().url())); |
3241 } | 3242 } |
3242 | 3243 |
3243 void RenderViewImpl::didReceiveServerRedirectForProvisionalLoad( | 3244 void RenderViewImpl::didReceiveServerRedirectForProvisionalLoad( |
3244 WebFrame* frame) { | 3245 WebFrame* frame) { |
3245 if (frame->parent()) | 3246 if (frame->parent()) |
3246 return; | 3247 return; |
3247 // Received a redirect on the main frame. | 3248 // Received a redirect on the main frame. |
3248 WebDataSource* data_source = frame->provisionalDataSource(); | 3249 WebDataSource* data_source = frame->provisionalDataSource(); |
3249 if (!data_source) { | 3250 if (!data_source) { |
3250 // Should only be invoked when we have a data source. | 3251 // Should only be invoked when we have a data source. |
(...skipping 3085 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6336 | 6337 |
6337 updating_frame_tree_ = true; | 6338 updating_frame_tree_ = true; |
6338 active_frame_id_map_.clear(); | 6339 active_frame_id_map_.clear(); |
6339 | 6340 |
6340 target_process_id_ = process_id; | 6341 target_process_id_ = process_id; |
6341 target_routing_id_ = route_id; | 6342 target_routing_id_ = route_id; |
6342 CreateFrameTree(webview()->mainFrame(), frames); | 6343 CreateFrameTree(webview()->mainFrame(), frames); |
6343 | 6344 |
6344 updating_frame_tree_ = false; | 6345 updating_frame_tree_ = false; |
6345 } | 6346 } |
OLD | NEW |