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

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

Issue 738613003: Enables speech APIs to input method extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/input_method/google_input_tools_manifest.json » ('j') | 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 "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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/input_method/google_input_tools_manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698