OLD | NEW |
(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_OZONE_PLATFORM_DRI_DISPLAY_MANAGER_H_ |
| 6 #define UI_OZONE_PLATFORM_DRI_DISPLAY_MANAGER_H_ |
| 7 |
| 8 #include <map> |
| 9 |
| 10 #include "base/macros.h" |
| 11 |
| 12 namespace ui { |
| 13 |
| 14 class DisplaySnapshot; |
| 15 |
| 16 class DisplayManager { |
| 17 public: |
| 18 DisplayManager(); |
| 19 ~DisplayManager(); |
| 20 |
| 21 void RegisterDisplay(DisplaySnapshot* display); |
| 22 void UnregisterDisplay(DisplaySnapshot* display); |
| 23 |
| 24 // Returns the display state for |display| or NULL if not found. |
| 25 DisplaySnapshot* GetDisplay(int64_t display); |
| 26 |
| 27 private: |
| 28 typedef std::map<int64_t, DisplaySnapshot*> DisplayMap; |
| 29 |
| 30 // Keeps a mapping between the display ID and a pointer to the display state. |
| 31 DisplayMap display_map_; |
| 32 |
| 33 DISALLOW_COPY_AND_ASSIGN(DisplayManager); |
| 34 }; |
| 35 |
| 36 } // namespace ui |
| 37 |
| 38 #endif // UI_OZONE_PLATFORM_DRI_DISPLAY_MANAGER_H_ |
OLD | NEW |