Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1186)

Side by Side Diff: ui/gfx/display_change_notifier.h

Issue 341983008: Listen to Display reconfiguration and notify DisplayObservers on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mac_display
Patch Set: review comments Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698