OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #include "ui/ozone/platform/drm/gpu/drm_device_manager.h" | 5 #include "ui/ozone/platform/drm/gpu/drm_device_manager.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/file_descriptor_posix.h" | 9 #include "base/file_descriptor_posix.h" |
10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 return device->device_path() == path_; | 23 return device->device_path() == path_; |
24 } | 24 } |
25 | 25 |
26 private: | 26 private: |
27 base::FilePath path_; | 27 base::FilePath path_; |
28 }; | 28 }; |
29 | 29 |
30 } // namespace | 30 } // namespace |
31 | 31 |
32 DrmDeviceManager::DrmDeviceManager( | 32 DrmDeviceManager::DrmDeviceManager( |
33 scoped_ptr<DrmDeviceGenerator> drm_device_generator) | 33 std::unique_ptr<DrmDeviceGenerator> drm_device_generator) |
34 : drm_device_generator_(std::move(drm_device_generator)) {} | 34 : drm_device_generator_(std::move(drm_device_generator)) {} |
35 | 35 |
36 DrmDeviceManager::~DrmDeviceManager() { | 36 DrmDeviceManager::~DrmDeviceManager() { |
37 DCHECK(drm_device_map_.empty()); | 37 DCHECK(drm_device_map_.empty()); |
38 } | 38 } |
39 | 39 |
40 bool DrmDeviceManager::AddDrmDevice(const base::FilePath& path, | 40 bool DrmDeviceManager::AddDrmDevice(const base::FilePath& path, |
41 const base::FileDescriptor& fd) { | 41 const base::FileDescriptor& fd) { |
42 base::File file(fd.fd); | 42 base::File file(fd.fd); |
43 auto it = | 43 auto it = |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 | 103 |
104 scoped_refptr<DrmDevice> DrmDeviceManager::GetPrimaryDrmDevice() { | 104 scoped_refptr<DrmDevice> DrmDeviceManager::GetPrimaryDrmDevice() { |
105 return primary_device_; | 105 return primary_device_; |
106 } | 106 } |
107 | 107 |
108 const DrmDeviceVector& DrmDeviceManager::GetDrmDevices() const { | 108 const DrmDeviceVector& DrmDeviceManager::GetDrmDevices() const { |
109 return devices_; | 109 return devices_; |
110 } | 110 } |
111 | 111 |
112 } // namespace ui | 112 } // namespace ui |
OLD | NEW |