Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(677)

Side by Side Diff: chrome/browser/resources/file_manager/js/file_manager.js

Issue 10257031: [File Manager] Keep showing GDrive promo banner while the search box is being used. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 })();
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698