Index: remoting/host/session_controller_list.h |
diff --git a/remoting/host/session_controller_list.h b/remoting/host/session_controller_list.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..4888c79944efbff3f53f1e1b84e28f559c1b5a07 |
--- /dev/null |
+++ b/remoting/host/session_controller_list.h |
@@ -0,0 +1,42 @@ |
+// 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. |
+ |
+#ifndef REMOTING_HOST_SESSION_CONTROLLER_LIST_H_ |
+#define REMOTING_HOST_SESSION_CONTROLLER_LIST_H_ |
+ |
+#include <list> |
+ |
+#include "base/basictypes.h" |
+#include "base/memory/scoped_ptr.h" |
+#include "base/threading/non_thread_safe.h" |
+#include "remoting/host/session_controller.h" |
+ |
+namespace remoting { |
+ |
+// Used to chain multiple |SessionController| instances such that they appear to |
+// be a single |SessionController| instance. |
+class SessionControllerList |
+ : public base::NonThreadSafe, |
+ public SessionController { |
+ public: |
+ SessionControllerList(); |
+ virtual ~SessionControllerList(); |
+ |
+ // Adds |controler| to the list of owner controllers. |
+ void AddController(scoped_ptr<SessionController> controller); |
+ |
+ // SessionController interface. |
+ virtual void SetScreenResolution(const ScreenResolution& resolution) OVERRIDE; |
+ |
+ private: |
+ // The list of session controllers owned by |this|. |
+ typedef std::list<SessionController*> Controllers; |
+ Controllers controllers_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(SessionControllerList); |
+}; |
+ |
+} // namespace remoting |
+ |
+#endif // REMOTING_HOST_SESSION_CONTROLLER_LIST_H_ |