| OLD | NEW |
| 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_OZONE_PLATFORM_DRI_SCREEN_MANAGER_H_ | 5 #ifndef UI_OZONE_PLATFORM_DRI_SCREEN_MANAGER_H_ |
| 6 #define UI_OZONE_PLATFORM_DRI_SCREEN_MANAGER_H_ | 6 #define UI_OZONE_PLATFORM_DRI_SCREEN_MANAGER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
| 10 #include "base/observer_list.h" | 10 #include "base/observer_list.h" |
| 11 #include "ui/ozone/ozone_export.h" |
| 11 #include "ui/ozone/platform/dri/display_change_observer.h" | 12 #include "ui/ozone/platform/dri/display_change_observer.h" |
| 12 #include "ui/ozone/platform/dri/hardware_display_controller.h" | 13 #include "ui/ozone/platform/dri/hardware_display_controller.h" |
| 13 | 14 |
| 14 typedef struct _drmModeModeInfo drmModeModeInfo; | 15 typedef struct _drmModeModeInfo drmModeModeInfo; |
| 15 | 16 |
| 16 namespace gfx { | 17 namespace gfx { |
| 17 class Point; | 18 class Point; |
| 18 class Rect; | 19 class Rect; |
| 19 class Size; | 20 class Size; |
| 20 } // namespace gfx | 21 } // namespace gfx |
| 21 | 22 |
| 22 namespace ui { | 23 namespace ui { |
| 23 | 24 |
| 24 class DriWrapper; | 25 class DriWrapper; |
| 25 class ScanoutBufferGenerator; | 26 class ScanoutBufferGenerator; |
| 26 | 27 |
| 27 // Responsible for keeping track of active displays and configuring them. | 28 // Responsible for keeping track of active displays and configuring them. |
| 28 class ScreenManager { | 29 class OZONE_EXPORT ScreenManager { |
| 29 public: | 30 public: |
| 30 ScreenManager(DriWrapper* dri, ScanoutBufferGenerator* surface_generator); | 31 ScreenManager(DriWrapper* dri, ScanoutBufferGenerator* surface_generator); |
| 31 virtual ~ScreenManager(); | 32 virtual ~ScreenManager(); |
| 32 | 33 |
| 33 // Register a display controller. This must be called before trying to | 34 // Register a display controller. This must be called before trying to |
| 34 // configure it. | 35 // configure it. |
| 35 void AddDisplayController(DriWrapper* dri, uint32_t crtc, uint32_t connector); | 36 void AddDisplayController(DriWrapper* dri, uint32_t crtc, uint32_t connector); |
| 36 | 37 |
| 37 // Remove a display controller from the list of active controllers. The | 38 // Remove a display controller from the list of active controllers. The |
| 38 // controller is removed since it was disconnected. | 39 // controller is removed since it was disconnected. |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 HardwareDisplayControllers controllers_; | 94 HardwareDisplayControllers controllers_; |
| 94 | 95 |
| 95 ObserverList<DisplayChangeObserver> observers_; | 96 ObserverList<DisplayChangeObserver> observers_; |
| 96 | 97 |
| 97 DISALLOW_COPY_AND_ASSIGN(ScreenManager); | 98 DISALLOW_COPY_AND_ASSIGN(ScreenManager); |
| 98 }; | 99 }; |
| 99 | 100 |
| 100 } // namespace ui | 101 } // namespace ui |
| 101 | 102 |
| 102 #endif // UI_OZONE_PLATFORM_DRI_SCREEN_MANAGER_H_ | 103 #endif // UI_OZONE_PLATFORM_DRI_SCREEN_MANAGER_H_ |
| OLD | NEW |