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

Unified Diff: remoting/host/session_controller_list.cc

Issue 12594009: Converted LocalInputMonitor into a SessionController instance. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
Index: remoting/host/session_controller_list.cc
diff --git a/remoting/host/session_controller_list.cc b/remoting/host/session_controller_list.cc
new file mode 100644
index 0000000000000000000000000000000000000000..d05e1f3845db5cabac3e2bdcbe16d7c1bcd61f1c
--- /dev/null
+++ b/remoting/host/session_controller_list.cc
@@ -0,0 +1,38 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "remoting/host/session_controller_list.h"
+
+#include "base/logging.h"
+#include "base/stl_util.h"
+
+namespace remoting {
+
+SessionControllerList::SessionControllerList() {
+}
+
+SessionControllerList::~SessionControllerList() {
+ STLDeleteContainerPointers(controllers_.begin(), controllers_.end());
+}
+
+void SessionControllerList::AddController(
+ scoped_ptr<SessionController> controller) {
+ DCHECK(CalledOnValidThread());
+
+ controllers_.push_back(controller.release());
+}
+
+void SessionControllerList::SetScreenResolution(
+ const ScreenResolution& resolution) {
+ DCHECK(CalledOnValidThread());
+
+ // Pass |resolution| to every owner session controller.
+ Controllers::iterator i = controllers_.begin();
+ while (i != controllers_.end()) {
+ (*i)->SetScreenResolution(resolution);
+ ++i;
+ }
+}
+
+} // namespace remoting

Powered by Google App Engine
This is Rietveld 408576698