OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 ASH_DISPLAY_DISPLAY_CONTROLLER_H_ | 5 #ifndef ASH_DISPLAY_DISPLAY_CONTROLLER_H_ |
6 #define ASH_DISPLAY_DISPLAY_CONTROLLER_H_ | 6 #define ASH_DISPLAY_DISPLAY_CONTROLLER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 | 78 |
79 protected: | 79 protected: |
80 virtual ~Observer() {} | 80 virtual ~Observer() {} |
81 }; | 81 }; |
82 | 82 |
83 DisplayController(); | 83 DisplayController(); |
84 virtual ~DisplayController(); | 84 virtual ~DisplayController(); |
85 | 85 |
86 // Gets primary display. This information is stored in global | 86 // Gets primary display. This information is stored in global |
87 // object as this can be accessed after Shell is closed. | 87 // object as this can be accessed after Shell is closed. |
88 static gfx::Display GetPrimaryDisplay(); | 88 static const gfx::Display& GetPrimaryDisplay(); |
89 | 89 |
90 // Initializes primary display. | 90 // Initializes primary display. |
91 void InitPrimaryDisplay(); | 91 void InitPrimaryDisplay(); |
92 | 92 |
93 // Initialize secondary displays. | 93 // Initialize secondary displays. |
94 void InitSecondaryDisplays(); | 94 void InitSecondaryDisplays(); |
95 | 95 |
96 // Add/Remove observers. | 96 // Add/Remove observers. |
97 void AddObserver(Observer* observer); | 97 void AddObserver(Observer* observer); |
98 void RemoveObserver(Observer* observer); | 98 void RemoveObserver(Observer* observer); |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 std::map<std::string, DisplayLayout> secondary_layouts_; | 161 std::map<std::string, DisplayLayout> secondary_layouts_; |
162 | 162 |
163 ObserverList<Observer> observers_; | 163 ObserverList<Observer> observers_; |
164 | 164 |
165 DISALLOW_COPY_AND_ASSIGN(DisplayController); | 165 DISALLOW_COPY_AND_ASSIGN(DisplayController); |
166 }; | 166 }; |
167 | 167 |
168 } // namespace ash | 168 } // namespace ash |
169 | 169 |
170 #endif // ASH_DISPLAY_DISPLAY_CONTROLLER_H_ | 170 #endif // ASH_DISPLAY_DISPLAY_CONTROLLER_H_ |
OLD | NEW |