Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 8889007: Enable TransferNavigationResourceHandler (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/test/data/extensions/api_test/webrequest/test_blocking.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2050 matching lines...) Expand 10 before | Expand all | Expand 10 after
2061 // tab, and we want to still allow that. 2061 // tab, and we want to still allow that.
2062 // 2062 //
2063 // Note: we do this only for GET requests because our mechanism for switching 2063 // Note: we do this only for GET requests because our mechanism for switching
2064 // processes only issues GET requests. In particular, POST requests don't 2064 // processes only issues GET requests. In particular, POST requests don't
2065 // work, because this mechanism does not preserve form POST data. If it 2065 // work, because this mechanism does not preserve form POST data. If it
2066 // becomes necessary to support process switching for POST requests, we will 2066 // becomes necessary to support process switching for POST requests, we will
2067 // need to send the request's httpBody data up to the browser process, and 2067 // need to send the request's httpBody data up to the browser process, and
2068 // issue a special POST navigation in WebKit (via 2068 // issue a special POST navigation in WebKit (via
2069 // FrameLoader::loadFrameRequest). See ResourceDispatcher and WebURLLoaderImpl 2069 // FrameLoader::loadFrameRequest). See ResourceDispatcher and WebURLLoaderImpl
2070 // for examples of how to send the httpBody data. 2070 // for examples of how to send the httpBody data.
2071 // TODO(mpcomplete): remove is_redirect clause when http://crbug.com/79520 is 2071 if (!frame->parent() && is_content_initiated &&
2072 // fixed.
2073 if (!frame->parent() && (is_content_initiated || is_redirect) &&
2074 default_policy == WebKit::WebNavigationPolicyCurrentTab && 2072 default_policy == WebKit::WebNavigationPolicyCurrentTab &&
2075 request.httpMethod() == "GET" && !url.SchemeIs(chrome::kAboutScheme)) { 2073 request.httpMethod() == "GET" && !url.SchemeIs(chrome::kAboutScheme)) {
2076 bool send_referrer = false; 2074 bool send_referrer = false;
2077 bool should_fork = 2075 bool should_fork =
2078 (enabled_bindings_ & content::BINDINGS_POLICY_WEB_UI) || 2076 (enabled_bindings_ & content::BINDINGS_POLICY_WEB_UI) ||
2079 frame->isViewSourceModeEnabled() || 2077 frame->isViewSourceModeEnabled() ||
2080 url.SchemeIs(chrome::kViewSourceScheme); 2078 url.SchemeIs(chrome::kViewSourceScheme);
2081 2079
2082 if (!should_fork) { 2080 if (!should_fork) {
2083 // Give the embedder a chance. 2081 // Give the embedder a chance.
(...skipping 2704 matching lines...) Expand 10 before | Expand all | Expand 10 after
4788 return !!RenderThreadImpl::current()->compositor_thread(); 4786 return !!RenderThreadImpl::current()->compositor_thread();
4789 } 4787 }
4790 4788
4791 void RenderViewImpl::OnJavaBridgeInit( 4789 void RenderViewImpl::OnJavaBridgeInit(
4792 const IPC::ChannelHandle& channel_handle) { 4790 const IPC::ChannelHandle& channel_handle) {
4793 DCHECK(!java_bridge_dispatcher_.get()); 4791 DCHECK(!java_bridge_dispatcher_.get());
4794 #if defined(ENABLE_JAVA_BRIDGE) 4792 #if defined(ENABLE_JAVA_BRIDGE)
4795 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this, channel_handle)); 4793 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this, channel_handle));
4796 #endif 4794 #endif
4797 } 4795 }
OLDNEW
« no previous file with comments | « chrome/test/data/extensions/api_test/webrequest/test_blocking.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698