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 * FileManager constructor. | 6 * FileManager constructor. |
7 * | 7 * |
8 * FileManager objects encapsulate the functionality of the file selector | 8 * FileManager objects encapsulate the functionality of the file selector |
9 * dialogs, as well as the full screen file manager application (though the | 9 * dialogs, as well as the full screen file manager application (though the |
10 * latter is not yet implemented). | 10 * latter is not yet implemented). |
(...skipping 1246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1257 strf('PASTE_FILESYSTEM_ERROR', | 1257 strf('PASTE_FILESYSTEM_ERROR', |
1258 getFileErrorString(event.error.data.code))); | 1258 getFileErrorString(event.error.data.code))); |
1259 } | 1259 } |
1260 break; | 1260 break; |
1261 | 1261 |
1262 default: | 1262 default: |
1263 this.showButterError(strf('PASTE_UNEXPECTED_ERROR', event.error)); | 1263 this.showButterError(strf('PASTE_UNEXPECTED_ERROR', event.error)); |
1264 break; | 1264 break; |
1265 } | 1265 } |
1266 } else if (event.reason == 'CANCELLED') { | 1266 } else if (event.reason == 'CANCELLED') { |
1267 this.showButter(str('PASTE_CANCELLED')); | 1267 this.showButter(str('PASTE_CANCELLED'), {timeout: 1000}); |
1268 } else { | 1268 } else { |
1269 console.log('Unknown event reason: ' + event.reason); | 1269 console.log('Unknown event reason: ' + event.reason); |
1270 } | 1270 } |
1271 | 1271 |
1272 // TODO(benchan): Currently, there is no FileWatcher emulation for | 1272 // TODO(benchan): Currently, there is no FileWatcher emulation for |
1273 // GDataFileSystem, so we need to manually trigger the directory rescan | 1273 // GDataFileSystem, so we need to manually trigger the directory rescan |
1274 // after paste operations complete. Remove this once we emulate file | 1274 // after paste operations complete. Remove this once we emulate file |
1275 // watching functionalities in GDataFileSystem. | 1275 // watching functionalities in GDataFileSystem. |
1276 if (this.isOnGData()) { | 1276 if (this.isOnGData()) { |
1277 if (event.reason == 'SUCCESS' || event.reason == 'ERROR' || | 1277 if (event.reason == 'SUCCESS' || event.reason == 'ERROR' || |
(...skipping 3201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4479 | 4479 |
4480 this.directoryModel_.addEventListener('scan-completed', maybeShowBanner); | 4480 this.directoryModel_.addEventListener('scan-completed', maybeShowBanner); |
4481 this.directoryModel_.addEventListener('rescan-completed', maybeShowBanner); | 4481 this.directoryModel_.addEventListener('rescan-completed', maybeShowBanner); |
4482 | 4482 |
4483 var style = this.document_.createElement('link'); | 4483 var style = this.document_.createElement('link'); |
4484 style.rel = 'stylesheet'; | 4484 style.rel = 'stylesheet'; |
4485 style.href = 'css/gdrive_welcome.css'; | 4485 style.href = 'css/gdrive_welcome.css'; |
4486 this.document_.head.appendChild(style); | 4486 this.document_.head.appendChild(style); |
4487 }; | 4487 }; |
4488 })(); | 4488 })(); |
OLD | NEW |