| Index: content/browser/web_contents/web_contents_impl.cc
|
| diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
| index d753e94cff46b66beadd710a7e8463a8e67b9d68..9d6c20ed81091c1d877489c2fa9172a556166100 100644
|
| --- a/content/browser/web_contents/web_contents_impl.cc
|
| +++ b/content/browser/web_contents/web_contents_impl.cc
|
| @@ -88,6 +88,7 @@
|
| #include "content/public/browser/web_contents_delegate.h"
|
| #include "content/public/browser/web_contents_observer.h"
|
| #include "content/public/common/bindings_policy.h"
|
| +#include "content/public/common/browser_plugin_guest_mode.h"
|
| #include "content/public/common/content_constants.h"
|
| #include "content/public/common/content_switches.h"
|
| #include "content/public/common/page_zoom.h"
|
| @@ -1231,8 +1232,7 @@ void WebContentsImpl::DispatchBeforeUnload(bool for_cross_site_transition) {
|
| void WebContentsImpl::AttachToOuterWebContentsFrame(
|
| WebContents* outer_web_contents,
|
| RenderFrameHost* outer_contents_frame) {
|
| - CHECK(base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| - switches::kSitePerProcess));
|
| + CHECK(BrowserPluginGuestMode::UseCrossProcessFramesForGuests());
|
| // Create a link to our outer WebContents.
|
| node_.reset(new WebContentsTreeNode());
|
| node_->ConnectToOuterWebContents(
|
| @@ -1326,8 +1326,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
|
| GetContentClient()->browser()->GetWebContentsViewDelegate(this);
|
|
|
| if (browser_plugin_guest_ &&
|
| - !base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| - switches::kSitePerProcess)) {
|
| + !BrowserPluginGuestMode::UseCrossProcessFramesForGuests()) {
|
| scoped_ptr<WebContentsView> platform_view(CreateWebContentsView(
|
| this, delegate, &render_view_host_delegate_view_));
|
|
|
| @@ -1628,9 +1627,7 @@ void WebContentsImpl::CreateNewWindow(
|
| // SiteInstance in its own BrowsingInstance.
|
| bool is_guest = BrowserPluginGuest::IsGuest(this);
|
|
|
| - if (is_guest &&
|
| - base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| - switches::kSitePerProcess)) {
|
| + if (is_guest && BrowserPluginGuestMode::UseCrossProcessFramesForGuests()) {
|
| // TODO(lazyboy): CreateNewWindow doesn't work for OOPIF-based <webview>
|
| // yet.
|
| NOTREACHED();
|
| @@ -4042,8 +4039,7 @@ void WebContentsImpl::EnsureOpenerProxiesExist(RenderFrameHost* source_rfh) {
|
| // then we should not create a RenderView. AttachToOuterWebContentsFrame()
|
| // already created a RenderFrameProxyHost for that purpose.
|
| if (GetBrowserPluginEmbedder() &&
|
| - base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| - switches::kSitePerProcess)) {
|
| + BrowserPluginGuestMode::UseCrossProcessFramesForGuests()) {
|
| return;
|
| }
|
|
|
| @@ -4268,8 +4264,7 @@ bool WebContentsImpl::CreateRenderViewForRenderManager(
|
| // frame RWHVs are unique in that they do not have their own WebContents.
|
| bool is_guest_in_site_per_process =
|
| !!browser_plugin_guest_.get() &&
|
| - base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| - switches::kSitePerProcess);
|
| + BrowserPluginGuestMode::UseCrossProcessFramesForGuests();
|
| if (!for_main_frame_navigation || is_guest_in_site_per_process) {
|
| RenderWidgetHostViewChildFrame* rwh_view_child =
|
| new RenderWidgetHostViewChildFrame(render_view_host);
|
|
|