OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 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 #ifndef ASH_MONITOR_MONITOR_CONTROLLER_H_ |
| 6 #define ASH_MONITOR_MONITOR_CONTROLLER_H_ |
| 7 #pragma once |
| 8 |
| 9 #include <map> |
| 10 |
| 11 #include "base/basictypes.h" |
| 12 #include "base/compiler_specific.h" |
| 13 #include "ui/aura/monitor_manager.h" |
| 14 |
| 15 namespace aura { |
| 16 class RootWindow; |
| 17 } |
| 18 |
| 19 namespace ash { |
| 20 namespace internal { |
| 21 |
| 22 // MonitorController creates and maintains RootWindows for each |
| 23 // attached monitor, keeping them in sync with monitor configuration changes. |
| 24 class MonitorController : public aura::MonitorObserver { |
| 25 public: |
| 26 MonitorController(); |
| 27 virtual ~MonitorController(); |
| 28 |
| 29 // aura::MonitorObserver overrides: |
| 30 virtual void OnMonitorBoundsChanged(const aura::Monitor* monitor) OVERRIDE; |
| 31 |
| 32 private: |
| 33 void Init(); |
| 34 |
| 35 std::map<const aura::Monitor*, aura::RootWindow*> root_windows_; |
| 36 |
| 37 DISALLOW_COPY_AND_ASSIGN(MonitorController); |
| 38 }; |
| 39 |
| 40 } // namespace internal |
| 41 } // namespace ash |
| 42 |
| 43 #endif // ASH_MONITOR_MONITOR_CONTROLLER_H_ |
OLD | NEW |