OLD | NEW |
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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 attached: function() { | 49 attached: function() { |
50 this.browserProxy_ = settings.DownloadsBrowserProxyImpl.getInstance(); | 50 this.browserProxy_ = settings.DownloadsBrowserProxyImpl.getInstance(); |
51 | 51 |
52 this.addWebUIListener('auto-open-downloads-changed', function(autoOpen) { | 52 this.addWebUIListener('auto-open-downloads-changed', function(autoOpen) { |
53 this.autoOpenDownloads_ = autoOpen; | 53 this.autoOpenDownloads_ = autoOpen; |
54 }.bind(this)); | 54 }.bind(this)); |
55 | 55 |
56 this.browserProxy_.initializeDownloads(); | 56 this.browserProxy_.initializeDownloads(); |
57 }, | 57 }, |
58 | 58 |
| 59 /** |
| 60 * @param {boolean|undefined} visibility |
| 61 * @return {boolean} |
| 62 * @private |
| 63 */ |
| 64 showPage_: function(visibility) { |
| 65 return visibility !== false; |
| 66 }, |
| 67 |
59 /** @private */ | 68 /** @private */ |
60 selectDownloadLocation_: function() { | 69 selectDownloadLocation_: function() { |
61 listenOnce(this, 'transitionend', function() { | 70 listenOnce(this, 'transitionend', function() { |
62 this.browserProxy_.selectDownloadLocation(); | 71 this.browserProxy_.selectDownloadLocation(); |
63 }.bind(this)); | 72 }.bind(this)); |
64 }, | 73 }, |
65 | 74 |
66 // <if expr="chromeos"> | 75 // <if expr="chromeos"> |
67 /** | 76 /** |
68 * @param {string} path | 77 * @param {string} path |
(...skipping 11 matching lines...) Expand all Loading... |
80 path = path.replace(/\//g, ' \u203a '); | 89 path = path.replace(/\//g, ' \u203a '); |
81 return path; | 90 return path; |
82 }, | 91 }, |
83 // </if> | 92 // </if> |
84 | 93 |
85 /** @private */ | 94 /** @private */ |
86 onClearAutoOpenFileTypesTap_: function() { | 95 onClearAutoOpenFileTypesTap_: function() { |
87 this.browserProxy_.resetAutoOpenFileTypes(); | 96 this.browserProxy_.resetAutoOpenFileTypes(); |
88 }, | 97 }, |
89 }); | 98 }); |
OLD | NEW |