OLD | NEW |
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 "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/metrics/field_trial.h" | 9 #include "base/metrics/field_trial.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 return &(*iter); | 87 return &(*iter); |
88 } | 88 } |
89 } | 89 } |
90 return NULL; | 90 return NULL; |
91 } | 91 } |
92 | 92 |
93 #if defined(ENABLE_EXTENSIONS) | 93 #if defined(ENABLE_EXTENSIONS) |
94 // This is a short-term solution to grant camera and/or microphone access to | 94 // This is a short-term solution to grant camera and/or microphone access to |
95 // extensions: | 95 // extensions: |
96 // 1. Virtual keyboard extension. | 96 // 1. Virtual keyboard extension. |
97 // 2. Google Voice Search Hotword extension. | 97 // 2. Flutter gesture recognition extension. |
98 // 3. Flutter gesture recognition extension. | 98 // 3. TODO(smus): Airbender experiment 1. |
99 // 4. TODO(smus): Airbender experiment 1. | 99 // 4. TODO(smus): Airbender experiment 2. |
100 // 5. TODO(smus): Airbender experiment 2. | 100 // 5. Hotwording component extension. |
101 // 6. Hotwording component extension. | 101 // 6. XKB input method component extension. |
102 // 7. XKB input method component extension. | 102 // 7. M17n/T13n/CJK input method component extension. |
103 // 8. M17n/T13n/CJK input method component extension. | |
104 // Once http://crbug.com/292856 is fixed, remove this whitelist. | 103 // Once http://crbug.com/292856 is fixed, remove this whitelist. |
105 bool IsMediaRequestWhitelistedForExtension( | 104 bool IsMediaRequestWhitelistedForExtension( |
106 const extensions::Extension* extension) { | 105 const extensions::Extension* extension) { |
107 return extension->id() == "mppnpdlheglhdfmldimlhpnegondlapf" || | 106 return extension->id() == "mppnpdlheglhdfmldimlhpnegondlapf" || |
108 extension->id() == "bepbmhgboaologfdajaanbcjmnhjmhfn" || | |
109 extension->id() == "jokbpnebhdcladagohdnfgjcpejggllo" || | 107 extension->id() == "jokbpnebhdcladagohdnfgjcpejggllo" || |
110 extension->id() == "clffjmdilanldobdnedchkdbofoimcgb" || | 108 extension->id() == "clffjmdilanldobdnedchkdbofoimcgb" || |
111 extension->id() == "nnckehldicaciogcbchegobnafnjkcne" || | 109 extension->id() == "nnckehldicaciogcbchegobnafnjkcne" || |
112 extension->id() == "nbpagnldghgfoolbancepceaanlmhfmd" || | 110 extension->id() == "nbpagnldghgfoolbancepceaanlmhfmd" || |
113 extension->id() == "jkghodnilhceideoidjikpgommlajknk" || | 111 extension->id() == "jkghodnilhceideoidjikpgommlajknk" || |
114 extension->id() == "gjaehgfemfahhmlgpdfknkhdnemmolop"; | 112 extension->id() == "gjaehgfemfahhmlgpdfknkhdnemmolop"; |
115 } | 113 } |
116 | 114 |
117 bool IsBuiltInExtension(const GURL& origin) { | 115 bool IsBuiltInExtension(const GURL& origin) { |
118 return | 116 return |
(...skipping 1017 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1136 | 1134 |
1137 void MediaCaptureDevicesDispatcher::SetTestAudioCaptureDevices( | 1135 void MediaCaptureDevicesDispatcher::SetTestAudioCaptureDevices( |
1138 const MediaStreamDevices& devices) { | 1136 const MediaStreamDevices& devices) { |
1139 test_audio_devices_ = devices; | 1137 test_audio_devices_ = devices; |
1140 } | 1138 } |
1141 | 1139 |
1142 void MediaCaptureDevicesDispatcher::SetTestVideoCaptureDevices( | 1140 void MediaCaptureDevicesDispatcher::SetTestVideoCaptureDevices( |
1143 const MediaStreamDevices& devices) { | 1141 const MediaStreamDevices& devices) { |
1144 test_video_devices_ = devices; | 1142 test_video_devices_ = devices; |
1145 } | 1143 } |
OLD | NEW |