| 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 * Map of all currently open app window. The key is an app id. | 8 * Map of all currently open app window. The key is an app id. |
| 9 */ | 9 */ |
| 10 var appWindows = {}; | 10 var appWindows = {}; |
| (...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 408 | 408 |
| 409 default: | 409 default: |
| 410 // Every other action opens a Files app window. | 410 // Every other action opens a Files app window. |
| 411 var appState = { | 411 var appState = { |
| 412 params: { | 412 params: { |
| 413 action: action | 413 action: action |
| 414 }, | 414 }, |
| 415 defaultPath: details.entries[0].fullPath, | 415 defaultPath: details.entries[0].fullPath, |
| 416 }; | 416 }; |
| 417 // For mounted devices just focus any Files.app window. The mounted | 417 // For mounted devices just focus any Files.app window. The mounted |
| 418 // volume will appear on the volume list. | 418 // volume will appear on the navigation list. |
| 419 var type = action == 'auto-open' ? LaunchType.FOCUS_ANY_OR_CREATE : | 419 var type = action == 'auto-open' ? LaunchType.FOCUS_ANY_OR_CREATE : |
| 420 LaunchType.FOCUS_SAME_OR_CREATE; | 420 LaunchType.FOCUS_SAME_OR_CREATE; |
| 421 launchFileManager(appState, | 421 launchFileManager(appState, |
| 422 undefined, // App ID. | 422 undefined, // App ID. |
| 423 type); | 423 type); |
| 424 break; | 424 break; |
| 425 } | 425 } |
| 426 } | 426 } |
| 427 | 427 |
| 428 | 428 |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 570 queue.run(function(callback) { | 570 queue.run(function(callback) { |
| 571 chrome.fileBrowserPrivate.getStrings(function(strings) { | 571 chrome.fileBrowserPrivate.getStrings(function(strings) { |
| 572 initContextMenu(strings); | 572 initContextMenu(strings); |
| 573 chrome.storage.local.set({strings: strings}, callback); | 573 chrome.storage.local.set({strings: strings}, callback); |
| 574 }); | 574 }); |
| 575 }); | 575 }); |
| 576 } | 576 } |
| 577 | 577 |
| 578 // Initialize Files.app. | 578 // Initialize Files.app. |
| 579 initApp(); | 579 initApp(); |
| OLD | NEW |