| 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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 236 /** | 236 /** | 
| 237  * @return {Object} File manager window create options. | 237  * @return {Object} File manager window create options. | 
| 238  */ | 238  */ | 
| 239 function createFileManagerOptions() { | 239 function createFileManagerOptions() { | 
| 240   return { | 240   return { | 
| 241     defaultLeft: Math.round(window.screen.availWidth * 0.1), | 241     defaultLeft: Math.round(window.screen.availWidth * 0.1), | 
| 242     defaultTop: Math.round(window.screen.availHeight * 0.1), | 242     defaultTop: Math.round(window.screen.availHeight * 0.1), | 
| 243     defaultWidth: Math.round(window.screen.availWidth * 0.8), | 243     defaultWidth: Math.round(window.screen.availWidth * 0.8), | 
| 244     defaultHeight: Math.round(window.screen.availHeight * 0.8), | 244     defaultHeight: Math.round(window.screen.availHeight * 0.8), | 
| 245     minWidth: 320, | 245     minWidth: 320, | 
| 246     minHeight: 240 | 246     minHeight: 240, | 
|  | 247     frame: util.platform.newUI() ? 'none' : 'chrome' | 
| 247   }; | 248   }; | 
| 248 } | 249 } | 
| 249 | 250 | 
| 250 /** | 251 /** | 
| 251  * @param {Object=} opt_appState App state. | 252  * @param {Object=} opt_appState App state. | 
| 252  * @param {number=} opt_id Window id. | 253  * @param {number=} opt_id Window id. | 
| 253  */ | 254  */ | 
| 254 function launchFileManager(opt_appState, opt_id) { | 255 function launchFileManager(opt_appState, opt_id) { | 
| 255   var id = opt_id || nextFileManagerWindowID; | 256   var id = opt_id || nextFileManagerWindowID; | 
| 256   nextFileManagerWindowID = Math.max(nextFileManagerWindowID, id + 1); | 257   nextFileManagerWindowID = Math.max(nextFileManagerWindowID, id + 1); | 
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 398 function addExecuteHandler() { | 399 function addExecuteHandler() { | 
| 399   if (!chrome.fileBrowserHandler) { | 400   if (!chrome.fileBrowserHandler) { | 
| 400     console.log('Running outside Chrome OS, loading mock API implementations.'); | 401     console.log('Running outside Chrome OS, loading mock API implementations.'); | 
| 401     util.loadScripts(['js/mock_chrome.js'], addExecuteHandler); | 402     util.loadScripts(['js/mock_chrome.js'], addExecuteHandler); | 
| 402     return; | 403     return; | 
| 403   } | 404   } | 
| 404   chrome.fileBrowserHandler.onExecute.addListener(executeFileBrowserTask); | 405   chrome.fileBrowserHandler.onExecute.addListener(executeFileBrowserTask); | 
| 405 } | 406 } | 
| 406 | 407 | 
| 407 addExecuteHandler(); | 408 addExecuteHandler(); | 
| OLD | NEW | 
|---|