| 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 | |
| 4416 if (is_reload && !render_view_->history_controller()->GetCurrentEntry()) { | 4409 if (is_reload && !render_view_->history_controller()->GetCurrentEntry()) { |
| 4417 // We cannot reload if we do not have any history state. This happens, for | 4410 // We cannot reload if we do not have any history state. This happens, for |
| 4418 // example, when recovering from a crash. | 4411 // example, when recovering from a crash. |
| 4419 is_reload = false; | 4412 is_reload = false; |
| 4420 cache_policy = WebURLRequest::ReloadIgnoringCacheData; | 4413 cache_policy = WebURLRequest::ReloadIgnoringCacheData; |
| 4421 } | 4414 } |
| 4422 | 4415 |
| 4423 pending_navigation_params_.reset( | 4416 pending_navigation_params_.reset( |
| 4424 new NavigationParams(common_params, start_params, request_params)); | 4417 new NavigationParams(common_params, start_params, request_params)); |
| 4425 | 4418 |
| (...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4924 #elif defined(ENABLE_BROWSER_CDMS) | 4917 #elif defined(ENABLE_BROWSER_CDMS) |
| 4925 cdm_manager_, | 4918 cdm_manager_, |
| 4926 #endif | 4919 #endif |
| 4927 this); | 4920 this); |
| 4928 } | 4921 } |
| 4929 | 4922 |
| 4930 return cdm_factory_; | 4923 return cdm_factory_; |
| 4931 } | 4924 } |
| 4932 | 4925 |
| 4933 } // namespace content | 4926 } // namespace content |
| OLD | NEW |