forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Interface to be implemented in internal Chromecast repo
This CL defined the CastRuntimeService interface. It is to be used for building the Cast Runtime Service inside internal Chromecast code, and it will act as the border between public Chromium and this internal implementation to provide a mechanism through which internal constants and implementations of public Chromium types available during an internally-built executable's runtime may be accessed. NOTE: This interface is intended to wrap an existing internal class: go/castruntimeservicewrapper Change-Id: I1aeaf69c824fe491051ffc47dd21e027dced83f6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2827503 Reviewed-by: Yuchen Liu <yucliu@chromium.org> Commit-Queue: Ryan Keane <rwkeane@google.com> Cr-Commit-Position: refs/heads/master@{#872966}
- Loading branch information
Ryan Keane
authored and
Chromium LUCI CQ
committed
Apr 15, 2021
1 parent
970d910
commit a7da67b
Showing
7 changed files
with
141 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# 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. | ||
|
||
import("//chromecast/chromecast.gni") | ||
|
||
cast_source_set("cast_core") { | ||
sources = [ | ||
"cast_runtime_service.cc", | ||
"cast_runtime_service.h", | ||
] | ||
|
||
deps = [ | ||
"//chromecast/media/cma/backend/proxy:headers", | ||
"//chromecast/service", | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
include_rules = [ | ||
"+chromecast/media", | ||
'+chromecast/service', | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
btolsch@chromium.org | ||
mfoltz@chromium.org | ||
rwkeane@google.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// 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. | ||
|
||
#include "chromecast/cast_core/cast_runtime_service.h" | ||
|
||
namespace chromecast { | ||
namespace media { | ||
|
||
CastRuntimeService::CastRuntimeService() = default; | ||
|
||
CastRuntimeService::~CastRuntimeService() = default; | ||
|
||
} // namespace media | ||
} // namespace chromecast |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// 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 "chromecast/media/cma/backend/proxy/cast_runtime_audio_channel_endpoint_manager.h" | ||
#include "chromecast/service/cast_service.h" | ||
|
||
namespace chromecast { | ||
|
||
class WebCryptoServer; | ||
|
||
namespace receiver { | ||
class MediaManager; | ||
} // namespace receiver | ||
|
||
namespace media { | ||
|
||
// 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. | ||
// | ||
// NOTE: When adding a new interface to this class, first add it to all | ||
// implementations of this interface in downstream repos. Else, the roll of this | ||
// code into those repos will break. | ||
class CastRuntimeService : public CastService, | ||
public CastRuntimeAudioChannelEndpointManager { | ||
public: | ||
// Returns current instance of CastRuntimeService in the browser process. | ||
// TODO(rwkeane): After dependent repos have implemented this interface, | ||
// implement it in public Chromium as-well. Do not implement before then, to | ||
// ensure that integration cross-repo remains relatively simple. | ||
static CastRuntimeService* GetInstance(); | ||
|
||
CastRuntimeService(); | ||
~CastRuntimeService() override; | ||
|
||
virtual WebCryptoServer* GetWebCryptoServer() = 0; | ||
virtual receiver::MediaManager* GetMediaManager() = 0; | ||
}; | ||
|
||
} // namespace media | ||
} // namespace chromecast | ||
|
||
#endif // CHROMECAST_CAST_CORE_CAST_RUNTIME_SERVICE_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters