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 4334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4345 localStorage[WELCOME_HEADER_COUNTER_KEY] = ++counter; | 4345 localStorage[WELCOME_HEADER_COUNTER_KEY] = ++counter; |
4346 showBanner('header', 'GDATA_WELCOME_TEXT_SHORT'); | 4346 showBanner('header', 'GDATA_WELCOME_TEXT_SHORT'); |
4347 } else { | 4347 } else { |
4348 closeBanner(); | 4348 closeBanner(); |
4349 } | 4349 } |
4350 } | 4350 } |
4351 | 4351 |
4352 function closeBanner() { | 4352 function closeBanner() { |
4353 self.directoryModel_.removeEventListener('scan-completed', | 4353 self.directoryModel_.removeEventListener('scan-completed', |
4354 maybeShowBanner); | 4354 maybeShowBanner); |
4355 self.directoryModel_.removeEventListener('rescan-completed', | |
4356 maybeShowBanner); | |
4357 | 4355 |
4358 self.dialogContainer_.removeAttribute('gdrive-welcome'); | 4356 self.dialogContainer_.removeAttribute('gdrive-welcome'); |
4359 // Stop showing the welcome banner. | 4357 // Stop showing the welcome banner. |
4360 localStorage[WELCOME_HEADER_COUNTER_KEY] = WELCOME_HEADER_COUNTER_LIMIT; | 4358 localStorage[WELCOME_HEADER_COUNTER_KEY] = WELCOME_HEADER_COUNTER_LIMIT; |
4361 } | 4359 } |
4362 | 4360 |
4363 this.directoryModel_.addEventListener('scan-completed', maybeShowBanner); | 4361 this.directoryModel_.addEventListener('scan-completed', maybeShowBanner); |
4364 this.directoryModel_.addEventListener('rescan-completed', maybeShowBanner); | |
4365 | 4362 |
4366 var style = this.document_.createElement('link'); | 4363 var style = this.document_.createElement('link'); |
4367 style.rel = 'stylesheet'; | 4364 style.rel = 'stylesheet'; |
4368 style.href = 'css/gdrive_welcome.css'; | 4365 style.href = 'css/gdrive_welcome.css'; |
4369 this.document_.head.appendChild(style); | 4366 this.document_.head.appendChild(style); |
4370 }; | 4367 }; |
4371 })(); | 4368 })(); |
OLD | NEW |