Chromium Code Reviews| 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_SCREEN_DISPLAY_OBSERVER_DELEGATE_H_ | |
| 6 #define UI_GFX_SCREEN_DISPLAY_OBSERVER_DELEGATE_H_ | |
| 7 | |
| 8 #include <vector> | |
| 9 | |
| 10 #include "base/observer_list.h" | |
| 11 #include "ui/gfx/display_observer.h" | |
| 12 | |
| 13 // ScreenDisplayObserverDelegate is a delegate for gfx::Screen. It helps | |
| 14 // handling DisplayObserver's notification. | |
| 15 class ScreenDisplayObserverDelegate { | |
|
oshima
2014/07/09 17:12:51
DisplayChangeNotifier would be better name. The na
mlamouri (slow - plz ping)
2014/07/10 12:54:34
Done.
| |
| 16 public: | |
| 17 ScreenDisplayObserverDelegate(); | |
| 18 ~ScreenDisplayObserverDelegate(); | |
| 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 }; | |
|
oshima
2014/07/09 17:12:51
DISALLOW_COPY_AND_ASSIGN
mlamouri (slow - plz ping)
2014/07/10 12:54:34
Done.
| |
| 32 | |
| 33 #endif // UI_GFX_SCREEN_DISPLAY_OBSERVER_DELEGATE_H_ | |
| OLD | NEW |