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

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

Issue 988783002: Add an initial implementation of the downloads MD settings page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Respond to comments. Created 5 years, 9 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
new file mode 100644
index 0000000000000000000000000000000000000000..fdf7f0d960d49d43df7c7a28a6bbc62a87718f9c
--- /dev/null
+++ b/chrome/browser/resources/settings/downloads_page/downloads_page.js
@@ -0,0 +1,42 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+/**
+ * @fileoverview
+ * 'cr-settings-downloads-page' is the settings page containing all downloads
+ * settings.
+ *
+ * Example:
+ *
+ * <core-animated-pages>
+ * <cr-settings-downloads-page></cr-settings-downloads-page>
+ * ... other pages ...
+ * </core-animated-pages>
+ *
+ * @group Chrome Settings Elements
+ * @element cr-settings-downloads-page
+ */
+Polymer('cr-settings-downloads-page', {
+ publish: {
+ /**
+ * Preferences state.
+ *
+ * @attribute prefs
+ * @type CrSettingsPrefsElement
+ * @default null
+ */
+ prefs: null,
+ },
+
+ selectDownloadLocation: function() {
+ // TODO(orenb): Communicate with the C++ to actually display a folder
+ // picker.
+ this.$.downloadsPath.value = '/Downloads';
+ },
+
+ updatePromptForDownload: function() {
+ this.prefs.settings.download.promptForDownload =
+ this.$.promptForDownload.checked;
michaelpg 2015/03/09 21:24:08 hmm I'm a little confused by this. It doesn't look
Oren Blasberg 2015/03/09 21:39:13 Oops -- yes, you're right. I'd added this method i
+ },
+});

Powered by Google App Engine
This is Rietveld 408576698