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

Unified Diff: remoting/host/chromoting_host.cc

Issue 5118002: Rename SessionManager to ScreenRecorder (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added comments Created 10 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
Index: remoting/host/chromoting_host.cc
diff --git a/remoting/host/chromoting_host.cc b/remoting/host/chromoting_host.cc
index 67798a960bdb242725c5b278c63bf8da7fe1e8ff..eb4ebf93191808389de1529446edb9b27d5f65c1 100644
--- a/remoting/host/chromoting_host.cc
+++ b/remoting/host/chromoting_host.cc
@@ -25,7 +25,7 @@
#include "remoting/host/chromoting_host_context.h"
#include "remoting/host/host_config.h"
#include "remoting/host/host_stub_fake.h"
-#include "remoting/host/session_manager.h"
+#include "remoting/host/screen_recorder.h"
#include "remoting/protocol/connection_to_client.h"
#include "remoting/protocol/host_stub.h"
#include "remoting/protocol/input_stub.h"
@@ -147,9 +147,9 @@ void ChromotingHost::Shutdown() {
}
// Tell the session to pause and then disconnect all clients.
- if (session_.get()) {
- session_->Pause();
- session_->RemoveAllConnections();
+ if (recorder_.get()) {
+ recorder_->Pause();
+ recorder_->RemoveAllConnections();
}
// Disconnect the client.
@@ -184,23 +184,23 @@ void ChromotingHost::OnClientConnected(ConnectionToClient* connection) {
DCHECK_EQ(context_->main_message_loop(), MessageLoop::current());
// Create a new RecordSession if there was none.
- if (!session_.get()) {
- // Then we create a SessionManager passing the message loops that
+ if (!recorder_.get()) {
+ // Then we create a ScreenRecorder passing the message loops that
// it should run on.
DCHECK(capturer_.get());
Encoder* encoder = CreateEncoder(connection->session()->config());
- session_ = new SessionManager(context_->main_message_loop(),
- context_->encode_message_loop(),
- context_->network_message_loop(),
- capturer_.release(),
- encoder);
+ recorder_ = new ScreenRecorder(context_->main_message_loop(),
+ context_->encode_message_loop(),
+ context_->network_message_loop(),
+ capturer_.release(),
+ encoder);
}
// Immediately add the connection and start the session.
- session_->AddConnection(connection);
- session_->Start();
+ recorder_->AddConnection(connection);
+ recorder_->Start();
VLOG(1) << "Session manager started";
}
@@ -209,9 +209,9 @@ void ChromotingHost::OnClientDisconnected(ConnectionToClient* connection) {
// Remove the connection from the session manager and pause the session.
// TODO(hclam): Pause only if the last connection disconnected.
- if (session_.get()) {
- session_->RemoveConnection(connection);
- session_->Pause();
+ if (recorder_.get()) {
+ recorder_->RemoveConnection(connection);
+ recorder_->Pause();
}
// Close the connection to connection just to be safe.

Powered by Google App Engine
This is Rietveld 408576698