diff options
author | timvolodine <timvolodine@chromium.org> | 2015-05-27 11:15:13 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-27 18:16:38 +0000 |
commit | ab0b38a3a769024f7ab67443d52b7aa68a4be956 (patch) | |
tree | 01fb783102a27f5fdafaa5faba7b1656cfc7bf41 | |
parent | f27f94c5810f331da35d42e6365051e386b1816f (diff) | |
download | chromium_src-ab0b38a3a769024f7ab67443d52b7aa68a4be956.zip chromium_src-ab0b38a3a769024f7ab67443d52b7aa68a4be956.tar.gz chromium_src-ab0b38a3a769024f7ab67443d52b7aa68a4be956.tar.bz2 |
Add kDisablePermissionsAPI content flag and disable it for WebView.
The Permissions API is currently not supported on WebView.
This patch adds a content flag and disables this api for WebView.
NOTE:
This patch should land after the blink-side patch crrev.com/1150653002.
BUG=489926
TBR=avi
NOTRY=true
NOPRESUBMIT=true
Review URL: https://codereview.chromium.org/1144923003
Cr-Commit-Position: refs/heads/master@{#331100}
(cherry picked from commit 499a4ee476e5b3985a6fcbf76ed20432588333de)
Review URL: https://codereview.chromium.org/1156493007
Cr-Commit-Position: refs/branch-heads/2357@{#443}
Cr-Branched-From: 59d4494849b405682265ed5d3f5164573b9a939b-refs/heads/master@{#323860}
-rw-r--r-- | android_webview/lib/main/aw_main_delegate.cc | 3 | ||||
-rw-r--r-- | content/browser/renderer_host/render_process_host_impl.cc | 1 | ||||
-rw-r--r-- | content/child/runtime_features.cc | 3 | ||||
-rw-r--r-- | content/public/common/content_switches.cc | 3 | ||||
-rw-r--r-- | content/public/common/content_switches.h | 1 |
5 files changed, 11 insertions, 0 deletions
diff --git a/android_webview/lib/main/aw_main_delegate.cc b/android_webview/lib/main/aw_main_delegate.cc index 3e0a6e8..97b5b5d 100644 --- a/android_webview/lib/main/aw_main_delegate.cc +++ b/android_webview/lib/main/aw_main_delegate.cc @@ -90,6 +90,9 @@ bool AwMainDelegate::BasicStartupComplete(int* exit_code) { // WebView does not yet support screen orientation locking. cl->AppendSwitch(switches::kDisableScreenOrientationLock); + // WebView does not currently support the Permissions API (crbug.com/490120) + cl->AppendSwitch(switches::kDisablePermissionsAPI); + // WebView does not (yet) save Chromium data during shutdown, so add setting // for Chrome to aggressively persist DOM Storage to minimize data loss. // http://crbug.com/479767 diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc index 91dd8b3..8a5e6b4 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc @@ -1225,6 +1225,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( switches::kDisableMojoChannel, switches::kDisableNotifications, switches::kDisableOverlayScrollbar, + switches::kDisablePermissionsAPI, switches::kDisablePinch, switches::kDisablePrefixedEncryptedMedia, switches::kDisableSeccompFilterSandbox, diff --git a/content/child/runtime_features.cc b/content/child/runtime_features.cc index 39adb12..e7442c2 100644 --- a/content/child/runtime_features.cc +++ b/content/child/runtime_features.cc @@ -193,6 +193,9 @@ void SetRuntimeFeaturesDefaultsAndUpdateFromArgs( if (command_line.HasSwitch(switches::kEnablePushMessagingHasPermission)) WebRuntimeFeatures::enablePushMessagingHasPermission(true); + if (command_line.HasSwitch(switches::kDisablePermissionsAPI)) + WebRuntimeFeatures::enablePermissionsAPI(false); + // Delete "StaleWhileRevalidate" line from chrome_browser_field_trials.cc // when this experiment is done. if (base::FieldTrialList::FindFullName("StaleWhileRevalidate") == "Enabled" || diff --git a/content/public/common/content_switches.cc b/content/public/common/content_switches.cc index 99032a6..2f92d72 100644 --- a/content/public/common/content_switches.cc +++ b/content/public/common/content_switches.cc @@ -207,6 +207,9 @@ const char kDisableOneCopy[] = "disable-one-copy"; // Disable Pepper3D. const char kDisablePepper3d[] = "disable-pepper-3d"; +// Disables the Permissions API. +const char kDisablePermissionsAPI[] = "disable-permissions-api"; + // Disables compositor-accelerated touch-screen pinch gestures. const char kDisablePinch[] = "disable-pinch"; diff --git a/content/public/common/content_switches.h b/content/public/common/content_switches.h index 3e6ca57..8e02753 100644 --- a/content/public/common/content_switches.h +++ b/content/public/common/content_switches.h @@ -72,6 +72,7 @@ CONTENT_EXPORT extern const char kDisableNotifications[]; CONTENT_EXPORT extern const char kDisableOneCopy[]; extern const char kDisablePepper3d[]; CONTENT_EXPORT extern const char kDisablePinch[]; +CONTENT_EXPORT extern const char kDisablePermissionsAPI[]; CONTENT_EXPORT extern const char kDisablePluginsDiscovery[]; CONTENT_EXPORT extern const char kDisableReadingFromCanvas[]; extern const char kDisableRemoteFonts[]; |