| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 2660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2671 content::PageTransition transition_type = content::PAGE_TRANSITION_LINK; | 2671 content::PageTransition transition_type = content::PAGE_TRANSITION_LINK; |
| 2672 DocumentState* document_state = DocumentState::FromDataSource(data_source); | 2672 DocumentState* document_state = DocumentState::FromDataSource(data_source); |
| 2673 NavigationState* navigation_state = document_state->navigation_state(); | 2673 NavigationState* navigation_state = document_state->navigation_state(); |
| 2674 if (document_state) { | 2674 if (document_state) { |
| 2675 if (document_state->is_cache_policy_override_set()) | 2675 if (document_state->is_cache_policy_override_set()) |
| 2676 request.setCachePolicy(document_state->cache_policy_override()); | 2676 request.setCachePolicy(document_state->cache_policy_override()); |
| 2677 transition_type = navigation_state->transition_type(); | 2677 transition_type = navigation_state->transition_type(); |
| 2678 } | 2678 } |
| 2679 | 2679 |
| 2680 request.setExtraData( | 2680 request.setExtraData( |
| 2681 new RequestExtraData((frame == top_frame), | 2681 new RequestExtraData(frame->referrerPolicy(), |
| 2682 (frame == top_frame), |
| 2682 frame->identifier(), | 2683 frame->identifier(), |
| 2683 frame->parent() == top_frame, | 2684 frame->parent() == top_frame, |
| 2684 frame->parent() ? frame->parent()->identifier() : -1, | 2685 frame->parent() ? frame->parent()->identifier() : -1, |
| 2685 transition_type)); | 2686 transition_type)); |
| 2686 | 2687 |
| 2687 DocumentState* top_document_state = | 2688 DocumentState* top_document_state = |
| 2688 DocumentState::FromDataSource(top_data_source); | 2689 DocumentState::FromDataSource(top_data_source); |
| 2689 // TODO(gavinp): separate out prefetching and prerender field trials | 2690 // TODO(gavinp): separate out prefetching and prerender field trials |
| 2690 // if the rel=prerender rel type is sticking around. | 2691 // if the rel=prerender rel type is sticking around. |
| 2691 if (top_document_state && | 2692 if (top_document_state && |
| (...skipping 2036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4728 return !!RenderThreadImpl::current()->compositor_thread(); | 4729 return !!RenderThreadImpl::current()->compositor_thread(); |
| 4729 } | 4730 } |
| 4730 | 4731 |
| 4731 void RenderViewImpl::OnJavaBridgeInit( | 4732 void RenderViewImpl::OnJavaBridgeInit( |
| 4732 const IPC::ChannelHandle& channel_handle) { | 4733 const IPC::ChannelHandle& channel_handle) { |
| 4733 DCHECK(!java_bridge_dispatcher_.get()); | 4734 DCHECK(!java_bridge_dispatcher_.get()); |
| 4734 #if defined(ENABLE_JAVA_BRIDGE) | 4735 #if defined(ENABLE_JAVA_BRIDGE) |
| 4735 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this, channel_handle)); | 4736 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this, channel_handle)); |
| 4736 #endif | 4737 #endif |
| 4737 } | 4738 } |
| OLD | NEW |