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

Side by Side Diff: chrome/browser/resources/settings/downloads_page/downloads_page.js

Issue 2669073002: MD Settings: Allow controlled-button to be used with icons. (Closed)
Patch Set: have the parent row of the controlled-button disable/enable based on controlled-button state 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * 'settings-downloads-page' is the settings page containing downloads 7 * 'settings-downloads-page' is the settings page containing downloads
8 * settings. 8 * settings.
9 * 9 *
10 * Example: 10 * Example:
(...skipping 14 matching lines...) Expand all
25 prefs: { 25 prefs: {
26 type: Object, 26 type: Object,
27 notify: true, 27 notify: true,
28 }, 28 },
29 29
30 /** 30 /**
31 * Dictionary defining page visibility. 31 * Dictionary defining page visibility.
32 * @type {!DownloadsPageVisibility} 32 * @type {!DownloadsPageVisibility}
33 */ 33 */
34 pageVisibility: Object, 34 pageVisibility: Object,
35
36 /** @private */
37 isControlled_: {
38 type: Boolean,
39 notify: true
40 }
35 }, 41 },
36 42
37 /** @private */ 43 /** @private */
38 selectDownloadLocation_: function() { 44 selectDownloadLocation_: function() {
39 chrome.send('selectDownloadLocation'); 45 chrome.send('selectDownloadLocation');
40 }, 46 },
41 47
42 // <if expr="chromeos"> 48 // <if expr="chromeos">
43 /** 49 /**
44 * @param {string} path 50 * @param {string} path
45 * @return {string} The download location string that is suitable to display 51 * @return {string} The download location string that is suitable to display
46 * in the UI. 52 * in the UI.
47 * @private 53 * @private
48 */ 54 */
49 getDownloadLocation_: function(path) { 55 getDownloadLocation_: function(path) {
50 // Replace /special/drive-<hash>/root with "Google Drive" for remote files, 56 // Replace /special/drive-<hash>/root with "Google Drive" for remote files,
51 // /home/chronos/user/Downloads or /home/chronos/u-<hash>/Downloads with 57 // /home/chronos/user/Downloads or /home/chronos/u-<hash>/Downloads with
52 // "Downloads" for local paths, and '/' with ' \u203a ' (angled quote sign) 58 // "Downloads" for local paths, and '/' with ' \u203a ' (angled quote sign)
53 // everywhere. It is used only for display purpose. 59 // everywhere. It is used only for display purpose.
54 path = path.replace(/^\/special\/drive[^\/]*\/root/, 'Google Drive'); 60 path = path.replace(/^\/special\/drive[^\/]*\/root/, 'Google Drive');
55 path = path.replace(/^\/home\/chronos\/(user|u-[^\/]*)\//, ''); 61 path = path.replace(/^\/home\/chronos\/(user|u-[^\/]*)\//, '');
56 path = path.replace(/\//g, ' \u203a '); 62 path = path.replace(/\//g, ' \u203a ');
57 return path; 63 return path;
58 }, 64 },
59 // </if> 65 // </if>
60 }); 66 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698