OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef UI_GFX_DISPLAY_CHANGE_NOTIFIER_H_ |
| 6 #define UI_GFX_DISPLAY_CHANGE_NOTIFIER_H_ |
| 7 |
| 8 #include <vector> |
| 9 |
| 10 #include "base/observer_list.h" |
| 11 #include "ui/gfx/display_observer.h" |
| 12 |
| 13 // DisplayChangeNotifier is a class implementing the handling of DisplayObserver |
| 14 // notification for gfx::Screen. |
| 15 class DisplayChangeNotifier { |
| 16 public: |
| 17 DisplayChangeNotifier(); |
| 18 ~DisplayChangeNotifier(); |
| 19 |
| 20 void AddObserver(gfx::DisplayObserver* observer); |
| 21 |
| 22 void RemoveObserver(gfx::DisplayObserver* observer); |
| 23 |
| 24 void NotifyDisplaysChanged(const std::vector<gfx::Display>& old_displays, |
| 25 const std::vector<gfx::Display>& new_displays); |
| 26 |
| 27 private: |
| 28 // The observers that need to be notified when a display is modified, added |
| 29 // or removed. |
| 30 ObserverList<gfx::DisplayObserver> observer_list_; |
| 31 |
| 32 DISALLOW_COPY_AND_ASSIGN(DisplayChangeNotifier); |
| 33 }; |
| 34 |
| 35 #endif // UI_GFX_DISPLAY_CHANGE_NOTIFIER_H_ |
| 36 |
OLD | NEW |