| 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
|
|
|