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

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

Issue 1964153002: Move Screen, its impls, DisplayObserver and DisplayChangeNotifier to ui/display (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
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 UI_GFX_DISPLAY_CHANGE_NOTIFIER_H_ 5 #ifndef UI_DISPLAY_DISPLAY_CHANGE_NOTIFIER_H_
6 #define UI_GFX_DISPLAY_CHANGE_NOTIFIER_H_ 6 #define UI_DISPLAY_DISPLAY_CHANGE_NOTIFIER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/observer_list.h" 11 #include "base/observer_list.h"
12 #include "ui/gfx/gfx_export.h" 12 #include "ui/display/display_export.h"
13 13
14 namespace gfx { 14 namespace gfx {
15 class Display;
16 }
15 17
16 class Display; 18 namespace display {
19 using Display = gfx::Display;
17 class DisplayObserver; 20 class DisplayObserver;
18 21
19 // DisplayChangeNotifier is a class implementing the handling of DisplayObserver 22 // DisplayChangeNotifier is a class implementing the handling of DisplayObserver
20 // notification for Screen. 23 // notification for Screen.
21 class GFX_EXPORT DisplayChangeNotifier { 24 class DISPLAY_EXPORT DisplayChangeNotifier {
22 public: 25 public:
23 DisplayChangeNotifier(); 26 DisplayChangeNotifier();
24 ~DisplayChangeNotifier(); 27 ~DisplayChangeNotifier();
25 28
26 void AddObserver(DisplayObserver* observer); 29 void AddObserver(DisplayObserver* observer);
27 30
28 void RemoveObserver(DisplayObserver* observer); 31 void RemoveObserver(DisplayObserver* observer);
29 32
30 void NotifyDisplaysChanged(const std::vector<Display>& old_displays, 33 void NotifyDisplaysChanged(const std::vector<Display>& old_displays,
31 const std::vector<Display>& new_displays); 34 const std::vector<Display>& new_displays);
32 35
33 private: 36 private:
34 // The observers that need to be notified when a display is modified, added 37 // The observers that need to be notified when a display is modified, added
35 // or removed. 38 // or removed.
36 base::ObserverList<DisplayObserver> observer_list_; 39 base::ObserverList<DisplayObserver> observer_list_;
37 40
38 DISALLOW_COPY_AND_ASSIGN(DisplayChangeNotifier); 41 DISALLOW_COPY_AND_ASSIGN(DisplayChangeNotifier);
39 }; 42 };
40 43
41 } // namespace gfx 44 } // namespace display
42 45
43 #endif // UI_GFX_DISPLAY_CHANGE_NOTIFIER_H_ 46 #endif // UI_DISPLAY_DISPLAY_CHANGE_NOTIFIER_H_
44
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698