| 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 2056 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2067 // tab, and we want to still allow that. | 2067 // tab, and we want to still allow that. |
| 2068 // | 2068 // |
| 2069 // Note: we do this only for GET requests because our mechanism for switching | 2069 // Note: we do this only for GET requests because our mechanism for switching |
| 2070 // processes only issues GET requests. In particular, POST requests don't | 2070 // processes only issues GET requests. In particular, POST requests don't |
| 2071 // work, because this mechanism does not preserve form POST data. If it | 2071 // work, because this mechanism does not preserve form POST data. If it |
| 2072 // becomes necessary to support process switching for POST requests, we will | 2072 // becomes necessary to support process switching for POST requests, we will |
| 2073 // need to send the request's httpBody data up to the browser process, and | 2073 // need to send the request's httpBody data up to the browser process, and |
| 2074 // issue a special POST navigation in WebKit (via | 2074 // issue a special POST navigation in WebKit (via |
| 2075 // FrameLoader::loadFrameRequest). See ResourceDispatcher and WebURLLoaderImpl | 2075 // FrameLoader::loadFrameRequest). See ResourceDispatcher and WebURLLoaderImpl |
| 2076 // for examples of how to send the httpBody data. | 2076 // for examples of how to send the httpBody data. |
| 2077 // TODO(mpcomplete): remove is_redirect clause when http://crbug.com/79520 is | 2077 if (!frame->parent() && is_content_initiated && |
| 2078 // fixed. | |
| 2079 if (!frame->parent() && (is_content_initiated || is_redirect) && | |
| 2080 default_policy == WebKit::WebNavigationPolicyCurrentTab && | 2078 default_policy == WebKit::WebNavigationPolicyCurrentTab && |
| 2081 request.httpMethod() == "GET" && !url.SchemeIs(chrome::kAboutScheme)) { | 2079 request.httpMethod() == "GET" && !url.SchemeIs(chrome::kAboutScheme)) { |
| 2082 bool send_referrer = false; | 2080 bool send_referrer = false; |
| 2083 bool should_fork = | 2081 bool should_fork = |
| 2084 (enabled_bindings_ & content::BINDINGS_POLICY_WEB_UI) || | 2082 (enabled_bindings_ & content::BINDINGS_POLICY_WEB_UI) || |
| 2085 frame->isViewSourceModeEnabled() || | 2083 frame->isViewSourceModeEnabled() || |
| 2086 url.SchemeIs(chrome::kViewSourceScheme); | 2084 url.SchemeIs(chrome::kViewSourceScheme); |
| 2087 | 2085 |
| 2088 if (!should_fork) { | 2086 if (!should_fork) { |
| 2089 // Give the embedder a chance. | 2087 // Give the embedder a chance. |
| (...skipping 2700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4790 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 4788 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
| 4791 return !!RenderThreadImpl::current()->compositor_thread(); | 4789 return !!RenderThreadImpl::current()->compositor_thread(); |
| 4792 } | 4790 } |
| 4793 | 4791 |
| 4794 void RenderViewImpl::OnJavaBridgeInit() { | 4792 void RenderViewImpl::OnJavaBridgeInit() { |
| 4795 DCHECK(!java_bridge_dispatcher_.get()); | 4793 DCHECK(!java_bridge_dispatcher_.get()); |
| 4796 #if defined(ENABLE_JAVA_BRIDGE) | 4794 #if defined(ENABLE_JAVA_BRIDGE) |
| 4797 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); | 4795 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); |
| 4798 #endif | 4796 #endif |
| 4799 } | 4797 } |
| OLD | NEW |