OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "content/browser/renderer_host/media/shared_memory_buffer_tracker.h" | 5 #include "content/browser/renderer_host/media/shared_memory_buffer_tracker.h" |
6 | 6 |
7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
8 #include "content/browser/renderer_host/media/shared_memory_buffer_handle.h" | 8 #include "content/browser/renderer_host/media/shared_memory_buffer_handle.h" |
9 | 9 |
10 namespace content { | 10 namespace content { |
(...skipping 20 matching lines...) Expand all Loading... | |
31 } | 31 } |
32 | 32 |
33 std::unique_ptr<media::VideoCaptureBufferHandle> | 33 std::unique_ptr<media::VideoCaptureBufferHandle> |
34 SharedMemoryBufferTracker::GetBufferHandle() { | 34 SharedMemoryBufferTracker::GetBufferHandle() { |
35 return base::MakeUnique<SharedMemoryBufferHandle>(this); | 35 return base::MakeUnique<SharedMemoryBufferHandle>(this); |
36 } | 36 } |
37 | 37 |
38 bool SharedMemoryBufferTracker::ShareToProcess( | 38 bool SharedMemoryBufferTracker::ShareToProcess( |
39 base::ProcessHandle process_handle, | 39 base::ProcessHandle process_handle, |
40 base::SharedMemoryHandle* new_handle) { | 40 base::SharedMemoryHandle* new_handle) { |
41 return shared_memory_.ShareToProcess(process_handle, new_handle); | 41 *new_handle = base::SharedMemory::DuplicateHandle(shared_memory_.handle()); |
Ken Rockot(use gerrit already)
2016/10/19 05:24:18
So it looks like ShareToProcess is ultimately only
mcasas
2016/10/19 17:53:29
All right! I was a bit shy to dig deeper in this C
| |
42 return true; | |
42 } | 43 } |
43 | 44 |
44 } // namespace content | 45 } // namespace content |
OLD | NEW |