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 1972 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1983 bool is_content_initiated = | 1983 bool is_content_initiated = |
1984 DocumentState::FromDataSource(frame->provisionalDataSource())-> | 1984 DocumentState::FromDataSource(frame->provisionalDataSource())-> |
1985 navigation_state()->is_content_initiated(); | 1985 navigation_state()->is_content_initiated(); |
1986 | 1986 |
1987 // Experimental: | 1987 // Experimental: |
1988 // If --enable-strict-site-isolation is enabled, send all top-level | 1988 // If --enable-strict-site-isolation is enabled, send all top-level |
1989 // navigations to the browser to let it swap processes when crossing site | 1989 // navigations to the browser to let it swap processes when crossing site |
1990 // boundaries. This is currently expected to break some script calls and | 1990 // boundaries. This is currently expected to break some script calls and |
1991 // navigations, such as form submissions. | 1991 // navigations, such as form submissions. |
1992 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 1992 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
1993 if (!frame->parent() && (is_content_initiated || is_redirect) && | 1993 if (!frame->parent() && (is_content_initiated) && |
Matt Perry
2011/11/23 02:51:20
this change makes it so that the renderer no longe
| |
1994 command_line.HasSwitch(switches::kEnableStrictSiteIsolation)) { | 1994 command_line.HasSwitch(switches::kEnableStrictSiteIsolation)) { |
1995 GURL referrer(request.httpHeaderField(WebString::fromUTF8("Referer"))); | 1995 GURL referrer(request.httpHeaderField(WebString::fromUTF8("Referer"))); |
1996 OpenURL(frame, url, referrer, default_policy); | 1996 OpenURL(frame, url, referrer, default_policy); |
1997 return WebKit::WebNavigationPolicyIgnore; | 1997 return WebKit::WebNavigationPolicyIgnore; |
1998 } | 1998 } |
1999 | 1999 |
2000 // If the browser is interested, then give it a chance to look at top level | 2000 // If the browser is interested, then give it a chance to look at top level |
2001 // navigations. | 2001 // navigations. |
2002 if (is_content_initiated && | 2002 if (is_content_initiated && |
2003 renderer_preferences_.browser_handles_top_level_requests && | 2003 renderer_preferences_.browser_handles_top_level_requests && |
(...skipping 2717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4721 return !!RenderThreadImpl::current()->compositor_thread(); | 4721 return !!RenderThreadImpl::current()->compositor_thread(); |
4722 } | 4722 } |
4723 | 4723 |
4724 void RenderViewImpl::OnJavaBridgeInit( | 4724 void RenderViewImpl::OnJavaBridgeInit( |
4725 const IPC::ChannelHandle& channel_handle) { | 4725 const IPC::ChannelHandle& channel_handle) { |
4726 DCHECK(!java_bridge_dispatcher_.get()); | 4726 DCHECK(!java_bridge_dispatcher_.get()); |
4727 #if defined(ENABLE_JAVA_BRIDGE) | 4727 #if defined(ENABLE_JAVA_BRIDGE) |
4728 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this, channel_handle)); | 4728 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this, channel_handle)); |
4729 #endif | 4729 #endif |
4730 } | 4730 } |
OLD | NEW |