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

Unified Diff: third_party/WebKit/Source/core/frame/Deprecation.cpp

Issue 2945223002: Add deprecation warnings for permission API usage from iframes (Closed)
Patch Set: Depreaction warnings Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/frame/Deprecation.cpp
diff --git a/third_party/WebKit/Source/core/frame/Deprecation.cpp b/third_party/WebKit/Source/core/frame/Deprecation.cpp
index 348a1e23f61178b7fbf1ed8ec6ba4f67c7c417e2..b632bb5de39b73c3da5e34fbe0c99380ec77bdcd 100644
--- a/third_party/WebKit/Source/core/frame/Deprecation.cpp
+++ b/third_party/WebKit/Source/core/frame/Deprecation.cpp
@@ -70,6 +70,15 @@ String replacedWillBeRemoved(const char* feature,
feature, milestoneString(milestone), replacement, details);
}
+String iframePermissionsWarning(const char* function, Milestone milestone) {
+ return String::Format(
+ "%s usage in cross-origin iframes is deprecated and will be disabled in "
+ "%s. To continue to use this feature, it must be enabled by the "
+ "embedding document using Feature Policy. See https://goo.gl/EuHzyv for "
+ "more details.",
+ function, milestoneString(milestone));
+}
+
} // anonymous namespace
namespace blink {
@@ -449,6 +458,14 @@ String Deprecation::DeprecationMessage(WebFeature feature) {
"is deprecated, and is planned to be removed in %s. Please refer to "
"https://goo.gl/EGXzpw for possible migration paths.",
milestoneString(M65));
+ case WebFeature::kEncryptedMediaDisabledIframe:
+ return iframePermissionsWarning("requestMediaKeySystemAccess", M62);
iclelland 2017/06/22 15:12:48 Should the interfaces in these messages be qualifi
raymes 2017/07/05 01:04:25 Yeah I thought about that. Some things don't seem
iclelland 2017/07/05 04:41:22 Sounds good as long as there's no ambiguity there.
+ case WebFeature::kGeolocationDisabledIframe:
+ return iframePermissionsWarning("getCurrentPosition and watchPosition", M62);
+ case WebFeature::kGetUserMediaDisabledIframe:
+ return iframePermissionsWarning("getUserMedia", M62);
+ case WebFeature::kRequestMIDIAccessDisabledIframe:
+ return iframePermissionsWarning("requestMIDIAccess", M62);
// Features that aren't deprecated don't have a deprecation message.
default:

Powered by Google App Engine
This is Rietveld 408576698