| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 ASH_DISPLAY_SCREEN_ASH_H_ | 5 #ifndef ASH_DISPLAY_SCREEN_ASH_H_ |
| 6 #define ASH_DISPLAY_SCREEN_ASH_H_ | 6 #define ASH_DISPLAY_SCREEN_ASH_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/observer_list.h" | 10 #include "base/observer_list.h" |
| 11 #include "ui/gfx/display_observer.h" | |
| 12 #include "ui/gfx/screen.h" | 11 #include "ui/gfx/screen.h" |
| 13 | 12 |
| 14 namespace gfx { | 13 namespace gfx { |
| 15 class Rect; | 14 class Rect; |
| 16 } | 15 } |
| 17 | 16 |
| 18 namespace ash { | 17 namespace ash { |
| 19 namespace internal { | 18 namespace internal { |
| 20 class DisplayManager; | 19 class DisplayManager; |
| 21 } | 20 } |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 virtual gfx::Display GetDisplayMatching( | 74 virtual gfx::Display GetDisplayMatching( |
| 76 const gfx::Rect& match_rect) const OVERRIDE; | 75 const gfx::Rect& match_rect) const OVERRIDE; |
| 77 virtual gfx::Display GetPrimaryDisplay() const OVERRIDE; | 76 virtual gfx::Display GetPrimaryDisplay() const OVERRIDE; |
| 78 virtual void AddObserver(gfx::DisplayObserver* observer) OVERRIDE; | 77 virtual void AddObserver(gfx::DisplayObserver* observer) OVERRIDE; |
| 79 virtual void RemoveObserver(gfx::DisplayObserver* observer) OVERRIDE; | 78 virtual void RemoveObserver(gfx::DisplayObserver* observer) OVERRIDE; |
| 80 | 79 |
| 81 private: | 80 private: |
| 82 friend class DisplayManager; | 81 friend class DisplayManager; |
| 83 | 82 |
| 84 // Notifies observers of display configuration changes. | 83 // Notifies observers of display configuration changes. |
| 85 void NotifyMetricsChanged(const gfx::Display& display, uint32_t metrics); | 84 void NotifyBoundsChanged(const gfx::Display& display); |
| 86 void NotifyDisplayAdded(const gfx::Display& display); | 85 void NotifyDisplayAdded(const gfx::Display& display); |
| 87 void NotifyDisplayRemoved(const gfx::Display& display); | 86 void NotifyDisplayRemoved(const gfx::Display& display); |
| 88 | 87 |
| 89 // Creates a screen that can be used during shutdown. | 88 // Creates a screen that can be used during shutdown. |
| 90 // It simply has a copy of the displays. | 89 // It simply has a copy of the displays. |
| 91 gfx::Screen* CloneForShutdown(); | 90 gfx::Screen* CloneForShutdown(); |
| 92 | 91 |
| 93 ObserverList<gfx::DisplayObserver> observers_; | 92 ObserverList<gfx::DisplayObserver> observers_; |
| 94 | 93 |
| 95 DISALLOW_COPY_AND_ASSIGN(ScreenAsh); | 94 DISALLOW_COPY_AND_ASSIGN(ScreenAsh); |
| 96 }; | 95 }; |
| 97 | 96 |
| 98 } // namespace ash | 97 } // namespace ash |
| 99 | 98 |
| 100 #endif // ASH_DISPLAY_SCREEN_ASH_H_ | 99 #endif // ASH_DISPLAY_SCREEN_ASH_H_ |
| OLD | NEW |