| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 | 97 |
| 98 private: | 98 private: |
| 99 friend class BrowserThread; | 99 friend class BrowserThread; |
| 100 friend class base::DeleteHelper<VideoCaptureHost>; | 100 friend class base::DeleteHelper<VideoCaptureHost>; |
| 101 friend class MockVideoCaptureHost; | 101 friend class MockVideoCaptureHost; |
| 102 friend class VideoCaptureHostTest; | 102 friend class VideoCaptureHostTest; |
| 103 | 103 |
| 104 virtual ~VideoCaptureHost(); | 104 virtual ~VideoCaptureHost(); |
| 105 | 105 |
| 106 // IPC message: Start capture on the VideoCaptureDevice referenced by | 106 // IPC message: Start capture on the VideoCaptureDevice referenced by |
| 107 // VideoCaptureParams::session_id. |device_id| is an id created by | 107 // |session_id|. |device_id| is an id created by VideoCaptureMessageFilter |
| 108 // VideoCaptureMessageFilter to identify a session | 108 // to identify a session between a VideoCaptureMessageFilter and a |
| 109 // between a VideoCaptureMessageFilter and a VideoCaptureHost. | 109 // VideoCaptureHost. |
| 110 void OnStartCapture(int device_id, | 110 void OnStartCapture(int device_id, |
| 111 media::VideoCaptureSessionId session_id, |
| 111 const media::VideoCaptureParams& params); | 112 const media::VideoCaptureParams& params); |
| 112 void OnControllerAdded( | 113 void OnControllerAdded( |
| 113 int device_id, const media::VideoCaptureParams& params, | 114 int device_id, |
| 114 const base::WeakPtr<VideoCaptureController>& controller); | 115 const base::WeakPtr<VideoCaptureController>& controller); |
| 115 void DoControllerAddedOnIOThread( | 116 void DoControllerAddedOnIOThread( |
| 116 int device_id, const media::VideoCaptureParams& params, | 117 int device_id, |
| 117 const base::WeakPtr<VideoCaptureController>& controller); | 118 const base::WeakPtr<VideoCaptureController>& controller); |
| 118 | 119 |
| 119 // IPC message: Stop capture on device referenced by |device_id|. | 120 // IPC message: Stop capture on device referenced by |device_id|. |
| 120 void OnStopCapture(int device_id); | 121 void OnStopCapture(int device_id); |
| 121 | 122 |
| 122 // IPC message: Pause capture on device referenced by |device_id|. | 123 // IPC message: Pause capture on device referenced by |device_id|. |
| 123 void OnPauseCapture(int device_id); | 124 void OnPauseCapture(int device_id); |
| 124 | 125 |
| 125 // IPC message: Receive an empty buffer from renderer. Send it to device | 126 // IPC message: Receive an empty buffer from renderer. Send it to device |
| 126 // referenced by |device_id|. | 127 // referenced by |device_id|. |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 // is connected. An entry in this map holds a null controller while it is in | 162 // is connected. An entry in this map holds a null controller while it is in |
| 162 // the process of starting. | 163 // the process of starting. |
| 163 EntryMap entries_; | 164 EntryMap entries_; |
| 164 | 165 |
| 165 DISALLOW_COPY_AND_ASSIGN(VideoCaptureHost); | 166 DISALLOW_COPY_AND_ASSIGN(VideoCaptureHost); |
| 166 }; | 167 }; |
| 167 | 168 |
| 168 } // namespace content | 169 } // namespace content |
| 169 | 170 |
| 170 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_HOST_H_ | 171 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_HOST_H_ |
| OLD | NEW |