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

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: Add the missing demo.js I accidentally omitted in previous patch. 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..684e5f6f0cbfbfb523e516c661c7927a742c6617
--- /dev/null
+++ b/chrome/browser/resources/settings/downloads_page/downloads_page.js
@@ -0,0 +1,38 @@
+// 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
michaelpg 2015/03/08 05:37:36 nit: let's not claim this contains ALL the downloa
Oren Blasberg 2015/03/09 21:05:05 Why not? Doesn't it contain them?
michaelpg 2015/03/09 21:24:08 For example it's missing auto-open settings, which
Oren Blasberg 2015/03/09 21:39:13 Done.
+ * 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
michaelpg 2015/03/08 05:37:36 nit: add trailing comma. You may already know this
Oren Blasberg 2015/03/09 21:05:05 Done.
+ },
+
+ selectDownloadLocation: function() {
+ // TODO(orenb): Communicate with the C++ to actually display a folder
+ // picker.
+ this.$.downloadsPath.value = '/Downloads';
+ this.prefs.settings.downloads.downloadLocation = '/Downloads';
+ },
+});

Powered by Google App Engine
This is Rietveld 408576698