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

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

Issue 14702006: Merge 198700 "Changed the item click behavior of auto complete l..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1500/src/
Patch Set: Created 7 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 'use strict'; 5 'use strict';
6 6
7 /** 7 /**
8 * This variable is checked in SelectFileDialogExtensionBrowserTest. 8 * This variable is checked in SelectFileDialogExtensionBrowserTest.
9 * @type {number} 9 * @type {number}
10 */ 10 */
(...skipping 3438 matching lines...) Expand 10 before | Expand all | Expand 10 after
3449 } 3449 }
3450 3450
3451 var urls = [entry.toURL()]; 3451 var urls = [entry.toURL()];
3452 var self = this; 3452 var self = this;
3453 3453
3454 // To open a file, first get the mime type. 3454 // To open a file, first get the mime type.
3455 this.metadataCache_.get(urls, 'drive', function(props) { 3455 this.metadataCache_.get(urls, 'drive', function(props) {
3456 var mimeType = props[0].contentMimeType || ''; 3456 var mimeType = props[0].contentMimeType || '';
3457 var mimeTypes = [mimeType]; 3457 var mimeTypes = [mimeType];
3458 var openIt = function() { 3458 var openIt = function() {
3459 var tasks = new FileTasks(self); 3459 if (self.dialogType == DialogType.FULL_PAGE) {
3460 tasks.init(urls, mimeTypes); 3460 var tasks = new FileTasks(self);
3461 tasks.executeDefault(); 3461 tasks.init(urls, mimeTypes);
3462 } 3462 tasks.executeDefault();
3463 } else {
3464 self.onOk_();
3465 }
3466 };
3463 3467
3464 // Change the current directory to the directory that contains the 3468 // Change the current directory to the directory that contains the
3465 // selected file. Note that this is necessary for an image or a video, 3469 // selected file. Note that this is necessary for an image or a video,
3466 // which should be opened in the gallery mode, as the gallery mode 3470 // which should be opened in the gallery mode, as the gallery mode
3467 // requires the entry to be in the current directory model. For 3471 // requires the entry to be in the current directory model. For
3468 // consistency, the current directory is always changed regardless of 3472 // consistency, the current directory is always changed regardless of
3469 // the file type. 3473 // the file type.
3470 entry.getParent(function(parent) { 3474 entry.getParent(function(parent) {
3471 var onDirectoryChanged = function(event) { 3475 var onDirectoryChanged = function(event) {
3472 self.directoryModel_.removeEventListener('scan-completed', 3476 self.directoryModel_.removeEventListener('scan-completed',
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
3655 * Set the flag expressing whether the ctrl key is pressed or not. 3659 * Set the flag expressing whether the ctrl key is pressed or not.
3656 * @param {boolean} flag New value of the flag 3660 * @param {boolean} flag New value of the flag
3657 * @private 3661 * @private
3658 */ 3662 */
3659 FileManager.prototype.setCtrlKeyPressed_ = function(flag) { 3663 FileManager.prototype.setCtrlKeyPressed_ = function(flag) {
3660 this.ctrlKeyPressed_ = flag; 3664 this.ctrlKeyPressed_ = flag;
3661 this.document_.querySelector('#drive-clear-local-cache').canExecuteChange(); 3665 this.document_.querySelector('#drive-clear-local-cache').canExecuteChange();
3662 this.document_.querySelector('#drive-reload').canExecuteChange(); 3666 this.document_.querySelector('#drive-reload').canExecuteChange();
3663 }; 3667 };
3664 })(); 3668 })();
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