Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(353)

Side by Side Diff: media/video/capture/video_capture_proxy.cc

Issue 8037055: Add OnRemoved() in VideoCapture::EventHandler API (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: change needed for unit test Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « media/video/capture/video_capture_proxy.h ('k') | webkit/plugins/ppapi/ppb_video_capture_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698