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

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

Issue 13707002: Introduce a file-manager-new-ui flag for the new UI of Files.app. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed. Created 7 years, 8 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 | Annotate | Revision Log
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 * 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
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
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();
OLDNEW
« no previous file with comments | « chrome/browser/extensions/component_loader.cc ('k') | chrome/browser/resources/file_manager/js/util.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698