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

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

Issue 1135013005: Convert the downloads page to Polymer 0.8 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 a18dfc7779b2a72a8b888866cac9f38e1ca21ac9..c867aec96cd4cdda76e86fa34a166bc7804e089a 100644
--- a/chrome/browser/resources/settings/downloads_page/downloads_page.js
+++ b/chrome/browser/resources/settings/downloads_page/downloads_page.js
@@ -9,72 +9,73 @@
*
* Example:
*
- * <core-animated-pages>
+ * <iron-animated-pages>
* <cr-settings-downloads-page prefs="{{prefs}}">
* </cr-settings-downloads-page>
* ... other pages ...
- * </core-animated-pages>
+ * </iron-animated-pages>
*
* @group Chrome Settings Elements
* @element cr-settings-downloads-page
*/
-Polymer('cr-settings-downloads-page', {
- publish: {
+Polymer({
+ is: 'cr-settings-downloads-page',
+
+ properties: {
/**
* Preferences state.
- *
- * @attribute prefs
- * @type CrSettingsPrefsElement
- * @default null
+ * @type {?CrSettingsPrefsElement}
*/
- prefs: null,
+ prefs: {
+ type: Object,
+ notify: true,
+ },
/**
* Route for the page.
- *
- * @attribute route
- * @type string
- * @default ''
*/
- route: '',
+ route: {
michaelpg 2015/05/12 05:52:14 I'm probably just out of the loop, but what's the
Jeremy Klein 2015/05/12 06:19:27 In this case, no reason. Done. FWIW there is a su
michaelpg 2015/05/12 06:50:19 I don't see this behavior -- either way, for me, t
+ type: String,
+ value: '',
+ },
/**
* Whether the page is a subpage.
- *
- * @attribute subpage
- * @type boolean
- * @default false
*/
- subpage: false,
+ subpage: {
+ type: Boolean,
+ value: false,
+ },
/**
* ID of the page.
- *
- * @attribute PAGE_ID
- * @const string
- * @default 'downloads'
*/
- PAGE_ID: 'downloads',
+ PAGE_ID: {
+ type: String,
+ value: 'downloads',
+ },
/**
* Title for the page header and navigation menu.
- *
- * @attribute pageTitle
- * @type string
*/
- pageTitle: loadTimeData.getString('downloadsPageTitle'),
+ pageTitle: {
+ type: String,
+ value: function() {
+ return loadTimeData.getString('downloadsPageTitle');
+ },
+ },
/**
* Name of the 'core-icon' to show.
michaelpg 2015/05/12 05:52:14 iron-icon
Jeremy Klein 2015/05/12 06:19:27 Done.
- *
- * @attribute icon
- * @type string
- * @default 'file-download'
*/
- icon: 'file-download',
+ icon: {
+ type: String,
+ value: 'file-download',
+ },
},
- selectDownloadLocation: function() {
+ /** @private */
+ selectDownloadLocation_: function() {
// TODO(orenb): Communicate with the C++ to actually display a folder
// picker.
this.$.downloadsPath.value = '/Downloads';

Powered by Google App Engine
This is Rietveld 408576698