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

Unified Diff: remoting/host/client_session.cc

Issue 12545026: ResizingHostObserver is created by the desktop environment together with other stubs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CR feedback & rebased Created 7 years, 9 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 | « remoting/host/client_session.h ('k') | remoting/host/client_session_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/client_session.cc
diff --git a/remoting/host/client_session.cc b/remoting/host/client_session.cc
index 46bb5c5c7288090d8354100a4325359226e5a04c..a1500660d2992da12da726fc1979a2531167efb4 100644
--- a/remoting/host/client_session.cc
+++ b/remoting/host/client_session.cc
@@ -19,6 +19,7 @@
#include "remoting/host/audio_scheduler.h"
#include "remoting/host/desktop_environment.h"
#include "remoting/host/event_executor.h"
+#include "remoting/host/session_controller.h"
#include "remoting/host/video_scheduler.h"
#include "remoting/proto/control.pb.h"
#include "remoting/proto/event.pb.h"
@@ -94,10 +95,9 @@ void ClientSession::NotifyClientResolution(
VLOG(1) << "Received ClientResolution (dips_width="
<< resolution.dips_width() << ", dips_height="
<< resolution.dips_height() << ")";
- event_handler_->OnClientResolutionChanged(
- this,
- SkISize::Make(resolution.dips_width(), resolution.dips_height()),
- SkIPoint::Make(kDefaultDPI, kDefaultDPI));
+ session_controller_->OnClientResolutionChanged(
+ SkIPoint::Make(kDefaultDPI, kDefaultDPI),
+ SkISize::Make(resolution.dips_width(), resolution.dips_height()));
}
}
@@ -146,8 +146,12 @@ void ClientSession::OnConnectionChannelsConnected(
DCHECK_EQ(connection_.get(), connection);
DCHECK(!audio_scheduler_);
DCHECK(!event_executor_);
+ DCHECK(!session_controller_);
DCHECK(!video_scheduler_);
+ // Create the session controller.
+ session_controller_ = desktop_environment_->CreateSessionController();
+
// Create and start the event executor.
event_executor_ = desktop_environment_->CreateEventExecutor(
input_task_runner_, ui_task_runner_);
@@ -225,6 +229,7 @@ void ClientSession::OnConnectionClosed(
client_clipboard_factory_.InvalidateWeakPtrs();
event_executor_.reset();
+ session_controller_.reset();
// Notify the ChromotingHost that this client is disconnected.
// TODO(sergeyu): Log failure reason?
@@ -266,6 +271,7 @@ void ClientSession::Stop() {
DCHECK(CalledOnValidThread());
DCHECK(!audio_scheduler_);
DCHECK(!event_executor_);
+ DCHECK(!session_controller_);
DCHECK(!video_scheduler_);
connection_.reset();
@@ -290,6 +296,7 @@ ClientSession::~ClientSession() {
DCHECK(CalledOnValidThread());
DCHECK(!audio_scheduler_);
DCHECK(!event_executor_);
+ DCHECK(!session_controller_);
DCHECK(!video_scheduler_);
}
« no previous file with comments | « remoting/host/client_session.h ('k') | remoting/host/client_session_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698