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

Side by Side Diff: content/renderer/pepper/pepper_plugin_delegate_impl.cc

Issue 11411047: Introduce PPB_AudioInput_Dev v0.3 and refactor the device enumeration code: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years 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) 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 "content/renderer/pepper/pepper_plugin_delegate_impl.h" 5 #include "content/renderer/pepper/pepper_plugin_delegate_impl.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <cstddef> 8 #include <cstddef>
9 #include <map> 9 #include <map>
10 #include <queue> 10 #include <queue>
(...skipping 1520 matching lines...) Expand 10 before | Expand all | Expand 10 after
1531 FROM_HERE, 1531 FROM_HERE,
1532 base::Bind( 1532 base::Bind(
1533 &PepperDeviceEnumerationEventHandler::OnDevicesEnumerationFailed, 1533 &PepperDeviceEnumerationEventHandler::OnDevicesEnumerationFailed,
1534 device_enumeration_event_handler_->AsWeakPtr(), request_id)); 1534 device_enumeration_event_handler_->AsWeakPtr(), request_id));
1535 #endif 1535 #endif
1536 1536
1537 return request_id; 1537 return request_id;
1538 } 1538 }
1539 1539
1540 void PepperPluginDelegateImpl::StopEnumerateDevices(int request_id) { 1540 void PepperPluginDelegateImpl::StopEnumerateDevices(int request_id) {
1541 device_enumeration_event_handler_->UnregisterEnumerateDevicesCallback(
1542 request_id);
1543
1541 #if defined(ENABLE_WEBRTC) 1544 #if defined(ENABLE_WEBRTC)
1542 // Need to post task since this function might be called inside the callback 1545 // Need to post task since this function might be called inside the callback
1543 // of EnumerateDevices. 1546 // of EnumerateDevices.
1544 MessageLoop::current()->PostTask( 1547 MessageLoop::current()->PostTask(
1545 FROM_HERE, 1548 FROM_HERE,
1546 base::Bind( 1549 base::Bind(
1547 &MediaStreamDispatcher::StopEnumerateDevices, 1550 &MediaStreamDispatcher::StopEnumerateDevices,
1548 render_view_->media_stream_dispatcher()->AsWeakPtr(), 1551 render_view_->media_stream_dispatcher()->AsWeakPtr(),
1549 request_id, device_enumeration_event_handler_.get()->AsWeakPtr())); 1552 request_id, device_enumeration_event_handler_.get()->AsWeakPtr()));
1550 #endif 1553 #endif
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
1807 RenderWidgetFullscreenPepper* container = 1810 RenderWidgetFullscreenPepper* container =
1808 static_cast<RenderWidgetFullscreenPepper*>( 1811 static_cast<RenderWidgetFullscreenPepper*>(
1809 instance->fullscreen_container()); 1812 instance->fullscreen_container());
1810 return container->mouse_lock_dispatcher(); 1813 return container->mouse_lock_dispatcher();
1811 } else { 1814 } else {
1812 return render_view_->mouse_lock_dispatcher(); 1815 return render_view_->mouse_lock_dispatcher();
1813 } 1816 }
1814 } 1817 }
1815 1818
1816 } // namespace content 1819 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/pepper/pepper_device_enumeration_host_helper_unittest.cc ('k') | ppapi/api/dev/ppb_audio_input_dev.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698