OLD | NEW |
(Empty) | |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "remoting/host/session_controller_list.h" |
| 6 |
| 7 #include "base/logging.h" |
| 8 #include "base/stl_util.h" |
| 9 |
| 10 namespace remoting { |
| 11 |
| 12 SessionControllerList::SessionControllerList() { |
| 13 } |
| 14 |
| 15 SessionControllerList::~SessionControllerList() { |
| 16 STLDeleteContainerPointers(controllers_.begin(), controllers_.end()); |
| 17 } |
| 18 |
| 19 void SessionControllerList::AddController( |
| 20 scoped_ptr<SessionController> controller) { |
| 21 DCHECK(CalledOnValidThread()); |
| 22 |
| 23 controllers_.push_back(controller.release()); |
| 24 } |
| 25 |
| 26 void SessionControllerList::SetScreenResolution( |
| 27 const ScreenResolution& resolution) { |
| 28 DCHECK(CalledOnValidThread()); |
| 29 |
| 30 // Pass |resolution| to every owner session controller. |
| 31 Controllers::iterator i = controllers_.begin(); |
| 32 while (i != controllers_.end()) { |
| 33 (*i)->SetScreenResolution(resolution); |
| 34 ++i; |
| 35 } |
| 36 } |
| 37 |
| 38 } // namespace remoting |
OLD | NEW |