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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/remoting/remoting_sink_observer.cc
diff --git a/ui/base/resource/scale_factor.cc b/media/remoting/remoting_sink_observer.cc
similarity index 33%
copy from ui/base/resource/scale_factor.cc
copy to media/remoting/remoting_sink_observer.cc
index dceffaec424331060710e4b3ecf9cb82edfb376f..f632e2e5a1ae2d2311ab653905a256e60e5173da 100644
--- a/ui/base/resource/scale_factor.cc
+++ b/media/remoting/remoting_sink_observer.cc
@@ -2,23 +2,23 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ui/base/resource/scale_factor.h"
+#include "media/remoting/remoting_sink_observer.h"
-#include "base/macros.h"
+namespace media {
-namespace ui {
+RemotingSinkObserver::RemotingSinkObserver(
+ mojom::RemotingSourceRequest source_request,
+ mojom::RemoterPtr remoter)
+ : binding_(this, std::move(source_request)), remoter_(std::move(remoter)) {}
-namespace {
+RemotingSinkObserver::~RemotingSinkObserver() {}
-const float kScaleFactorScales[] = {1.0f, 1.0f, 1.25f, 1.33f, 1.4f, 1.5f, 1.8f,
- 2.0f, 2.5f, 3.0f};
-static_assert(NUM_SCALE_FACTORS == arraysize(kScaleFactorScales),
- "kScaleFactorScales has incorrect size");
-
-} // namespace
+void RemotingSinkObserver::OnSinkAvailable() {
+ is_sink_available_ = true;
+}
-float GetScaleForScaleFactor(ScaleFactor scale_factor) {
- return kScaleFactorScales[scale_factor];
+void RemotingSinkObserver::OnSinkGone() {
+ is_sink_available_ = false;
}
-} // namespace ui
+} // namespace media
« 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