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

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

Issue 2394963002: MD Settings: Migrate site settings media-picker to native select. (Closed)
Patch Set: Changing parent branch to not have to wait on other CLs. No diff change. Created 4 years, 2 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
« no previous file with comments | « chrome/browser/resources/settings/site_settings/media_picker.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/settings/site_settings/media_picker.js
diff --git a/chrome/browser/resources/settings/site_settings/media_picker.js b/chrome/browser/resources/settings/site_settings/media_picker.js
index 847213c0b384ae3f015b6a42a60aeb55b0dd7223..829b74a41609670f2284f6c06ed3bde5a9931090 100644
--- a/chrome/browser/resources/settings/site_settings/media_picker.js
+++ b/chrome/browser/resources/settings/site_settings/media_picker.js
@@ -44,14 +44,20 @@ Polymer({
this.$.picker.hidden = devices.length == 0;
if (devices.length > 0) {
this.devices = devices;
- this.$.mediaPicker.selected = defaultDevice;
+
+ // Wait for <select> to be populated.
+ this.async(function() {
+ this.$.mediaPicker.value = defaultDevice;
+ }.bind(this));
}
},
/**
* A handler for when an item is selected in the media picker.
+ * @private
*/
- onMediaPickerActivate_: function(event) {
- this.browserProxy.setDefaultCaptureDevice(this.type, event.detail.selected);
+ onChange_: function() {
+ this.browserProxy.setDefaultCaptureDevice(
+ this.type, this.$.mediaPicker.value);
},
});
« no previous file with comments | « chrome/browser/resources/settings/site_settings/media_picker.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698