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

Side by Side Diff: third_party/WebKit/Source/modules/webmidi/NavigatorWebMIDI.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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 14 matching lines...) Expand all
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #include "modules/webmidi/NavigatorWebMIDI.h" 31 #include "modules/webmidi/NavigatorWebMIDI.h"
32 32
33 #include "bindings/core/v8/ScriptPromise.h" 33 #include "bindings/core/v8/ScriptPromise.h"
34 #include "bindings/core/v8/ScriptPromiseResolver.h" 34 #include "bindings/core/v8/ScriptPromiseResolver.h"
35 #include "core/dom/Document.h"
iclelland 2017/06/22 15:12:48 Whoa -- when did the strict ASCII ordering change?
raymes 2017/07/05 01:04:26 Fixed :) not sure what happened
35 #include "core/dom/DOMException.h" 36 #include "core/dom/DOMException.h"
36 #include "core/dom/Document.h"
37 #include "core/dom/ExecutionContext.h" 37 #include "core/dom/ExecutionContext.h"
38 #include "core/frame/Deprecation.h"
38 #include "core/frame/LocalFrame.h" 39 #include "core/frame/LocalFrame.h"
39 #include "core/frame/Navigator.h" 40 #include "core/frame/Navigator.h"
40 #include "core/frame/UseCounter.h" 41 #include "core/frame/UseCounter.h"
41 #include "modules/webmidi/MIDIAccessInitializer.h" 42 #include "modules/webmidi/MIDIAccessInitializer.h"
42 #include "modules/webmidi/MIDIOptions.h" 43 #include "modules/webmidi/MIDIOptions.h"
43 44
44 namespace blink { 45 namespace blink {
45 46
46 NavigatorWebMIDI::NavigatorWebMIDI(Navigator& navigator) 47 NavigatorWebMIDI::NavigatorWebMIDI(Navigator& navigator)
47 : Supplement<Navigator>(navigator) {} 48 : Supplement<Navigator>(navigator) {}
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 } 81 }
81 82
82 Document& document = *ToDocument(ExecutionContext::From(script_state)); 83 Document& document = *ToDocument(ExecutionContext::From(script_state));
83 if (options.hasSysex() && options.sysex()) { 84 if (options.hasSysex() && options.sysex()) {
84 UseCounter::Count(document, WebFeature::kRequestMIDIAccessWithSysExOption); 85 UseCounter::Count(document, WebFeature::kRequestMIDIAccessWithSysExOption);
85 UseCounter::CountCrossOriginIframe( 86 UseCounter::CountCrossOriginIframe(
86 document, WebFeature::kRequestMIDIAccessIframeWithSysExOption); 87 document, WebFeature::kRequestMIDIAccessIframeWithSysExOption);
87 } 88 }
88 UseCounter::CountCrossOriginIframe(document, 89 UseCounter::CountCrossOriginIframe(document,
89 WebFeature::kRequestMIDIAccessIframe); 90 WebFeature::kRequestMIDIAccessIframe);
91 Deprecation::CountDeprecationCrossOriginIframe(
92 document, WebFeature::kRequestMIDIAccessDisabledIframe);
93
90 return MIDIAccessInitializer::Start(script_state, options); 94 return MIDIAccessInitializer::Start(script_state, options);
91 } 95 }
92 96
93 } // namespace blink 97 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698