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

Side by Side Diff: content/common/site_isolation_policy.cc

Issue 1639013002: Fix OOPIF-based <webview>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months 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
« no previous file with comments | « no previous file | 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/common/site_isolation_policy.h" 5 #include "content/common/site_isolation_policy.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "content/public/common/browser_plugin_guest_mode.h"
9 #include "content/public/common/browser_side_navigation_policy.h" 10 #include "content/public/common/browser_side_navigation_policy.h"
10 #include "content/public/common/content_client.h" 11 #include "content/public/common/content_client.h"
11 #include "content/public/common/content_switches.h" 12 #include "content/public/common/content_switches.h"
12 13
13 namespace content { 14 namespace content {
14 15
15 // static 16 // static
16 bool SiteIsolationPolicy::AreCrossProcessFramesPossible() { 17 bool SiteIsolationPolicy::AreCrossProcessFramesPossible() {
17 return base::CommandLine::ForCurrentProcess()->HasSwitch( 18 return base::CommandLine::ForCurrentProcess()->HasSwitch(
18 switches::kSitePerProcess) || 19 switches::kSitePerProcess) ||
19 GetContentClient()->IsSupplementarySiteIsolationModeEnabled(); 20 GetContentClient()->IsSupplementarySiteIsolationModeEnabled() ||
21 BrowserPluginGuestMode::UseCrossProcessFramesForGuests();
20 } 22 }
21 23
22 // static 24 // static
23 bool SiteIsolationPolicy::UseDedicatedProcessesForAllSites() { 25 bool SiteIsolationPolicy::UseDedicatedProcessesForAllSites() {
24 return base::CommandLine::ForCurrentProcess()->HasSwitch( 26 return base::CommandLine::ForCurrentProcess()->HasSwitch(
25 switches::kSitePerProcess); 27 switches::kSitePerProcess);
26 } 28 }
27 29
28 // static 30 // static
29 bool SiteIsolationPolicy::UseSubframeNavigationEntries() { 31 bool SiteIsolationPolicy::UseSubframeNavigationEntries() {
30 // Enable the new navigation history behavior if any manner of site isolation 32 // Enable the new navigation history behavior if any manner of site isolation
31 // is active. 33 // is active.
32 // PlzNavigate: also enable the new navigation history behavior. 34 // PlzNavigate: also enable the new navigation history behavior.
33 return AreCrossProcessFramesPossible() || IsBrowserSideNavigationEnabled(); 35 return AreCrossProcessFramesPossible() || IsBrowserSideNavigationEnabled();
34 } 36 }
35 37
36 // static 38 // static
37 bool SiteIsolationPolicy::IsSwappedOutStateForbidden() { 39 bool SiteIsolationPolicy::IsSwappedOutStateForbidden() {
38 return true; 40 return true;
39 } 41 }
40 42
41 } // namespace content 43 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698