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

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

Issue 1965073002: Rename gfx::Display to display::Display (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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
« no previous file with comments | « ui/display/display.gyp ('k') | ui/display/display_finder.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_DISPLAY_DISPLAY_CHANGE_NOTIFIER_H_ 5 #ifndef UI_DISPLAY_DISPLAY_CHANGE_NOTIFIER_H_
6 #define UI_DISPLAY_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/display/display_export.h" 12 #include "ui/display/display_export.h"
13 13
14 namespace gfx { 14 namespace display {
15 class Display; 15 class Display;
16 }
17
18 namespace display {
19 using Display = gfx::Display;
20 class DisplayObserver; 16 class DisplayObserver;
21 17
22 // DisplayChangeNotifier is a class implementing the handling of DisplayObserver 18 // DisplayChangeNotifier is a class implementing the handling of DisplayObserver
23 // notification for Screen. 19 // notification for Screen.
24 class DISPLAY_EXPORT DisplayChangeNotifier { 20 class DISPLAY_EXPORT DisplayChangeNotifier {
25 public: 21 public:
26 DisplayChangeNotifier(); 22 DisplayChangeNotifier();
27 ~DisplayChangeNotifier(); 23 ~DisplayChangeNotifier();
28 24
29 void AddObserver(DisplayObserver* observer); 25 void AddObserver(DisplayObserver* observer);
30 26
31 void RemoveObserver(DisplayObserver* observer); 27 void RemoveObserver(DisplayObserver* observer);
32 28
33 void NotifyDisplaysChanged(const std::vector<Display>& old_displays, 29 void NotifyDisplaysChanged(const std::vector<Display>& old_displays,
34 const std::vector<Display>& new_displays); 30 const std::vector<Display>& new_displays);
35 31
36 private: 32 private:
37 // The observers that need to be notified when a display is modified, added 33 // The observers that need to be notified when a display is modified, added
38 // or removed. 34 // or removed.
39 base::ObserverList<DisplayObserver> observer_list_; 35 base::ObserverList<DisplayObserver> observer_list_;
40 36
41 DISALLOW_COPY_AND_ASSIGN(DisplayChangeNotifier); 37 DISALLOW_COPY_AND_ASSIGN(DisplayChangeNotifier);
42 }; 38 };
43 39
44 } // namespace display 40 } // namespace display
45 41
46 #endif // UI_DISPLAY_DISPLAY_CHANGE_NOTIFIER_H_ 42 #endif // UI_DISPLAY_DISPLAY_CHANGE_NOTIFIER_H_
OLDNEW
« no previous file with comments | « ui/display/display.gyp ('k') | ui/display/display_finder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698