Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // Helper functions | 6 // Helper functions |
| 7 function $(o) {return document.getElementById(o);} | 7 function $(o) {return document.getElementById(o);} |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * Sets the display style of a node. | 10 * Sets the display style of a node. |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 387 } else if (this.dangerType_ == Download.DangerType.DANGEROUS_URL) { | 387 } else if (this.dangerType_ == Download.DangerType.DANGEROUS_URL) { |
| 388 this.dangerDesc_.textContent = localStrings.getString('danger_url_desc'); | 388 this.dangerDesc_.textContent = localStrings.getString('danger_url_desc'); |
| 389 } else if (this.dangerType_ == Download.DangerType.DANGEROUS_CONTENT) { | 389 } else if (this.dangerType_ == Download.DangerType.DANGEROUS_CONTENT) { |
| 390 this.dangerDesc_.textContent = localStrings.getStringF( | 390 this.dangerDesc_.textContent = localStrings.getStringF( |
| 391 'danger_content_desc', this.fileName_); | 391 'danger_content_desc', this.fileName_); |
| 392 } | 392 } |
| 393 this.danger_.style.display = 'block'; | 393 this.danger_.style.display = 'block'; |
| 394 this.safe_.style.display = 'none'; | 394 this.safe_.style.display = 'none'; |
| 395 } else { | 395 } else { |
| 396 downloads.scheduleIconLoad(this.nodeImg_, | 396 downloads.scheduleIconLoad(this.nodeImg_, |
| 397 'chrome://fileicon/' + this.filePath_); | 397 'chrome://fileicon/' + |
| 398 encodeURIComponent(this.filePath_)); | |
|
achuithb
2012/01/23 20:59:27
please make sure this is tested on a chromeos devi
achuithb
2012/01/23 21:01:10
I should've phrased this better - we should make s
asanka
2012/01/26 00:49:35
Done.
| |
| 398 | 399 |
| 399 if (this.state_ == Download.States.COMPLETE && | 400 if (this.state_ == Download.States.COMPLETE && |
| 400 !this.fileExternallyRemoved_) { | 401 !this.fileExternallyRemoved_) { |
| 401 this.nodeFileLink_.textContent = this.fileName_; | 402 this.nodeFileLink_.textContent = this.fileName_; |
| 402 this.nodeFileLink_.href = this.fileUrl_; | 403 this.nodeFileLink_.href = this.fileUrl_; |
| 403 this.nodeFileLink_.oncontextmenu = null; | 404 this.nodeFileLink_.oncontextmenu = null; |
| 404 } else if (this.nodeFileName_.textContent != this.fileName_) { | 405 } else if (this.nodeFileName_.textContent != this.fileName_) { |
| 405 this.nodeFileName_.textContent = this.fileName_; | 406 this.nodeFileName_.textContent = this.fileName_; |
| 406 } | 407 } |
| 407 | 408 |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 684 openDownloadsFolderLink.oncontextmenu = function() { return false; }; | 685 openDownloadsFolderLink.oncontextmenu = function() { return false; }; |
| 685 | 686 |
| 686 $('search-link').onclick = function () { | 687 $('search-link').onclick = function () { |
| 687 setSearch(''); | 688 setSearch(''); |
| 688 return false; | 689 return false; |
| 689 }; | 690 }; |
| 690 $('search-form').onsubmit = function () { | 691 $('search-form').onsubmit = function () { |
| 691 setSearch(this.term.value); | 692 setSearch(this.term.value); |
| 692 return false; | 693 return false; |
| 693 }; | 694 }; |
| OLD | NEW |