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

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: 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
« no previous file with comments | « ui/gfx/BUILD.gn ('k') | ui/gfx/display_change_notifier.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/gfx_export.h"
12
13 namespace gfx {
14
15 class Display;
16 class DisplayObserver;
17
18 // DisplayChangeNotifier is a class implementing the handling of DisplayObserver
19 // notification for Screen.
20 class GFX_EXPORT DisplayChangeNotifier {
21 public:
22 DisplayChangeNotifier();
23 ~DisplayChangeNotifier();
24
25 void AddObserver(DisplayObserver* observer);
26
27 void RemoveObserver(DisplayObserver* observer);
28
29 void NotifyDisplaysChanged(const std::vector<Display>& old_displays,
30 const std::vector<Display>& new_displays);
31
32 private:
33 // The observers that need to be notified when a display is modified, added
34 // or removed.
35 ObserverList<DisplayObserver> observer_list_;
36
37 DISALLOW_COPY_AND_ASSIGN(DisplayChangeNotifier);
38 };
39
40 } // namespace gfx
41
42 #endif // UI_GFX_DISPLAY_CHANGE_NOTIFIER_H_
43
OLDNEW
« no previous file with comments | « ui/gfx/BUILD.gn ('k') | ui/gfx/display_change_notifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698