OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef AudioOutputDeviceClient_h | 5 #ifndef AudioOutputDeviceClient_h |
6 #define AudioOutputDeviceClient_h | 6 #define AudioOutputDeviceClient_h |
7 | 7 |
8 #include "core/frame/LocalFrame.h" | 8 #include "core/frame/LocalFrame.h" |
9 #include "modules/ModulesExport.h" | 9 #include "modules/ModulesExport.h" |
10 #include "platform/Supplementable.h" | 10 #include "platform/Supplementable.h" |
11 #include "public/platform/WebSetSinkIdCallbacks.h" | 11 #include "public/platform/WebSetSinkIdCallbacks.h" |
12 #include <memory> | 12 #include <memory> |
13 | 13 |
14 namespace blink { | 14 namespace blink { |
15 | 15 |
16 class ExecutionContext; | 16 class ExecutionContext; |
| 17 class ScriptState; |
17 class WebString; | 18 class WebString; |
18 class ScriptState; | |
19 | 19 |
20 class MODULES_EXPORT AudioOutputDeviceClient : public Supplement<LocalFrame> { | 20 class MODULES_EXPORT AudioOutputDeviceClient : public Supplement<LocalFrame> { |
21 public: | 21 public: |
| 22 explicit AudioOutputDeviceClient(LocalFrame&); |
22 virtual ~AudioOutputDeviceClient() {} | 23 virtual ~AudioOutputDeviceClient() {} |
23 | 24 |
24 // Checks that a given sink exists and has permissions to be used from the o
rigin of the current frame. | 25 // 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, std::unique_ptr<WebSetSinkIdCallbacks>) = 0; | 26 virtual void checkIfAudioSinkExistsAndIsAuthorized(ExecutionContext*, const
WebString& sinkId, std::unique_ptr<WebSetSinkIdCallbacks>) = 0; |
26 | 27 |
27 DECLARE_VIRTUAL_TRACE(); | 28 DECLARE_VIRTUAL_TRACE(); |
28 | 29 |
29 // Supplement requirements. | 30 // Supplement requirements. |
30 static AudioOutputDeviceClient* from(ExecutionContext*); | 31 static AudioOutputDeviceClient* from(ExecutionContext*); |
31 static const char* supplementName(); | 32 static const char* supplementName(); |
32 }; | 33 }; |
33 | 34 |
34 MODULES_EXPORT void provideAudioOutputDeviceClientTo(LocalFrame&, AudioOutputDev
iceClient*); | 35 MODULES_EXPORT void provideAudioOutputDeviceClientTo(LocalFrame&, AudioOutputDev
iceClient*); |
35 | 36 |
36 } // namespace blink | 37 } // namespace blink |
37 | 38 |
38 #endif // AudioOutputDeviceClient_h | 39 #endif // AudioOutputDeviceClient_h |
OLD | NEW |