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_CHROMEOS_NATIVE_DISPLAY_DELEGATE_DRI_H_ | 5 #ifndef UI_OZONE_PLATFORM_DRI_CHROMEOS_NATIVE_DISPLAY_DELEGATE_DRI_H_ |
6 #define UI_OZONE_PLATFORM_DRI_CHROMEOS_NATIVE_DISPLAY_DELEGATE_DRI_H_ | 6 #define UI_OZONE_PLATFORM_DRI_CHROMEOS_NATIVE_DISPLAY_DELEGATE_DRI_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.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/display/types/chromeos/native_display_delegate.h" | 11 #include "ui/display/types/chromeos/native_display_delegate.h" |
12 #include "ui/events/ozone/device/device_event_observer.h" | 12 #include "ui/events/ozone/device/device_event_observer.h" |
13 | 13 |
14 namespace ui { | 14 namespace ui { |
15 | 15 |
16 class DeviceManager; | 16 class DeviceManager; |
17 class DisplaySnapshotDri; | 17 class DisplaySnapshotDri; |
18 class DriConsoleBuffer; | 18 class DriConsoleBuffer; |
19 class DriWrapper; | 19 class DriWrapper; |
20 class ScreenManager; | 20 class ScreenManager; |
21 | 21 |
22 class NativeDisplayDelegateDri | 22 class NativeDisplayDelegateDri |
23 : public NativeDisplayDelegate, DeviceEventObserver { | 23 : public NativeDisplayDelegate, DeviceEventObserver { |
24 public: | 24 public: |
25 NativeDisplayDelegateDri(DriWrapper* dri, | 25 NativeDisplayDelegateDri(DriWrapper* dri, |
26 ScreenManager* screen_manager, | 26 ScreenManager* screen_manager, |
27 DeviceManager* device_manager); | 27 DeviceManager* device_manager); |
28 virtual ~NativeDisplayDelegateDri(); | 28 virtual ~NativeDisplayDelegateDri(); |
29 | 29 |
| 30 DisplaySnapshot* FindDisplaySnapshot(int64_t id); |
| 31 |
30 // NativeDisplayDelegate overrides: | 32 // NativeDisplayDelegate overrides: |
31 virtual void Initialize() OVERRIDE; | 33 virtual void Initialize() OVERRIDE; |
32 virtual void GrabServer() OVERRIDE; | 34 virtual void GrabServer() OVERRIDE; |
33 virtual void UngrabServer() OVERRIDE; | 35 virtual void UngrabServer() OVERRIDE; |
34 virtual void SyncWithServer() OVERRIDE; | 36 virtual void SyncWithServer() OVERRIDE; |
35 virtual void SetBackgroundColor(uint32_t color_argb) OVERRIDE; | 37 virtual void SetBackgroundColor(uint32_t color_argb) OVERRIDE; |
36 virtual void ForceDPMSOn() OVERRIDE; | 38 virtual void ForceDPMSOn() OVERRIDE; |
37 virtual std::vector<DisplaySnapshot*> GetDisplays() OVERRIDE; | 39 virtual std::vector<DisplaySnapshot*> GetDisplays() OVERRIDE; |
38 virtual void AddMode(const DisplaySnapshot& output, | 40 virtual void AddMode(const DisplaySnapshot& output, |
39 const DisplayMode* mode) OVERRIDE; | 41 const DisplayMode* mode) OVERRIDE; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 ScopedVector<const DisplayMode> cached_modes_; | 73 ScopedVector<const DisplayMode> cached_modes_; |
72 ScopedVector<DisplaySnapshotDri> cached_displays_; | 74 ScopedVector<DisplaySnapshotDri> cached_displays_; |
73 ObserverList<NativeDisplayObserver> observers_; | 75 ObserverList<NativeDisplayObserver> observers_; |
74 | 76 |
75 DISALLOW_COPY_AND_ASSIGN(NativeDisplayDelegateDri); | 77 DISALLOW_COPY_AND_ASSIGN(NativeDisplayDelegateDri); |
76 }; | 78 }; |
77 | 79 |
78 } // namespace ui | 80 } // namespace ui |
79 | 81 |
80 #endif // UI_OZONE_PLATFORM_DRI_CHROMEOS_NATIVE_DISPLAY_DELEGATE_DRI_H_ | 82 #endif // UI_OZONE_PLATFORM_DRI_CHROMEOS_NATIVE_DISPLAY_DELEGATE_DRI_H_ |
OLD | NEW |