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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 frame: util.platform.newUI() ? 'none' : 'chrome', |
| 248 transparentBackground: true |
248 }; | 249 }; |
249 } | 250 } |
250 | 251 |
251 /** | 252 /** |
252 * @param {Object=} opt_appState App state. | 253 * @param {Object=} opt_appState App state. |
253 * @param {number=} opt_id Window id. | 254 * @param {number=} opt_id Window id. |
254 * @return {string} The window's App ID. | 255 * @return {string} The window's App ID. |
255 */ | 256 */ |
256 function launchFileManager(opt_appState, opt_id) { | 257 function launchFileManager(opt_appState, opt_id) { |
257 var id = opt_id || nextFileManagerWindowID; | 258 var id = opt_id || nextFileManagerWindowID; |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 } | 401 } |
401 | 402 |
402 chrome.app.runtime.onLaunched.addListener(launch); | 403 chrome.app.runtime.onLaunched.addListener(launch); |
403 chrome.app.runtime.onRestarted.addListener(restart); | 404 chrome.app.runtime.onRestarted.addListener(restart); |
404 | 405 |
405 function addExecuteHandler() { | 406 function addExecuteHandler() { |
406 chrome.fileBrowserHandler.onExecute.addListener(executeFileBrowserTask); | 407 chrome.fileBrowserHandler.onExecute.addListener(executeFileBrowserTask); |
407 } | 408 } |
408 | 409 |
409 addExecuteHandler(); | 410 addExecuteHandler(); |
OLD | NEW |