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

Side by Side Diff: ui/ozone/platform/drm/host/drm_display_host_manager.h

Issue 1125283012: [Ozone-Drm] Revert of holding on to the DRM FDs in the browser process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
OLDNEW
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_DRM_HOST_DRM_DISPLAY_HOST_MANAGER_H_ 5 #ifndef UI_OZONE_PLATFORM_DRM_HOST_DRM_DISPLAY_HOST_MANAGER_H_
6 #define UI_OZONE_PLATFORM_DRM_HOST_DRM_DISPLAY_HOST_MANAGER_H_ 6 #define UI_OZONE_PLATFORM_DRM_HOST_DRM_DISPLAY_HOST_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <queue> 9 #include <queue>
10 #include <set>
10 11
11 #include "base/containers/scoped_ptr_hash_map.h"
12 #include "base/files/file.h" 12 #include "base/files/file.h"
13 #include "base/files/file_path.h" 13 #include "base/files/file_path.h"
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "base/memory/scoped_vector.h" 15 #include "base/memory/scoped_vector.h"
16 #include "base/memory/weak_ptr.h" 16 #include "base/memory/weak_ptr.h"
17 #include "ui/display/types/native_display_delegate.h" 17 #include "ui/display/types/native_display_delegate.h"
18 #include "ui/events/ozone/device/device_event.h" 18 #include "ui/events/ozone/device/device_event.h"
19 #include "ui/events/ozone/device/device_event_observer.h" 19 #include "ui/events/ozone/device/device_event_observer.h"
20 #include "ui/ozone/public/gpu_platform_support_host.h" 20 #include "ui/ozone/public/gpu_platform_support_host.h"
21 21
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 // Used to serialize display event processing. This is done since 125 // Used to serialize display event processing. This is done since
126 // opening/closing DRM devices cannot be done on the UI thread and are handled 126 // opening/closing DRM devices cannot be done on the UI thread and are handled
127 // on a worker thread. Thus, we need to queue events in order to process them 127 // on a worker thread. Thus, we need to queue events in order to process them
128 // in the correct order. 128 // in the correct order.
129 std::queue<DisplayEvent> event_queue_; 129 std::queue<DisplayEvent> event_queue_;
130 130
131 // True if a display event is currently being processed on a worker thread. 131 // True if a display event is currently being processed on a worker thread.
132 bool task_pending_; 132 bool task_pending_;
133 133
134 // Keeps track of all the active DRM devices. 134 // Keeps track of all the active DRM devices.
135 base::ScopedPtrHashMap<base::FilePath, scoped_ptr<DrmDeviceHandle>> 135 std::set<base::FilePath> drm_devices_;
136 drm_devices_; 136
137 // This is used to cache the primary DRM device until the channel is
138 // established.
139 scoped_ptr<DrmDeviceHandle> primary_drm_device_handle_;
137 140
138 base::WeakPtrFactory<DrmDisplayHostManager> weak_ptr_factory_; 141 base::WeakPtrFactory<DrmDisplayHostManager> weak_ptr_factory_;
139 142
140 DISALLOW_COPY_AND_ASSIGN(DrmDisplayHostManager); 143 DISALLOW_COPY_AND_ASSIGN(DrmDisplayHostManager);
141 }; 144 };
142 145
143 } // namespace ui 146 } // namespace ui
144 147
145 #endif // UI_OZONE_PLATFORM_DRM_HOST_DRM_DISPLAY_HOST_MANAGER_H_ 148 #endif // UI_OZONE_PLATFORM_DRM_HOST_DRM_DISPLAY_HOST_MANAGER_H_
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/host/drm_device_handle.cc ('k') | ui/ozone/platform/drm/host/drm_display_host_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698