OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 4388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4399 WebURLRequest::UseProtocolCachePolicy; | 4399 WebURLRequest::UseProtocolCachePolicy; |
4400 if (!RenderFrameImpl::PrepareRenderViewForNavigation( | 4400 if (!RenderFrameImpl::PrepareRenderViewForNavigation( |
4401 common_params.url, is_history_navigation, request_params, &is_reload, | 4401 common_params.url, is_history_navigation, request_params, &is_reload, |
4402 &cache_policy)) { | 4402 &cache_policy)) { |
4403 Send(new FrameHostMsg_DidDropNavigation(routing_id_)); | 4403 Send(new FrameHostMsg_DidDropNavigation(routing_id_)); |
4404 return; | 4404 return; |
4405 } | 4405 } |
4406 | 4406 |
4407 GetContentClient()->SetActiveURL(common_params.url); | 4407 GetContentClient()->SetActiveURL(common_params.url); |
4408 | 4408 |
| 4409 // If this frame isn't in the same process as the main frame, it may naively |
| 4410 // assume that this is the first navigation in the iframe, but this may not |
| 4411 // actually be the case. Inform the frame's state machine if this frame has |
| 4412 // already committed other loads. |
| 4413 if (request_params.has_committed_real_load && frame_->parent()) |
| 4414 frame_->setCommittedFirstRealLoad(); |
| 4415 |
4409 if (is_reload && !render_view_->history_controller()->GetCurrentEntry()) { | 4416 if (is_reload && !render_view_->history_controller()->GetCurrentEntry()) { |
4410 // We cannot reload if we do not have any history state. This happens, for | 4417 // We cannot reload if we do not have any history state. This happens, for |
4411 // example, when recovering from a crash. | 4418 // example, when recovering from a crash. |
4412 is_reload = false; | 4419 is_reload = false; |
4413 cache_policy = WebURLRequest::ReloadIgnoringCacheData; | 4420 cache_policy = WebURLRequest::ReloadIgnoringCacheData; |
4414 } | 4421 } |
4415 | 4422 |
4416 pending_navigation_params_.reset( | 4423 pending_navigation_params_.reset( |
4417 new NavigationParams(common_params, start_params, request_params)); | 4424 new NavigationParams(common_params, start_params, request_params)); |
4418 | 4425 |
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4917 #elif defined(ENABLE_BROWSER_CDMS) | 4924 #elif defined(ENABLE_BROWSER_CDMS) |
4918 cdm_manager_, | 4925 cdm_manager_, |
4919 #endif | 4926 #endif |
4920 this); | 4927 this); |
4921 } | 4928 } |
4922 | 4929 |
4923 return cdm_factory_; | 4930 return cdm_factory_; |
4924 } | 4931 } |
4925 | 4932 |
4926 } // namespace content | 4933 } // namespace content |
OLD | NEW |