Chromium Code Reviews| 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 '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 2336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2347 | 2347 |
| 2348 this.metadataCache_.get(urls, 'drive', function(props) { | 2348 this.metadataCache_.get(urls, 'drive', function(props) { |
| 2349 if (!props || !props[0] || !props[0].contentMimeType) { | 2349 if (!props || !props[0] || !props[0].contentMimeType) { |
| 2350 onFailure(); | 2350 onFailure(); |
| 2351 return; | 2351 return; |
| 2352 } | 2352 } |
| 2353 | 2353 |
| 2354 var filename = util.extractFilePath(urls[0]); | 2354 var filename = util.extractFilePath(urls[0]); |
| 2355 var extension = PathUtil.extractExtension(filename); | 2355 var extension = PathUtil.extractExtension(filename); |
| 2356 var mime = props[0].contentMimeType; | 2356 var mime = props[0].contentMimeType; |
| 2357 | |
| 2358 // Add the overlapped class to prevent the applicaiton window from | |
| 2359 // captureing mouse events. | |
| 2360 this.enableDragOnTitleArea_(false); | |
|
hirono
2013/09/03 08:23:07
Can we make sure that the both dialogs are not ope
| |
| 2357 this.suggestAppsDialog.show( | 2361 this.suggestAppsDialog.show( |
| 2358 extension, mime, | 2362 extension, mime, |
| 2359 function(result) { | 2363 function(result) { |
| 2364 this.enableDragOnTitleArea_(true); | |
| 2360 switch (result) { | 2365 switch (result) { |
| 2361 case SuggestAppsDialog.Result.INSTALL_SUCCESSFUL: | 2366 case SuggestAppsDialog.Result.INSTALL_SUCCESSFUL: |
| 2362 onSuccess(); | 2367 onSuccess(); |
| 2363 break; | 2368 break; |
| 2364 case SuggestAppsDialog.Result.FAILED: | 2369 case SuggestAppsDialog.Result.FAILED: |
| 2365 onFailure(); | 2370 onFailure(); |
| 2366 break; | 2371 break; |
| 2367 default: | 2372 default: |
| 2368 onCancelled(); | 2373 onCancelled(); |
| 2369 } | 2374 } |
| (...skipping 1592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3962 */ | 3967 */ |
| 3963 FileManager.prototype.setCtrlKeyPressed_ = function(flag) { | 3968 FileManager.prototype.setCtrlKeyPressed_ = function(flag) { |
| 3964 this.ctrlKeyPressed_ = flag; | 3969 this.ctrlKeyPressed_ = flag; |
| 3965 // Before the DOM is constructed, the key event can be handled. | 3970 // Before the DOM is constructed, the key event can be handled. |
| 3966 var cacheClearCommand = | 3971 var cacheClearCommand = |
| 3967 this.document_.querySelector('#drive-clear-local-cache'); | 3972 this.document_.querySelector('#drive-clear-local-cache'); |
| 3968 if (cacheClearCommand) | 3973 if (cacheClearCommand) |
| 3969 cacheClearCommand.canExecuteChange(); | 3974 cacheClearCommand.canExecuteChange(); |
| 3970 }; | 3975 }; |
| 3971 })(); | 3976 })(); |
| OLD | NEW |