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

Side by Side Diff: chrome/browser/media/media_capture_devices_dispatcher.cc

Issue 488353004: Whitelist the new hotwording component extension for media capture. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add to JSON. Created 6 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
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 "chrome/browser/media/media_capture_devices_dispatcher.h" 5 #include "chrome/browser/media/media_capture_devices_dispatcher.h"
6 6
7 #include "apps/app_window.h" 7 #include "apps/app_window.h"
8 #include "apps/app_window_registry.h" 8 #include "apps/app_window_registry.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 return NULL; 93 return NULL;
94 } 94 }
95 95
96 // This is a short-term solution to grant camera and/or microphone access to 96 // This is a short-term solution to grant camera and/or microphone access to
97 // extensions: 97 // extensions:
98 // 1. Virtual keyboard extension. 98 // 1. Virtual keyboard extension.
99 // 2. Google Voice Search Hotword extension. 99 // 2. Google Voice Search Hotword extension.
100 // 3. Flutter gesture recognition extension. 100 // 3. Flutter gesture recognition extension.
101 // 4. TODO(smus): Airbender experiment 1. 101 // 4. TODO(smus): Airbender experiment 1.
102 // 5. TODO(smus): Airbender experiment 2. 102 // 5. TODO(smus): Airbender experiment 2.
103 // 6. Hotwording component extension.
103 // Once http://crbug.com/292856 is fixed, remove this whitelist. 104 // Once http://crbug.com/292856 is fixed, remove this whitelist.
104 bool IsMediaRequestWhitelistedForExtension( 105 bool IsMediaRequestWhitelistedForExtension(
105 const extensions::Extension* extension) { 106 const extensions::Extension* extension) {
106 return extension->id() == "mppnpdlheglhdfmldimlhpnegondlapf" || 107 return extension->id() == "mppnpdlheglhdfmldimlhpnegondlapf" ||
107 extension->id() == "bepbmhgboaologfdajaanbcjmnhjmhfn" || 108 extension->id() == "bepbmhgboaologfdajaanbcjmnhjmhfn" ||
108 extension->id() == "jokbpnebhdcladagohdnfgjcpejggllo" || 109 extension->id() == "jokbpnebhdcladagohdnfgjcpejggllo" ||
109 extension->id() == "clffjmdilanldobdnedchkdbofoimcgb" || 110 extension->id() == "clffjmdilanldobdnedchkdbofoimcgb" ||
110 extension->id() == "nnckehldicaciogcbchegobnafnjkcne"; 111 extension->id() == "nnckehldicaciogcbchegobnafnjkcne" ||
112 extension->id() == "nbpagnldghgfoolbancepceaanlmhfmd";
111 } 113 }
112 114
113 bool IsBuiltInExtension(const GURL& origin) { 115 bool IsBuiltInExtension(const GURL& origin) {
114 return 116 return
115 // Feedback Extension. 117 // Feedback Extension.
116 origin.spec() == "chrome-extension://gfdkimpbcpahaombhbimeihdjnejgicl/"; 118 origin.spec() == "chrome-extension://gfdkimpbcpahaombhbimeihdjnejgicl/";
117 } 119 }
118 120
119 // Returns true of the security origin is associated with casting. 121 // Returns true of the security origin is associated with casting.
120 bool IsOriginForCasting(const GURL& origin) { 122 bool IsOriginForCasting(const GURL& origin) {
(...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after
1000 1002
1001 void MediaCaptureDevicesDispatcher::SetTestAudioCaptureDevices( 1003 void MediaCaptureDevicesDispatcher::SetTestAudioCaptureDevices(
1002 const MediaStreamDevices& devices) { 1004 const MediaStreamDevices& devices) {
1003 test_audio_devices_ = devices; 1005 test_audio_devices_ = devices;
1004 } 1006 }
1005 1007
1006 void MediaCaptureDevicesDispatcher::SetTestVideoCaptureDevices( 1008 void MediaCaptureDevicesDispatcher::SetTestVideoCaptureDevices(
1007 const MediaStreamDevices& devices) { 1009 const MediaStreamDevices& devices) {
1008 test_video_devices_ = devices; 1010 test_video_devices_ = devices;
1009 } 1011 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698