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 // Setting the src of an img to an empty string can crash the browser, so we | 5 // Setting the src of an img to an empty string can crash the browser, so we |
6 // use an empty 1x1 gif instead. | 6 // use an empty 1x1 gif instead. |
7 | 7 |
8 /** | 8 /** |
9 * FileManager constructor. | 9 * FileManager constructor. |
10 * | 10 * |
(...skipping 3880 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3891 function onError(error) { | 3891 function onError(error) { |
3892 self.alert.show(strf('ERROR_CREATING_FOLDER', current(), | 3892 self.alert.show(strf('ERROR_CREATING_FOLDER', current(), |
3893 util.getFileErrorMnemonic(error.code))); | 3893 util.getFileErrorMnemonic(error.code))); |
3894 } | 3894 } |
3895 | 3895 |
3896 tryCreate(); | 3896 tryCreate(); |
3897 }; | 3897 }; |
3898 | 3898 |
3899 FileManager.prototype.onDetailViewButtonClick_ = function(event) { | 3899 FileManager.prototype.onDetailViewButtonClick_ = function(event) { |
3900 this.setListType(FileManager.ListType.DETAIL); | 3900 this.setListType(FileManager.ListType.DETAIL); |
| 3901 this.currentList_.focus(); |
3901 }; | 3902 }; |
3902 | 3903 |
3903 FileManager.prototype.onThumbnailViewButtonClick_ = function(event) { | 3904 FileManager.prototype.onThumbnailViewButtonClick_ = function(event) { |
3904 this.setListType(FileManager.ListType.THUMBNAIL); | 3905 this.setListType(FileManager.ListType.THUMBNAIL); |
| 3906 this.currentList_.focus(); |
3905 }; | 3907 }; |
3906 | 3908 |
3907 /** | 3909 /** |
3908 * KeyDown event handler for the document. | 3910 * KeyDown event handler for the document. |
3909 */ | 3911 */ |
3910 FileManager.prototype.onKeyDown_ = function(event) { | 3912 FileManager.prototype.onKeyDown_ = function(event) { |
3911 if (event.srcElement === this.renameInput_) { | 3913 if (event.srcElement === this.renameInput_) { |
3912 // Ignore keydown handler in the rename input box. | 3914 // Ignore keydown handler in the rename input box. |
3913 return; | 3915 return; |
3914 } | 3916 } |
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4448 | 4450 |
4449 chrome.fileBrowserPrivate.setGDataPreferences(changeInfo); | 4451 chrome.fileBrowserPrivate.setGDataPreferences(changeInfo); |
4450 | 4452 |
4451 if (oldValue) { | 4453 if (oldValue) { |
4452 event.target.removeAttribute('checked'); | 4454 event.target.removeAttribute('checked'); |
4453 } else { | 4455 } else { |
4454 event.target.setAttribute('checked', 'checked'); | 4456 event.target.setAttribute('checked', 'checked'); |
4455 } | 4457 } |
4456 }; | 4458 }; |
4457 })(); | 4459 })(); |
OLD | NEW |