OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "media/video/capture/video_capture_proxy.h" | 5 #include "media/video/capture/video_capture_proxy.h" |
6 | 6 |
7 #include "base/location.h" | 7 #include "base/location.h" |
8 #include "base/message_loop_proxy.h" | 8 #include "base/message_loop_proxy.h" |
9 | 9 |
10 namespace { | 10 namespace { |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 | 61 |
62 void VideoCaptureHandlerProxy::OnError(VideoCapture* capture, int error_code) { | 62 void VideoCaptureHandlerProxy::OnError(VideoCapture* capture, int error_code) { |
63 main_message_loop_->PostTask(FROM_HERE, NewRunnableMethod( | 63 main_message_loop_->PostTask(FROM_HERE, NewRunnableMethod( |
64 this, | 64 this, |
65 &VideoCaptureHandlerProxy::OnErrorOnMainThread, | 65 &VideoCaptureHandlerProxy::OnErrorOnMainThread, |
66 capture, | 66 capture, |
67 GetState(capture), | 67 GetState(capture), |
68 error_code)); | 68 error_code)); |
69 } | 69 } |
70 | 70 |
| 71 void VideoCaptureHandlerProxy::OnRemoved(VideoCapture* capture) { |
| 72 // TODO(vtl): add logic when this event handler is removed. |
| 73 } |
| 74 |
71 void VideoCaptureHandlerProxy::OnBufferReady( | 75 void VideoCaptureHandlerProxy::OnBufferReady( |
72 VideoCapture* capture, | 76 VideoCapture* capture, |
73 scoped_refptr<VideoCapture::VideoFrameBuffer> buffer) { | 77 scoped_refptr<VideoCapture::VideoFrameBuffer> buffer) { |
74 main_message_loop_->PostTask(FROM_HERE, NewRunnableMethod( | 78 main_message_loop_->PostTask(FROM_HERE, NewRunnableMethod( |
75 this, | 79 this, |
76 &VideoCaptureHandlerProxy::OnBufferReadyOnMainThread, | 80 &VideoCaptureHandlerProxy::OnBufferReadyOnMainThread, |
77 capture, | 81 capture, |
78 GetState(capture), | 82 GetState(capture), |
79 buffer)); | 83 buffer)); |
80 } | 84 } |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 | 133 |
130 void VideoCaptureHandlerProxy::OnDeviceInfoReceivedOnMainThread( | 134 void VideoCaptureHandlerProxy::OnDeviceInfoReceivedOnMainThread( |
131 VideoCapture* capture, | 135 VideoCapture* capture, |
132 const VideoCaptureState& state, | 136 const VideoCaptureState& state, |
133 const VideoCaptureParams& device_info) { | 137 const VideoCaptureParams& device_info) { |
134 state_ = state; | 138 state_ = state; |
135 proxied_->OnDeviceInfoReceived(capture, device_info); | 139 proxied_->OnDeviceInfoReceived(capture, device_info); |
136 } | 140 } |
137 | 141 |
138 } // namespace media | 142 } // namespace media |
OLD | NEW |