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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 | 66 |
67 class CONTENT_EXPORT VideoCaptureHost | 67 class CONTENT_EXPORT VideoCaptureHost |
68 : public BrowserMessageFilter, | 68 : public BrowserMessageFilter, |
69 public VideoCaptureControllerEventHandler { | 69 public VideoCaptureControllerEventHandler { |
70 public: | 70 public: |
71 explicit VideoCaptureHost(MediaStreamManager* media_stream_manager); | 71 explicit VideoCaptureHost(MediaStreamManager* media_stream_manager); |
72 | 72 |
73 // BrowserMessageFilter implementation. | 73 // BrowserMessageFilter implementation. |
74 virtual void OnChannelClosing() OVERRIDE; | 74 virtual void OnChannelClosing() OVERRIDE; |
75 virtual void OnDestruct() const OVERRIDE; | 75 virtual void OnDestruct() const OVERRIDE; |
76 virtual bool OnMessageReceived(const IPC::Message& message, | 76 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
77 bool* message_was_ok) OVERRIDE; | |
78 | 77 |
79 // VideoCaptureControllerEventHandler implementation. | 78 // VideoCaptureControllerEventHandler implementation. |
80 virtual void OnError(const VideoCaptureControllerID& id) OVERRIDE; | 79 virtual void OnError(const VideoCaptureControllerID& id) OVERRIDE; |
81 virtual void OnBufferCreated(const VideoCaptureControllerID& id, | 80 virtual void OnBufferCreated(const VideoCaptureControllerID& id, |
82 base::SharedMemoryHandle handle, | 81 base::SharedMemoryHandle handle, |
83 int length, | 82 int length, |
84 int buffer_id) OVERRIDE; | 83 int buffer_id) OVERRIDE; |
85 virtual void OnBufferDestroyed(const VideoCaptureControllerID& id, | 84 virtual void OnBufferDestroyed(const VideoCaptureControllerID& id, |
86 int buffer_id) OVERRIDE; | 85 int buffer_id) OVERRIDE; |
87 virtual void OnBufferReady(const VideoCaptureControllerID& id, | 86 virtual void OnBufferReady(const VideoCaptureControllerID& id, |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 // is connected. An entry in this map holds a null controller while it is in | 186 // is connected. An entry in this map holds a null controller while it is in |
188 // the process of starting. | 187 // the process of starting. |
189 EntryMap entries_; | 188 EntryMap entries_; |
190 | 189 |
191 DISALLOW_COPY_AND_ASSIGN(VideoCaptureHost); | 190 DISALLOW_COPY_AND_ASSIGN(VideoCaptureHost); |
192 }; | 191 }; |
193 | 192 |
194 } // namespace content | 193 } // namespace content |
195 | 194 |
196 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_HOST_H_ | 195 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_HOST_H_ |
OLD | NEW |