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

Unified Diff: media/remoting/remoting_cdm_controller.cc

Issue 2643253003: Media Remoting Clean-up: Less-redundant naming, style consistency, etc. (Closed)
Patch Set: REBASE Created 3 years, 11 months 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_cdm_controller.h ('k') | media/remoting/remoting_cdm_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/remoting/remoting_cdm_controller.cc
diff --git a/media/remoting/remoting_cdm_controller.cc b/media/remoting/remoting_cdm_controller.cc
index 44bf2dea0fc34e593864fc55593a76d7eaabc36c..d67628c0ff3c9a92b50b344b678424e3c29facb7 100644
--- a/media/remoting/remoting_cdm_controller.cc
+++ b/media/remoting/remoting_cdm_controller.cc
@@ -10,17 +10,18 @@
#include "base/threading/thread_checker.h"
namespace media {
+namespace remoting {
RemotingCdmController::RemotingCdmController(
- scoped_refptr<RemotingSourceImpl> remoting_source)
- : remoting_source_(std::move(remoting_source)) {
- remoting_source_->AddClient(this);
+ scoped_refptr<SharedSession> session)
+ : session_(std::move(session)) {
+ session_->AddClient(this);
}
RemotingCdmController::~RemotingCdmController() {
DCHECK(thread_checker_.CalledOnValidThread());
- remoting_source_->RemoveClient(this);
+ session_->RemoveClient(this);
}
void RemotingCdmController::OnStarted(bool success) {
@@ -34,9 +35,8 @@ void RemotingCdmController::OnStarted(bool success) {
void RemotingCdmController::OnSessionStateChanged() {
DCHECK(thread_checker_.CalledOnValidThread());
- if (is_remoting_ &&
- remoting_source_->state() == RemotingSessionState::SESSION_STOPPING) {
- remoting_source_->Shutdown();
+ if (is_remoting_ && session_->state() == SharedSession::SESSION_STOPPING) {
+ session_->Shutdown();
is_remoting_ = false;
}
}
@@ -51,14 +51,15 @@ void RemotingCdmController::ShouldCreateRemotingCdm(
return;
}
- if (!remoting_source_->is_remote_decryption_available()) {
+ if (!session_->is_remote_decryption_available()) {
cb.Run(false);
return;
}
DCHECK(cdm_check_cb_.is_null());
cdm_check_cb_ = cb;
- remoting_source_->StartRemoting(this);
+ session_->StartRemoting(this);
}
+} // namespace remoting
} // namespace media
« no previous file with comments | « media/remoting/remoting_cdm_controller.h ('k') | media/remoting/remoting_cdm_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698