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

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

Issue 323313003: Add flag in device enumeration request to control label clearing and don't clear for pepper. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 6 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 | « content/renderer/media/mock_media_stream_dispatcher.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 "content/renderer/pepper/pepper_media_device_manager.h" 5 #include "content/renderer/pepper/pepper_media_device_manager.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "content/renderer/media/media_stream_dispatcher.h" 8 #include "content/renderer/media/media_stream_dispatcher.h"
9 #include "content/renderer/render_view_impl.h" 9 #include "content/renderer/render_view_impl.h"
10 #include "ppapi/shared_impl/ppb_device_ref_shared.h" 10 #include "ppapi/shared_impl/ppb_device_ref_shared.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 const GURL& document_url, 47 const GURL& document_url,
48 const EnumerateDevicesCallback& callback) { 48 const EnumerateDevicesCallback& callback) {
49 enumerate_callbacks_[next_id_] = callback; 49 enumerate_callbacks_[next_id_] = callback;
50 int request_id = next_id_++; 50 int request_id = next_id_++;
51 51
52 #if defined(ENABLE_WEBRTC) 52 #if defined(ENABLE_WEBRTC)
53 GetRenderViewImpl()->media_stream_dispatcher()->EnumerateDevices( 53 GetRenderViewImpl()->media_stream_dispatcher()->EnumerateDevices(
54 request_id, 54 request_id,
55 AsWeakPtr(), 55 AsWeakPtr(),
56 PepperMediaDeviceManager::FromPepperDeviceType(type), 56 PepperMediaDeviceManager::FromPepperDeviceType(type),
57 document_url.GetOrigin()); 57 document_url.GetOrigin(),
58 false);
58 #else 59 #else
59 base::MessageLoop::current()->PostTask( 60 base::MessageLoop::current()->PostTask(
60 FROM_HERE, 61 FROM_HERE,
61 base::Bind(&PepperMediaDeviceManager::OnDevicesEnumerated, 62 base::Bind(&PepperMediaDeviceManager::OnDevicesEnumerated,
62 AsWeakPtr(), 63 AsWeakPtr(),
63 request_id, 64 request_id,
64 StreamDeviceInfoArray())); 65 StreamDeviceInfoArray()));
65 #endif 66 #endif
66 67
67 return request_id; 68 return request_id;
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 open_callbacks_.erase(iter); 234 open_callbacks_.erase(iter);
234 235
235 callback.Run(request_id, succeeded, label); 236 callback.Run(request_id, succeeded, label);
236 } 237 }
237 238
238 RenderViewImpl* PepperMediaDeviceManager::GetRenderViewImpl() { 239 RenderViewImpl* PepperMediaDeviceManager::GetRenderViewImpl() {
239 return static_cast<RenderViewImpl*>(render_view()); 240 return static_cast<RenderViewImpl*>(render_view());
240 } 241 }
241 242
242 } // namespace content 243 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/mock_media_stream_dispatcher.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698