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

Side by Side Diff: content/public/browser/media_device_id.cc

Issue 2424163004: Factor out authorization from AudioRendererHost. (Closed)
Patch Set: Dale's comments. Created 4 years, 1 month 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "content/public/browser/media_device_id.h" 4 #include "content/public/browser/media_device_id.h"
5 5
6 #include "content/browser/browser_main_loop.h" 6 #include "content/browser/browser_main_loop.h"
7 #include "content/browser/renderer_host/media/media_stream_manager.h" 7 #include "content/browser/renderer_host/media/media_stream_manager.h"
8 8
9 namespace content { 9 namespace content {
10 10
(...skipping 18 matching lines...) Expand all
29 const std::string& source_id, 29 const std::string& source_id,
30 std::string* device_id) { 30 std::string* device_id) {
31 content::MediaStreamManager* manager = 31 content::MediaStreamManager* manager =
32 content::BrowserMainLoop::GetInstance()->media_stream_manager(); 32 content::BrowserMainLoop::GetInstance()->media_stream_manager();
33 33
34 return manager->TranslateSourceIdToDeviceId( 34 return manager->TranslateSourceIdToDeviceId(
35 content::MEDIA_DEVICE_VIDEO_CAPTURE, salt, security_origin, source_id, 35 content::MEDIA_DEVICE_VIDEO_CAPTURE, salt, security_origin, source_id,
36 device_id); 36 device_id);
37 } 37 }
38 38
39 bool IsValidDeviceId(const std::string& device_id) {
40 return MediaStreamManager::IsValidDeviceId(device_id);
o1ka 2016/11/03 10:07:22 Move the entire implementation?
Max Morin 2016/11/10 14:59:52 Done.
41 }
42
39 } // namespace content 43 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698