Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Side by Side Diff: media/remoting/remoting_sink_observer.h

Issue 2457563002: Media Remoting: Add remoting control logic for encrypted contents. (Closed)
Patch Set: Addressed comments from PS#12. Fixed ASAN. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « media/remoting/remoting_renderer_factory.cc ('k') | media/remoting/remoting_sink_observer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef MEDIA_REMOTING_REMOTING_SINK_OBSERVER_H_
6 #define MEDIA_REMOTING_REMOTING_SINK_OBSERVER_H_
7
8 #include "media/mojo/interfaces/remoting.mojom.h"
9 #include "mojo/public/cpp/bindings/binding.h"
10
11 namespace media {
12
13 // This calss is a pure observer of remoting sink availability to indicate
14 // whether a remoting session can be started.
15 class RemotingSinkObserver final : public mojom::RemotingSource {
16 public:
17 RemotingSinkObserver(mojom::RemotingSourceRequest source_request,
18 mojom::RemoterPtr remoter);
19 ~RemotingSinkObserver() override;
20
21 // RemotingSource implementations.
22 void OnSinkAvailable() override;
23 void OnSinkGone() override;
24 void OnStarted() override {}
25 void OnStartFailed(mojom::RemotingStartFailReason reason) override {}
26 void OnMessageFromSink(const std::vector<uint8_t>& message) override {}
27 void OnStopped(mojom::RemotingStopReason reason) override {}
28
29 bool is_sink_available() { return is_sink_available_; }
30
31 private:
32 const mojo::Binding<mojom::RemotingSource> binding_;
33 const mojom::RemoterPtr remoter_;
34 bool is_sink_available_ = false;
35
36 DISALLOW_COPY_AND_ASSIGN(RemotingSinkObserver);
37 };
38
39 } // namespace media
40
41 #endif // MEDIA_REMOTING_REMOTING_SINK_OBSERVER_H_
OLDNEW
« no previous file with comments | « media/remoting/remoting_renderer_factory.cc ('k') | media/remoting/remoting_sink_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698