| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_AURA_TEST_SINGLE_MONITOR_MANAGER_H_ | 5 #ifndef UI_AURA_SINGLE_MONITOR_MANAGER_H_ |
| 6 #define UI_AURA_TEST_SINGLE_MONITOR_MANAGER_H_ | 6 #define UI_AURA_SINGLE_MONITOR_MANAGER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "ui/aura/monitor_manager.h" | 11 #include "ui/aura/monitor_manager.h" |
| 12 #include "ui/aura/window_observer.h" | 12 #include "ui/aura/window_observer.h" |
| 13 | 13 |
| 14 namespace gfx { | 14 namespace gfx { |
| 15 class Rect; | 15 class Rect; |
| 16 } | 16 } |
| 17 | 17 |
| 18 namespace aura { | 18 namespace aura { |
| 19 namespace test { | |
| 20 | 19 |
| 21 // A monitor manager assuming there is one monitor. | 20 // A monitor manager assuming there is one monitor. |
| 22 class SingleMonitorManager : public MonitorManager, | 21 class SingleMonitorManager : public MonitorManager, |
| 23 public WindowObserver { | 22 public WindowObserver { |
| 24 public: | 23 public: |
| 25 SingleMonitorManager(); | 24 SingleMonitorManager(); |
| 26 virtual ~SingleMonitorManager(); | 25 virtual ~SingleMonitorManager(); |
| 27 | 26 |
| 28 // MonitorManager overrides: | 27 // MonitorManager overrides: |
| 29 virtual void OnNativeMonitorsChanged( | 28 virtual void OnNativeMonitorsChanged( |
| (...skipping 16 matching lines...) Expand all Loading... |
| 46 private: | 45 private: |
| 47 void Init(); | 46 void Init(); |
| 48 void Update(const gfx::Size size); | 47 void Update(const gfx::Size size); |
| 49 | 48 |
| 50 RootWindow* root_window_; | 49 RootWindow* root_window_; |
| 51 scoped_ptr<Monitor> monitor_; | 50 scoped_ptr<Monitor> monitor_; |
| 52 | 51 |
| 53 DISALLOW_COPY_AND_ASSIGN(SingleMonitorManager); | 52 DISALLOW_COPY_AND_ASSIGN(SingleMonitorManager); |
| 54 }; | 53 }; |
| 55 | 54 |
| 56 } // namespace test | |
| 57 } // namespace aura | 55 } // namespace aura |
| 58 | 56 |
| 59 #endif // UI_AURA_TEST_SINGLE_MONITOR_MANAGER_H_ | 57 #endif // UI_AURA_SINGLE_MONITOR_MANAGER_H_ |
| OLD | NEW |