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.
Move CastStreamingSessionClient to //components/cast_streaming
This CL makes the following changes: - Moves CastStreamingSessionClient to //components/cast_streaming/browser - Creates a public interface for the above class in /public - Adds a wrapper around this class in //fuchsia to simplify use of fidl as was previously used in CastStreamingSessionClient. Bug: 1208194 Change-Id: I46358db1605841ed3acb02e358c413da5cbc7589 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2895461 Commit-Queue: Ryan Keane <rwkeane@google.com> Reviewed-by: Fabrice de Gans <fdegans@chromium.org> Cr-Commit-Position: refs/heads/master@{#885727}
- Loading branch information
Ryan Keane
authored and
Chromium LUCI CQ
committed
May 22, 2021
1 parent
a09bf7e
commit 27e97c5
Showing
16 changed files
with
214 additions
and
93 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
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
45 changes: 45 additions & 0 deletions
45
components/cast_streaming/browser/public/receiver_session.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// Copyright 2020 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 COMPONENTS_CAST_STREAMING_BROWSER_PUBLIC_RECEIVER_SESSION_H_ | ||
#define COMPONENTS_CAST_STREAMING_BROWSER_PUBLIC_RECEIVER_SESSION_H_ | ||
|
||
#include <memory> | ||
|
||
#include "base/callback.h" | ||
#include "components/cast_streaming/mojo/cast_streaming_session.mojom.h" | ||
#include "mojo/public/cpp/bindings/associated_remote.h" | ||
|
||
namespace cast_api_bindings { | ||
class MessagePort; | ||
} | ||
|
||
namespace cast_streaming { | ||
|
||
// This interface handles a single Cast Streaming Receiver Session over a given | ||
// |message_port| and with a given |cast_streaming_receiver|. On destruction, | ||
// the Cast Streaming Receiver Session will be terminated if it was ever | ||
// started. | ||
class ReceiverSession { | ||
public: | ||
using MessagePortProvider = | ||
base::OnceCallback<std::unique_ptr<cast_api_bindings::MessagePort>()>; | ||
|
||
virtual ~ReceiverSession() = default; | ||
|
||
static std::unique_ptr<ReceiverSession> Create( | ||
MessagePortProvider message_port_provider); | ||
|
||
// Sets up the CastStreamingReceiver mojo remote. This will immediately call | ||
// CastStreamingReceiver::EnableReceiver(). Upon receiving the callback for | ||
// this method, the Cast Streaming Receiver Session will be started and audio | ||
// and/or video frames will be sent over a Mojo channel. | ||
virtual void SetCastStreamingReceiver( | ||
mojo::AssociatedRemote<mojom::CastStreamingReceiver> | ||
cast_streaming_receiver) = 0; | ||
}; | ||
|
||
} // namespace cast_streaming | ||
|
||
#endif // COMPONENTS_CAST_STREAMING_BROWSER_PUBLIC_RECEIVER_SESSION_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
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
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
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
Oops, something went wrong.