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

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

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_sink_observer.h ('k') | media/remoting/remoting_source_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/base/resource/scale_factor.h" 5 #include "media/remoting/remoting_sink_observer.h"
6 6
7 #include "base/macros.h" 7 namespace media {
8 8
9 namespace ui { 9 RemotingSinkObserver::RemotingSinkObserver(
10 mojom::RemotingSourceRequest source_request,
11 mojom::RemoterPtr remoter)
12 : binding_(this, std::move(source_request)), remoter_(std::move(remoter)) {}
10 13
11 namespace { 14 RemotingSinkObserver::~RemotingSinkObserver() {}
12 15
13 const float kScaleFactorScales[] = {1.0f, 1.0f, 1.25f, 1.33f, 1.4f, 1.5f, 1.8f, 16 void RemotingSinkObserver::OnSinkAvailable() {
14 2.0f, 2.5f, 3.0f}; 17 is_sink_available_ = true;
15 static_assert(NUM_SCALE_FACTORS == arraysize(kScaleFactorScales),
16 "kScaleFactorScales has incorrect size");
17
18 } // namespace
19
20 float GetScaleForScaleFactor(ScaleFactor scale_factor) {
21 return kScaleFactorScales[scale_factor];
22 } 18 }
23 19
24 } // namespace ui 20 void RemotingSinkObserver::OnSinkGone() {
21 is_sink_available_ = false;
22 }
23
24 } // namespace media
OLDNEW
« no previous file with comments | « media/remoting/remoting_sink_observer.h ('k') | media/remoting/remoting_source_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698