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

Side by Side Diff: content/browser/renderer_host/media/shared_memory_buffer_tracker.h

Issue 2410383002: VideoCapture: more migration IPC-->mojo, part 6 (Closed)
Patch Set: Comment correction Created 4 years, 2 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 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 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_SHARED_MEMORY_BUFFER_TRACKER_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_SHARED_MEMORY_BUFFER_TRACKER_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_SHARED_MEMORY_BUFFER_TRACKER_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_SHARED_MEMORY_BUFFER_TRACKER_H_
7 7
8 #include "media/capture/video/video_capture_buffer_tracker.h" 8 #include "media/capture/video/video_capture_buffer_tracker.h"
9 9
10 namespace content { 10 namespace content {
11 11
12 // Tracker specifics for SharedMemory. 12 // Tracker specifics for SharedMemory.
13 class SharedMemoryBufferTracker final 13 class SharedMemoryBufferTracker final
14 : public media::VideoCaptureBufferTracker { 14 : public media::VideoCaptureBufferTracker {
15 public: 15 public:
16 SharedMemoryBufferTracker(); 16 SharedMemoryBufferTracker();
17 17
18 bool Init(const gfx::Size& dimensions, 18 bool Init(const gfx::Size& dimensions,
19 media::VideoPixelFormat format, 19 media::VideoPixelFormat format,
20 media::VideoPixelStorage storage_type, 20 media::VideoPixelStorage storage_type,
21 base::Lock* lock) override; 21 base::Lock* lock) override;
22 22
23 std::unique_ptr<media::VideoCaptureBufferHandle> GetBufferHandle() override; 23 std::unique_ptr<media::VideoCaptureBufferHandle> GetBufferHandle() override;
24 bool ShareToProcess(base::ProcessHandle process_handle, 24 mojo::ScopedSharedBufferHandle GetHandleForTransit() override;
25 base::SharedMemoryHandle* new_handle) override;
26 25
27 private: 26 private:
28 friend class SharedMemoryBufferHandle; 27 friend class SharedMemoryBufferHandle;
29 28
30 // The memory created to be shared with renderer processes. 29 // The memory created to be shared with renderer processes.
31 base::SharedMemory shared_memory_; 30 base::SharedMemory shared_memory_;
32 size_t mapped_size_; 31 size_t mapped_size_;
33 }; 32 };
34 33
35 } // namespace content 34 } // namespace content
36 35
37 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_SHARED_MEMORY_BUFFER_TRACKER_H_ 36 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_SHARED_MEMORY_BUFFER_TRACKER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698