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

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

Issue 2314203002: Move DisplayList to display; add ScreenBase. (Closed)
Patch Set: Update unit test namespace. Created 4 years, 3 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/BUILD.gn ('k') | ui/display/display_list.cc » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_VIEWS_MUS_DISPLAY_LIST_H_ 5 #ifndef UI_DISPLAY_DISPLAY_LIST_H_
6 #define UI_VIEWS_MUS_DISPLAY_LIST_H_ 6 #define UI_DISPLAY_DISPLAY_LIST_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/observer_list.h" 12 #include "base/observer_list.h"
13 #include "mojo/public/cpp/bindings/binding.h"
14 #include "ui/display/display.h" 13 #include "ui/display/display.h"
15 #include "ui/views/mus/mus_export.h" 14 #include "ui/display/display_export.h"
16 15
17 namespace display { 16 namespace display {
17
18 class Display; 18 class Display;
19 class DisplayObserver; 19 class DisplayObserver;
20 }
21
22 namespace views {
23 20
24 // Maintains an ordered list of display::Displays as well as operations to add, 21 // Maintains an ordered list of display::Displays as well as operations to add,
25 // remove and update said list. Additionally maintains display::DisplayObservers 22 // remove and update said list. Additionally maintains display::DisplayObservers
26 // and updates them as appropriate. 23 // and updates them as appropriate.
27 class VIEWS_MUS_EXPORT DisplayList { 24 class DISPLAY_EXPORT DisplayList {
28 public: 25 public:
29 using Displays = std::vector<display::Display>; 26 using Displays = std::vector<display::Display>;
30 27
31 enum class Type { 28 enum class Type {
32 PRIMARY, 29 PRIMARY,
33 NOT_PRIMARY, 30 NOT_PRIMARY,
34 }; 31 };
35 32
36 DisplayList(); 33 DisplayList();
37 ~DisplayList(); 34 ~DisplayList();
(...skipping 19 matching lines...) Expand all
57 void RemoveDisplay(int64_t id); 54 void RemoveDisplay(int64_t id);
58 55
59 private: 56 private:
60 std::vector<display::Display> displays_; 57 std::vector<display::Display> displays_;
61 int primary_display_index_ = -1; 58 int primary_display_index_ = -1;
62 base::ObserverList<display::DisplayObserver> observers_; 59 base::ObserverList<display::DisplayObserver> observers_;
63 60
64 DISALLOW_COPY_AND_ASSIGN(DisplayList); 61 DISALLOW_COPY_AND_ASSIGN(DisplayList);
65 }; 62 };
66 63
67 } // namespace views 64 } // namespace display
68 65
69 #endif // UI_VIEWS_MUS_DISPLAY_LIST_H_ 66 #endif // UI_DISPLAY_DISPLAY_LIST_H_
OLDNEW
« no previous file with comments | « ui/display/BUILD.gn ('k') | ui/display/display_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698