blob: ac712d545193084f797289dd8036d594357de999 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_AUDIO_OUTPUT_DEVICES_AUDIO_OUTPUT_DEVICE_CLIENT_H_
#define THIRD_PARTY_BLINK_RENDERER_MODULES_AUDIO_OUTPUT_DEVICES_AUDIO_OUTPUT_DEVICE_CLIENT_H_
#include <memory>
#include "third_party/blink/public/platform/web_set_sink_id_callbacks.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/modules/modules_export.h"
#include "third_party/blink/renderer/platform/supplementable.h"
namespace blink {
class Document;
class WebString;
class MODULES_EXPORT AudioOutputDeviceClient : public Supplement<LocalFrame> {
public:
static const char kSupplementName[];
explicit AudioOutputDeviceClient(LocalFrame&);
virtual ~AudioOutputDeviceClient() = default;
// Checks that a given sink exists and has permissions to be used from the
// origin of the current frame.
virtual void CheckIfAudioSinkExistsAndIsAuthorized(
Document&,
const WebString& sink_id,
std::unique_ptr<WebSetSinkIdCallbacks>) = 0;
void Trace(blink::Visitor*) override;
// Supplement requirements.
static AudioOutputDeviceClient* From(Document&);
};
MODULES_EXPORT void ProvideAudioOutputDeviceClientTo(LocalFrame&,
AudioOutputDeviceClient*);
} // namespace blink
#endif // THIRD_PARTY_BLINK_RENDERER_MODULES_AUDIO_OUTPUT_DEVICES_AUDIO_OUTPUT_DEVICE_CLIENT_H_
|