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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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. Google Voice Search Hotword extension. |
98 // 3. Flutter gesture recognition extension. | 98 // 3. Flutter gesture recognition extension. |
99 // 4. TODO(smus): Airbender experiment 1. | 99 // 4. TODO(smus): Airbender experiment 1. |
100 // 5. TODO(smus): Airbender experiment 2. | 100 // 5. TODO(smus): Airbender experiment 2. |
101 // 6. Hotwording component extension. | 101 // 6. Hotwording component extension. |
| 102 // 7. XKB input method component extension. |
| 103 // 8. M17n/T13n/CJK input method component extension. |
102 // Once http://crbug.com/292856 is fixed, remove this whitelist. | 104 // Once http://crbug.com/292856 is fixed, remove this whitelist. |
103 bool IsMediaRequestWhitelistedForExtension( | 105 bool IsMediaRequestWhitelistedForExtension( |
104 const extensions::Extension* extension) { | 106 const extensions::Extension* extension) { |
105 return extension->id() == "mppnpdlheglhdfmldimlhpnegondlapf" || | 107 return extension->id() == "mppnpdlheglhdfmldimlhpnegondlapf" || |
106 extension->id() == "bepbmhgboaologfdajaanbcjmnhjmhfn" || | 108 extension->id() == "bepbmhgboaologfdajaanbcjmnhjmhfn" || |
107 extension->id() == "jokbpnebhdcladagohdnfgjcpejggllo" || | 109 extension->id() == "jokbpnebhdcladagohdnfgjcpejggllo" || |
108 extension->id() == "clffjmdilanldobdnedchkdbofoimcgb" || | 110 extension->id() == "clffjmdilanldobdnedchkdbofoimcgb" || |
109 extension->id() == "nnckehldicaciogcbchegobnafnjkcne" || | 111 extension->id() == "nnckehldicaciogcbchegobnafnjkcne" || |
110 extension->id() == "nbpagnldghgfoolbancepceaanlmhfmd"; | 112 extension->id() == "nbpagnldghgfoolbancepceaanlmhfmd" || |
| 113 extension->id() == "jkghodnilhceideoidjikpgommlajknk" || |
| 114 extension->id() == "gjaehgfemfahhmlgpdfknkhdnemmolop"; |
111 } | 115 } |
112 | 116 |
113 bool IsBuiltInExtension(const GURL& origin) { | 117 bool IsBuiltInExtension(const GURL& origin) { |
114 return | 118 return |
115 // Feedback Extension. | 119 // Feedback Extension. |
116 origin.spec() == "chrome-extension://gfdkimpbcpahaombhbimeihdjnejgicl/"; | 120 origin.spec() == "chrome-extension://gfdkimpbcpahaombhbimeihdjnejgicl/"; |
117 } | 121 } |
118 | 122 |
119 // Returns true of the security origin is associated with casting. | 123 // Returns true of the security origin is associated with casting. |
120 bool IsOriginForCasting(const GURL& origin) { | 124 bool IsOriginForCasting(const GURL& origin) { |
(...skipping 984 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1105 | 1109 |
1106 void MediaCaptureDevicesDispatcher::SetTestAudioCaptureDevices( | 1110 void MediaCaptureDevicesDispatcher::SetTestAudioCaptureDevices( |
1107 const MediaStreamDevices& devices) { | 1111 const MediaStreamDevices& devices) { |
1108 test_audio_devices_ = devices; | 1112 test_audio_devices_ = devices; |
1109 } | 1113 } |
1110 | 1114 |
1111 void MediaCaptureDevicesDispatcher::SetTestVideoCaptureDevices( | 1115 void MediaCaptureDevicesDispatcher::SetTestVideoCaptureDevices( |
1112 const MediaStreamDevices& devices) { | 1116 const MediaStreamDevices& devices) { |
1113 test_video_devices_ = devices; | 1117 test_video_devices_ = devices; |
1114 } | 1118 } |
OLD | NEW |