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

Side by Side Diff: webkit/plugins/ppapi/ppb_video_capture_impl.cc

Issue 10834232: Revert 150491 - refactor EnumerateDevices to make it a persistent request. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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
« no previous file with comments | « webkit/plugins/ppapi/ppb_audio_input_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "webkit/plugins/ppapi/ppb_video_capture_impl.h" 5 #include "webkit/plugins/ppapi/ppb_video_capture_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 } 305 }
306 306
307 void PPB_VideoCapture_Impl::EnumerateDevicesCallbackFunc( 307 void PPB_VideoCapture_Impl::EnumerateDevicesCallbackFunc(
308 int request_id, 308 int request_id,
309 bool succeeded, 309 bool succeeded,
310 const DeviceRefDataVector& devices) { 310 const DeviceRefDataVector& devices) {
311 devices_data_.clear(); 311 devices_data_.clear();
312 if (succeeded) 312 if (succeeded)
313 devices_data_ = devices; 313 devices_data_ = devices;
314 314
315 PluginInstance* instance = ResourceHelper::GetPluginInstance(this);
316 if (instance)
317 instance->delegate()->StopEnumerateDevices(request_id);
318
319 OnEnumerateDevicesComplete(succeeded ? PP_OK : PP_ERROR_FAILED, devices); 315 OnEnumerateDevicesComplete(succeeded ? PP_OK : PP_ERROR_FAILED, devices);
320 } 316 }
321 317
322 PPB_VideoCapture_Impl::BufferInfo::BufferInfo() 318 PPB_VideoCapture_Impl::BufferInfo::BufferInfo()
323 : in_use(false), 319 : in_use(false),
324 data(NULL), 320 data(NULL),
325 buffer() { 321 buffer() {
326 } 322 }
327 323
328 PPB_VideoCapture_Impl::BufferInfo::~BufferInfo() { 324 PPB_VideoCapture_Impl::BufferInfo::~BufferInfo() {
329 } 325 }
330 326
331 } // namespace ppapi 327 } // namespace ppapi
332 } // namespace webkit 328 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/ppb_audio_input_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698