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

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

Issue 7462022: only display downloads warning in full-tab view. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 const EMPTY_IMAGE_URI = 'data:image/gif;base64,' 7 const EMPTY_IMAGE_URI = 'data:image/gif;base64,'
8 + 'R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw%3D%3D'; 8 + 'R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw%3D%3D';
9 9
10 var g_slideshow_data = null; 10 var g_slideshow_data = null;
(...skipping 2389 matching lines...) Expand 10 before | Expand all | Expand 10 after
2400 this.onOk_(); 2400 this.onOk_();
2401 2401
2402 }; 2402 };
2403 2403
2404 /** 2404 /**
2405 * Update the UI when the current directory changes. 2405 * Update the UI when the current directory changes.
2406 * 2406 *
2407 * @param {cr.Event} event The directory-changed event. 2407 * @param {cr.Event} event The directory-changed event.
2408 */ 2408 */
2409 FileManager.prototype.onDirectoryChanged_ = function(event) { 2409 FileManager.prototype.onDirectoryChanged_ = function(event) {
2410 if (this.currentDirEntry_.fullPath.substr(0, DOWNLOADS_DIRECTORY.length) == 2410 if (this.dialogType_ == FileManager.DialogType.FULL_PAGE &&
2411 this.currentDirEntry_.fullPath.substr(0, DOWNLOADS_DIRECTORY.length) ==
2411 DOWNLOADS_DIRECTORY) { 2412 DOWNLOADS_DIRECTORY) {
2412 if (this.downloadsWarning_.style.height != DOWNLOADS_WARNING_HEIGHT) { 2413 if (this.downloadsWarning_.style.height != DOWNLOADS_WARNING_HEIGHT) {
2413 // Current path starts with DOWNLOADS_DIRECTORY, show the warning. 2414 // Current path starts with DOWNLOADS_DIRECTORY, show the warning.
2414 this.downloadsWarning_.style.height = DOWNLOADS_WARNING_HEIGHT; 2415 this.downloadsWarning_.style.height = DOWNLOADS_WARNING_HEIGHT;
2415 this.requestResize_(100); 2416 this.requestResize_(100);
2416 } 2417 }
2417 } else { 2418 } else {
2418 if (this.downloadsWarning_.style.height != '0') { 2419 if (this.downloadsWarning_.style.height != '0') {
2419 this.downloadsWarning_.style.height = '0'; 2420 this.downloadsWarning_.style.height = '0';
2420 this.requestResize_(100); 2421 this.requestResize_(100);
(...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after
3080 3081
3081 if (msg) { 3082 if (msg) {
3082 console.log('no no no'); 3083 console.log('no no no');
3083 this.alert.show(msg, onAccept); 3084 this.alert.show(msg, onAccept);
3084 return false; 3085 return false;
3085 } 3086 }
3086 3087
3087 return true; 3088 return true;
3088 }; 3089 };
3089 })(); 3090 })();
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