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

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

Issue 14797006: Files.app: Changed the item click behavior of auto complete list. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed a comment. 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
« 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 3389 matching lines...) Expand 10 before | Expand all | Expand 10 after
3400 } 3400 }
3401 3401
3402 var urls = [entry.toURL()]; 3402 var urls = [entry.toURL()];
3403 var self = this; 3403 var self = this;
3404 3404
3405 // To open a file, first get the mime type. 3405 // To open a file, first get the mime type.
3406 this.metadataCache_.get(urls, 'drive', function(props) { 3406 this.metadataCache_.get(urls, 'drive', function(props) {
3407 var mimeType = props[0].contentMimeType || ''; 3407 var mimeType = props[0].contentMimeType || '';
3408 var mimeTypes = [mimeType]; 3408 var mimeTypes = [mimeType];
3409 var openIt = function() { 3409 var openIt = function() {
3410 var tasks = new FileTasks(self); 3410 if (self.dialogType == DialogType.FULL_PAGE) {
3411 tasks.init(urls, mimeTypes); 3411 var tasks = new FileTasks(self);
3412 tasks.executeDefault(); 3412 tasks.init(urls, mimeTypes);
3413 } 3413 tasks.executeDefault();
3414 } else {
3415 self.onOk_();
3416 }
3417 };
3414 3418
3415 // Change the current directory to the directory that contains the 3419 // Change the current directory to the directory that contains the
3416 // selected file. Note that this is necessary for an image or a video, 3420 // selected file. Note that this is necessary for an image or a video,
3417 // which should be opened in the gallery mode, as the gallery mode 3421 // which should be opened in the gallery mode, as the gallery mode
3418 // requires the entry to be in the current directory model. For 3422 // requires the entry to be in the current directory model. For
3419 // consistency, the current directory is always changed regardless of 3423 // consistency, the current directory is always changed regardless of
3420 // the file type. 3424 // the file type.
3421 entry.getParent(function(parent) { 3425 entry.getParent(function(parent) {
3422 var onDirectoryChanged = function(event) { 3426 var onDirectoryChanged = function(event) {
3423 self.directoryModel_.removeEventListener('scan-completed', 3427 self.directoryModel_.removeEventListener('scan-completed',
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
3606 * Set the flag expressing whether the ctrl key is pressed or not. 3610 * Set the flag expressing whether the ctrl key is pressed or not.
3607 * @param {boolean} flag New value of the flag 3611 * @param {boolean} flag New value of the flag
3608 * @private 3612 * @private
3609 */ 3613 */
3610 FileManager.prototype.setCtrlKeyPressed_ = function(flag) { 3614 FileManager.prototype.setCtrlKeyPressed_ = function(flag) {
3611 this.ctrlKeyPressed_ = flag; 3615 this.ctrlKeyPressed_ = flag;
3612 this.document_.querySelector('#drive-clear-local-cache').canExecuteChange(); 3616 this.document_.querySelector('#drive-clear-local-cache').canExecuteChange();
3613 this.document_.querySelector('#drive-reload').canExecuteChange(); 3617 this.document_.querySelector('#drive-reload').canExecuteChange();
3614 }; 3618 };
3615 })(); 3619 })();
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