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 3790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3801 // This message needs to be sent before any of allowScripts(), | 3801 // This message needs to be sent before any of allowScripts(), |
3802 // allowImages(), allowPlugins() is called for the new page, so that when | 3802 // allowImages(), allowPlugins() is called for the new page, so that when |
3803 // these functions send a ViewHostMsg_ContentBlocked message, it arrives | 3803 // these functions send a ViewHostMsg_ContentBlocked message, it arrives |
3804 // after the FrameHostMsg_DidCommitProvisionalLoad message. | 3804 // after the FrameHostMsg_DidCommitProvisionalLoad message. |
3805 Send(new FrameHostMsg_DidCommitProvisionalLoad(routing_id_, params)); | 3805 Send(new FrameHostMsg_DidCommitProvisionalLoad(routing_id_, params)); |
3806 } else { | 3806 } else { |
3807 // Subframe navigation: the type depends on whether this navigation | 3807 // Subframe navigation: the type depends on whether this navigation |
3808 // generated a new session history entry. When they do generate a session | 3808 // generated a new session history entry. When they do generate a session |
3809 // history entry, it means the user initiated the navigation and we should | 3809 // history entry, it means the user initiated the navigation and we should |
3810 // mark it as such. | 3810 // mark it as such. |
3811 bool is_history_navigation = commit_type == blink::WebBackForwardCommit; | 3811 if (commit_type == blink::WebStandardCommit) |
3812 if (is_history_navigation || ds->replacesCurrentHistoryItem()) | 3812 params.transition = ui::PAGE_TRANSITION_MANUAL_SUBFRAME; |
| 3813 else |
3813 params.transition = ui::PAGE_TRANSITION_AUTO_SUBFRAME; | 3814 params.transition = ui::PAGE_TRANSITION_AUTO_SUBFRAME; |
3814 else | |
3815 params.transition = ui::PAGE_TRANSITION_MANUAL_SUBFRAME; | |
3816 | 3815 |
3817 DCHECK(!navigation_state->history_list_was_cleared()); | 3816 DCHECK(!navigation_state->history_list_was_cleared()); |
3818 params.history_list_was_cleared = false; | 3817 params.history_list_was_cleared = false; |
3819 params.report_type = FrameMsg_UILoadMetricsReportType::NO_REPORT; | 3818 params.report_type = FrameMsg_UILoadMetricsReportType::NO_REPORT; |
3820 | 3819 |
3821 // Don't send this message while the subframe is swapped out. | 3820 // Don't send this message while the subframe is swapped out. |
3822 if (!is_swapped_out()) | 3821 if (!is_swapped_out()) |
3823 Send(new FrameHostMsg_DidCommitProvisionalLoad(routing_id_, params)); | 3822 Send(new FrameHostMsg_DidCommitProvisionalLoad(routing_id_, params)); |
3824 } | 3823 } |
3825 | 3824 |
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4441 | 4440 |
4442 #if defined(ENABLE_BROWSER_CDMS) | 4441 #if defined(ENABLE_BROWSER_CDMS) |
4443 RendererCdmManager* RenderFrameImpl::GetCdmManager() { | 4442 RendererCdmManager* RenderFrameImpl::GetCdmManager() { |
4444 if (!cdm_manager_) | 4443 if (!cdm_manager_) |
4445 cdm_manager_ = new RendererCdmManager(this); | 4444 cdm_manager_ = new RendererCdmManager(this); |
4446 return cdm_manager_; | 4445 return cdm_manager_; |
4447 } | 4446 } |
4448 #endif // defined(ENABLE_BROWSER_CDMS) | 4447 #endif // defined(ENABLE_BROWSER_CDMS) |
4449 | 4448 |
4450 } // namespace content | 4449 } // namespace content |
OLD | NEW |