| 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 2768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2779 WebDataSource* top_data_source = top_frame->dataSource(); | 2779 WebDataSource* top_data_source = top_frame->dataSource(); |
| 2780 WebDataSource* data_source = | 2780 WebDataSource* data_source = |
| 2781 provisional_data_source ? provisional_data_source : top_data_source; | 2781 provisional_data_source ? provisional_data_source : top_data_source; |
| 2782 | 2782 |
| 2783 DocumentState* document_state = DocumentState::FromDataSource(data_source); | 2783 DocumentState* document_state = DocumentState::FromDataSource(data_source); |
| 2784 DCHECK(document_state); | 2784 DCHECK(document_state); |
| 2785 InternalDocumentStateData* internal_data = | 2785 InternalDocumentStateData* internal_data = |
| 2786 InternalDocumentStateData::FromDocumentState(document_state); | 2786 InternalDocumentStateData::FromDocumentState(document_state); |
| 2787 NavigationState* navigation_state = document_state->navigation_state(); | 2787 NavigationState* navigation_state = document_state->navigation_state(); |
| 2788 ui::PageTransition transition_type = navigation_state->transition_type(); | 2788 ui::PageTransition transition_type = navigation_state->transition_type(); |
| 2789 WebDataSource* frame_ds = frame->provisionalDataSource(); |
| 2790 if (frame_ds && frame_ds->isClientRedirect()) { |
| 2791 transition_type = ui::PageTransitionFromInt( |
| 2792 transition_type | ui::PAGE_TRANSITION_CLIENT_REDIRECT); |
| 2793 } |
| 2789 | 2794 |
| 2790 GURL request_url(request.url()); | 2795 GURL request_url(request.url()); |
| 2791 GURL new_url; | 2796 GURL new_url; |
| 2792 if (GetContentClient()->renderer()->WillSendRequest( | 2797 if (GetContentClient()->renderer()->WillSendRequest( |
| 2793 frame, | 2798 frame, |
| 2794 transition_type, | 2799 transition_type, |
| 2795 request_url, | 2800 request_url, |
| 2796 request.firstPartyForCookies(), | 2801 request.firstPartyForCookies(), |
| 2797 &new_url)) { | 2802 &new_url)) { |
| 2798 request.setURL(WebURL(new_url)); | 2803 request.setURL(WebURL(new_url)); |
| (...skipping 1395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4194 | 4199 |
| 4195 #if defined(ENABLE_BROWSER_CDMS) | 4200 #if defined(ENABLE_BROWSER_CDMS) |
| 4196 RendererCdmManager* RenderFrameImpl::GetCdmManager() { | 4201 RendererCdmManager* RenderFrameImpl::GetCdmManager() { |
| 4197 if (!cdm_manager_) | 4202 if (!cdm_manager_) |
| 4198 cdm_manager_ = new RendererCdmManager(this); | 4203 cdm_manager_ = new RendererCdmManager(this); |
| 4199 return cdm_manager_; | 4204 return cdm_manager_; |
| 4200 } | 4205 } |
| 4201 #endif // defined(ENABLE_BROWSER_CDMS) | 4206 #endif // defined(ENABLE_BROWSER_CDMS) |
| 4202 | 4207 |
| 4203 } // namespace content | 4208 } // namespace content |
| OLD | NEW |