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

Unified Diff: third_party/WebKit/Source/modules/webmidi/NavigatorWebMIDI.cpp

Issue 2945223002: Add deprecation warnings for permission API usage from iframes (Closed)
Patch Set: . Created 3 years, 5 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/modules/webmidi/NavigatorWebMIDI.cpp
diff --git a/third_party/WebKit/Source/modules/webmidi/NavigatorWebMIDI.cpp b/third_party/WebKit/Source/modules/webmidi/NavigatorWebMIDI.cpp
index ad4478cb2e25196e498d6b7bf6e521908179ca8e..ac73ae61564e02cf1cfd2c5aa14bfd119900954a 100644
--- a/third_party/WebKit/Source/modules/webmidi/NavigatorWebMIDI.cpp
+++ b/third_party/WebKit/Source/modules/webmidi/NavigatorWebMIDI.cpp
@@ -35,11 +35,13 @@
#include "core/dom/DOMException.h"
#include "core/dom/Document.h"
#include "core/dom/ExecutionContext.h"
+#include "core/frame/Deprecation.h"
#include "core/frame/LocalFrame.h"
#include "core/frame/Navigator.h"
#include "core/frame/UseCounter.h"
#include "modules/webmidi/MIDIAccessInitializer.h"
#include "modules/webmidi/MIDIOptions.h"
+#include "public/platform/WebFeaturePolicyFeature.h"
namespace blink {
@@ -91,6 +93,9 @@ ScriptPromise NavigatorWebMIDI::requestMIDIAccess(ScriptState* script_state,
}
UseCounter::CountCrossOriginIframe(
document, WebFeature::kRequestMIDIAccessIframe_ObscuredByFootprinting);
+ Deprecation::CountDeprecationFeaturePolicy(
+ document, WebFeaturePolicyFeature::kMidiFeature);
+
return MIDIAccessInitializer::Start(script_state, options);
}

Powered by Google App Engine
This is Rietveld 408576698