OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef AudioOutputDeviceClient_h |
| 6 #define AudioOutputDeviceClient_h |
| 7 |
| 8 #include "modules/ModulesExport.h" |
| 9 #include "platform/Supplementable.h" |
| 10 #include "public/platform/WebSetSinkIdCallbacks.h" |
| 11 #include "wtf/PassOwnPtr.h" |
| 12 |
| 13 namespace blink { |
| 14 |
| 15 class ExecutionContext; |
| 16 class LocalFrame; |
| 17 class WebString; |
| 18 class ScriptState; |
| 19 |
| 20 class AudioOutputDeviceClient : public WillBeHeapSupplement<LocalFrame> { |
| 21 public: |
| 22 virtual ~AudioOutputDeviceClient() {} |
| 23 |
| 24 // Checks that a given sink exists and has permissions to be used from the o
rigin of the current frame. |
| 25 virtual void checkIfAudioSinkExistsAndIsAuthorized(ExecutionContext*, const
WebString& sinkId, PassOwnPtr<WebSetSinkIdCallbacks>) = 0; |
| 26 |
| 27 // WillBeHeapSupplement requirements. |
| 28 static AudioOutputDeviceClient* from(ExecutionContext*); |
| 29 static const char* supplementName(); |
| 30 }; |
| 31 |
| 32 MODULES_EXPORT void provideAudioOutputDeviceClientTo(LocalFrame&, PassOwnPtrWill
BeRawPtr<AudioOutputDeviceClient>); |
| 33 |
| 34 } // namespace blink |
| 35 |
| 36 #endif // AudioOutputDeviceClient_h |
OLD | NEW |