forked from Pissandshittium/pissandshittium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcast_runtime_service.h
72 lines (54 loc) · 2.05 KB
/
cast_runtime_service.h
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
// Copyright 2021 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 CHROMECAST_CAST_CORE_CAST_RUNTIME_SERVICE_H_
#define CHROMECAST_CAST_CORE_CAST_RUNTIME_SERVICE_H_
#include <memory>
#include "base/memory/scoped_refptr.h"
#include "chromecast/media/cma/backend/proxy/cast_runtime_audio_channel_endpoint_manager.h"
#include "chromecast/service/cast_service.h"
class PrefService;
namespace base {
class SingleThreadTaskRunner;
} // namespace base
namespace content {
class BrowserContext;
} // namespace content
namespace chromecast {
class CastWindowManager;
class WebCryptoServer;
namespace media {
class MediaPipelineBackendManager;
} // namespace media
namespace receiver {
class MediaManager;
} // namespace receiver
// This interface is to be used for building the Cast Runtime Service and act as
// the border between shared Chromium code and the specifics of that
// implementation.
class CastRuntimeService
: public CastService,
public media::CastRuntimeAudioChannelEndpointManager {
public:
static std::unique_ptr<CastRuntimeService> Create(
scoped_refptr<base::SingleThreadTaskRunner> task_runner,
content::BrowserContext* browser_context,
CastWindowManager* window_manager,
media::MediaPipelineBackendManager* media_pipeline_backend_manager,
PrefService* pref_service);
// Returns current instance of CastRuntimeService in the browser process.
static CastRuntimeService* GetInstance();
CastRuntimeService();
~CastRuntimeService() override;
virtual WebCryptoServer* GetWebCryptoServer();
virtual receiver::MediaManager* GetMediaManager();
// CastService overrides.
void InitializeInternal() override;
void FinalizeInternal() override;
void StartInternal() override;
void StopInternal() override;
// CastRuntimeAudioChannelEndpointManager overrides.
const std::string& GetAudioChannelEndpoint() override;
};
} // namespace chromecast
#endif // CHROMECAST_CAST_CORE_CAST_RUNTIME_SERVICE_H_