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

Unified Diff: chrome/browser/resources/settings/site_settings/site_settings_prefs_browser_proxy.js

Issue 2039833004: Site Settings Desktop: Implement media picker for camera/mic categories. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address feedback Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/settings/site_settings/site_settings_prefs_browser_proxy.js
diff --git a/chrome/browser/resources/settings/site_settings/site_settings_prefs_browser_proxy.js b/chrome/browser/resources/settings/site_settings/site_settings_prefs_browser_proxy.js
index e70d087a3a670e2979d3c085a709350e0349762b..322c9c0fc6ad6bbe71e75d5a4b2a20b63b97de87 100644
--- a/chrome/browser/resources/settings/site_settings/site_settings_prefs_browser_proxy.js
+++ b/chrome/browser/resources/settings/site_settings/site_settings_prefs_browser_proxy.js
@@ -34,6 +34,12 @@ var ExceptionListPref;
*/
var SiteSettingsPref;
+/**
+ * @typedef {{name: string,
+ * id: string}}
+ */
+var MediaPickerEntry;
+
cr.define('settings', function() {
/** @interface */
function SiteSettingsPrefsBrowserProxy() {}
@@ -89,6 +95,20 @@ cr.define('settings', function() {
* @return {!Promise<boolean>} True if the pattern is valid.
*/
isPatternValid: function(pattern) {},
+
+ /**
+ * Gets the list of default capture devices for a given type of media. List
+ * is returned through a JS call to updateDevicesMenu.
+ * @param {string} type The type to look up.
+ */
+ getDefaultCaptureDevices: function(type) {},
+
+ /**
+ * Sets a default devices for a given type of media.
+ * @param {string} type The type of media to configure.
+ * @param {string} defaultValue The id of the media device to set.
+ */
+ setDefaultCaptureDevice: function(type, defaultValue) {},
};
/**
@@ -136,6 +156,15 @@ cr.define('settings', function() {
return cr.sendWithPromise('isPatternValid', pattern);
},
+ /** @override */
+ getDefaultCaptureDevices: function(type) {
+ chrome.send('getDefaultCaptureDevices', [type]);
+ },
+
+ /** @override */
+ setDefaultCaptureDevice: function(type, defaultValue) {
+ chrome.send('setDefaultCaptureDevice', [type, defaultValue]);
+ },
};
return {

Powered by Google App Engine
This is Rietveld 408576698