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 758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
769 } else if (!params.state.empty()) { | 769 } else if (!params.state.empty()) { |
770 // We must know the page ID of the page we are navigating back to. | 770 // We must know the page ID of the page we are navigating back to. |
771 DCHECK_NE(params.page_id, -1); | 771 DCHECK_NE(params.page_id, -1); |
772 main_frame->loadHistoryItem( | 772 main_frame->loadHistoryItem( |
773 webkit_glue::HistoryItemFromString(params.state)); | 773 webkit_glue::HistoryItemFromString(params.state)); |
774 } else { | 774 } else { |
775 // Navigate to the given URL. | 775 // Navigate to the given URL. |
776 WebURLRequest request(params.url); | 776 WebURLRequest request(params.url); |
777 | 777 |
778 // A session history navigation should have been accompanied by state. | 778 // A session history navigation should have been accompanied by state. |
779 DCHECK_EQ(params.page_id, -1); | 779 CHECK_EQ(params.page_id, -1); |
780 | 780 |
781 if (main_frame->isViewSourceModeEnabled()) | 781 if (main_frame->isViewSourceModeEnabled()) |
782 request.setCachePolicy(WebURLRequest::ReturnCacheDataElseLoad); | 782 request.setCachePolicy(WebURLRequest::ReturnCacheDataElseLoad); |
783 | 783 |
784 if (params.referrer.url.is_valid()) { | 784 if (params.referrer.url.is_valid()) { |
785 WebString referrer = WebSecurityPolicy::generateReferrerHeader( | 785 WebString referrer = WebSecurityPolicy::generateReferrerHeader( |
786 params.referrer.policy, | 786 params.referrer.policy, |
787 params.url, | 787 params.url, |
788 WebString::fromUTF8(params.referrer.url.spec())); | 788 WebString::fromUTF8(params.referrer.url.spec())); |
789 if (!referrer.isEmpty()) | 789 if (!referrer.isEmpty()) |
(...skipping 4002 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4792 return !!RenderThreadImpl::current()->compositor_thread(); | 4792 return !!RenderThreadImpl::current()->compositor_thread(); |
4793 } | 4793 } |
4794 | 4794 |
4795 void RenderViewImpl::OnJavaBridgeInit( | 4795 void RenderViewImpl::OnJavaBridgeInit( |
4796 const IPC::ChannelHandle& channel_handle) { | 4796 const IPC::ChannelHandle& channel_handle) { |
4797 DCHECK(!java_bridge_dispatcher_.get()); | 4797 DCHECK(!java_bridge_dispatcher_.get()); |
4798 #if defined(ENABLE_JAVA_BRIDGE) | 4798 #if defined(ENABLE_JAVA_BRIDGE) |
4799 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this, channel_handle)); | 4799 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this, channel_handle)); |
4800 #endif | 4800 #endif |
4801 } | 4801 } |
OLD | NEW |