| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // VideoCaptureHost serves video capture related messages from | 5 // VideoCaptureHost serves video capture related messages from |
| 6 // VideoCaptureMessageFilter which lives inside the render process. | 6 // VideoCaptureMessageFilter which lives inside the render process. |
| 7 // | 7 // |
| 8 // This class is owned by RenderProcessHostImpl, and instantiated on UI | 8 // This class is owned by RenderProcessHostImpl, and instantiated on UI |
| 9 // thread, but all other operations and method calls happen on IO thread. | 9 // thread, but all other operations and method calls happen on IO thread. |
| 10 // | 10 // |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 void OnChannelClosing() override; | 80 void OnChannelClosing() override; |
| 81 void OnDestruct() const override; | 81 void OnDestruct() const override; |
| 82 bool OnMessageReceived(const IPC::Message& message) override; | 82 bool OnMessageReceived(const IPC::Message& message) override; |
| 83 | 83 |
| 84 // VideoCaptureControllerEventHandler implementation. | 84 // VideoCaptureControllerEventHandler implementation. |
| 85 void OnError(VideoCaptureControllerID id) override; | 85 void OnError(VideoCaptureControllerID id) override; |
| 86 void OnBufferCreated(VideoCaptureControllerID id, | 86 void OnBufferCreated(VideoCaptureControllerID id, |
| 87 base::SharedMemoryHandle handle, | 87 base::SharedMemoryHandle handle, |
| 88 int length, | 88 int length, |
| 89 int buffer_id) override; | 89 int buffer_id) override; |
| 90 void OnBufferCreated2(VideoCaptureControllerID id, | |
| 91 const std::vector<gfx::GpuMemoryBufferHandle>& handles, | |
| 92 const gfx::Size& size, | |
| 93 int buffer_id) override; | |
| 94 void OnBufferDestroyed(VideoCaptureControllerID id, | 90 void OnBufferDestroyed(VideoCaptureControllerID id, |
| 95 int buffer_id) override; | 91 int buffer_id) override; |
| 96 void OnBufferReady(VideoCaptureControllerID id, | 92 void OnBufferReady(VideoCaptureControllerID id, |
| 97 int buffer_id, | 93 int buffer_id, |
| 98 const scoped_refptr<media::VideoFrame>& frame) override; | 94 const scoped_refptr<media::VideoFrame>& frame) override; |
| 99 void OnEnded(VideoCaptureControllerID id) override; | 95 void OnEnded(VideoCaptureControllerID id) override; |
| 100 | 96 |
| 101 private: | 97 private: |
| 102 friend class BrowserThread; | 98 friend class BrowserThread; |
| 103 friend class base::DeleteHelper<VideoCaptureHost>; | 99 friend class base::DeleteHelper<VideoCaptureHost>; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 // the process of starting. | 146 // the process of starting. |
| 151 std::map<VideoCaptureControllerID, base::WeakPtr<VideoCaptureController>> | 147 std::map<VideoCaptureControllerID, base::WeakPtr<VideoCaptureController>> |
| 152 controllers_; | 148 controllers_; |
| 153 | 149 |
| 154 DISALLOW_COPY_AND_ASSIGN(VideoCaptureHost); | 150 DISALLOW_COPY_AND_ASSIGN(VideoCaptureHost); |
| 155 }; | 151 }; |
| 156 | 152 |
| 157 } // namespace content | 153 } // namespace content |
| 158 | 154 |
| 159 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_HOST_H_ | 155 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_HOST_H_ |
| OLD | NEW |