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

Unified Diff: chrome/browser/resources/settings/downloads_page/downloads_page.js

Issue 2713343003: MD Settings: Add "Auto Open" setting to Downloads page UI. (Closed)
Patch Set: fix merge? Created 3 years, 10 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/downloads_page/downloads_page.js
diff --git a/chrome/browser/resources/settings/downloads_page/downloads_page.js b/chrome/browser/resources/settings/downloads_page/downloads_page.js
index f1d1fc68f578565751ebae4bad82fe06adf3e0d3..69074bf4cc095b8ddbdb2ef44790f4675e925c44 100644
--- a/chrome/browser/resources/settings/downloads_page/downloads_page.js
+++ b/chrome/browser/resources/settings/downloads_page/downloads_page.js
@@ -18,6 +18,8 @@
Polymer({
is: 'settings-downloads-page',
+ behaviors: [WebUIListenerBehavior],
+
properties: {
/**
* Preferences state.
@@ -32,6 +34,21 @@ Polymer({
* @type {!DownloadsPageVisibility}
*/
pageVisibility: Object,
+
+ /** @private */
+ autoOpenDownloads_: {
+ type: Boolean,
+ value: false,
+ },
+ },
+
+ /** @override */
+ attached: function() {
+ this.addWebUIListener('auto-open-downloads-changed', function(autoOpen) {
+ this.autoOpenDownloads_ = autoOpen;
+ }.bind(this));
+
+ chrome.send('initializeDownloads');
Dan Beam 2017/02/27 05:50:36 don't chrome.send() directly
tommycli 2017/02/28 00:47:26 Done.
},
/** @private */
@@ -57,4 +74,8 @@ Polymer({
return path;
},
// </if>
+
+ onClearAutoOpenFileTypesTap_: function() {
+ chrome.send('resetAutoOpenFileTypes');
Dan Beam 2017/02/27 05:50:36 use a browser proxy
tommycli 2017/02/28 00:47:26 Done.
+ },
});

Powered by Google App Engine
This is Rietveld 408576698