| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 #include <map> | 54 #include <map> |
| 55 | 55 |
| 56 #include "base/macros.h" | 56 #include "base/macros.h" |
| 57 #include "base/memory/ref_counted.h" | 57 #include "base/memory/ref_counted.h" |
| 58 #include "base/memory/weak_ptr.h" | 58 #include "base/memory/weak_ptr.h" |
| 59 #include "base/sequenced_task_runner_helpers.h" | 59 #include "base/sequenced_task_runner_helpers.h" |
| 60 #include "content/browser/renderer_host/media/video_capture_controller.h" | 60 #include "content/browser/renderer_host/media/video_capture_controller.h" |
| 61 #include "content/browser/renderer_host/media/video_capture_controller_event_han
dler.h" | 61 #include "content/browser/renderer_host/media/video_capture_controller_event_han
dler.h" |
| 62 #include "content/common/content_export.h" | 62 #include "content/common/content_export.h" |
| 63 #include "content/public/browser/browser_message_filter.h" | 63 #include "content/public/browser/browser_message_filter.h" |
| 64 #include "content/public/common/media_stream_request.h" |
| 64 #include "ipc/ipc_message.h" | 65 #include "ipc/ipc_message.h" |
| 65 | 66 |
| 66 namespace content { | 67 namespace content { |
| 67 class MediaStreamManager; | 68 class MediaStreamManager; |
| 68 | 69 |
| 69 class CONTENT_EXPORT VideoCaptureHost | 70 class CONTENT_EXPORT VideoCaptureHost |
| 70 : public BrowserMessageFilter, | 71 : public BrowserMessageFilter, |
| 71 public VideoCaptureControllerEventHandler { | 72 public VideoCaptureControllerEventHandler { |
| 72 public: | 73 public: |
| 73 explicit VideoCaptureHost(MediaStreamManager* media_stream_manager); | 74 explicit VideoCaptureHost(MediaStreamManager* media_stream_manager); |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 void OnPauseCapture(int device_id); | 125 void OnPauseCapture(int device_id); |
| 125 | 126 |
| 126 void OnResumeCapture(int device_id, | 127 void OnResumeCapture(int device_id, |
| 127 media::VideoCaptureSessionId session_id, | 128 media::VideoCaptureSessionId session_id, |
| 128 const media::VideoCaptureParams& params); | 129 const media::VideoCaptureParams& params); |
| 129 | 130 |
| 130 // IPC message: Requests that the video capture send a frame "soon" (e.g., to | 131 // IPC message: Requests that the video capture send a frame "soon" (e.g., to |
| 131 // resolve picture loss or quality issues). | 132 // resolve picture loss or quality issues). |
| 132 void OnRequestRefreshFrame(int device_id); | 133 void OnRequestRefreshFrame(int device_id); |
| 133 | 134 |
| 135 // IPC message: Set if the video capturing is secure. |
| 136 void OnSetCapturingLinkSecured(content::MediaStreamType type, |
| 137 int session_id, |
| 138 bool is_secure); |
| 139 |
| 134 // IPC message: Called when a renderer is finished using a buffer. Notifies | 140 // IPC message: Called when a renderer is finished using a buffer. Notifies |
| 135 // the controller. | 141 // the controller. |
| 136 void OnRendererFinishedWithBuffer(int device_id, | 142 void OnRendererFinishedWithBuffer(int device_id, |
| 137 int buffer_id, | 143 int buffer_id, |
| 138 const gpu::SyncToken& sync_token, | 144 const gpu::SyncToken& sync_token, |
| 139 double consumer_resource_utilization); | 145 double consumer_resource_utilization); |
| 140 | 146 |
| 141 // IPC message: Get supported formats referenced by |capture_session_id|. | 147 // IPC message: Get supported formats referenced by |capture_session_id|. |
| 142 // |device_id| is needed for message back-routing purposes. | 148 // |device_id| is needed for message back-routing purposes. |
| 143 void OnGetDeviceSupportedFormats( | 149 void OnGetDeviceSupportedFormats( |
| (...skipping 20 matching lines...) Expand all Loading... |
| 164 // is connected. An entry in this map holds a null controller while it is in | 170 // is connected. An entry in this map holds a null controller while it is in |
| 165 // the process of starting. | 171 // the process of starting. |
| 166 EntryMap entries_; | 172 EntryMap entries_; |
| 167 | 173 |
| 168 DISALLOW_COPY_AND_ASSIGN(VideoCaptureHost); | 174 DISALLOW_COPY_AND_ASSIGN(VideoCaptureHost); |
| 169 }; | 175 }; |
| 170 | 176 |
| 171 } // namespace content | 177 } // namespace content |
| 172 | 178 |
| 173 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_HOST_H_ | 179 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_HOST_H_ |
| OLD | NEW |