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

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

Issue 13771008: Initial redesign of the Files.app's main window. (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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 250
251 /** 251 /**
252 * @param {Object=} opt_appState App state. 252 * @param {Object=} opt_appState App state.
253 * @param {number=} opt_id Window id. 253 * @param {number=} opt_id Window id.
254 */ 254 */
255 function launchFileManager(opt_appState, opt_id) { 255 function launchFileManager(opt_appState, opt_id) {
256 var id = opt_id || nextFileManagerWindowID; 256 var id = opt_id || nextFileManagerWindowID;
257 nextFileManagerWindowID = Math.max(nextFileManagerWindowID, id + 1); 257 nextFileManagerWindowID = Math.max(nextFileManagerWindowID, id + 1);
258 258
259 var appWindow = new AppWindowWrapper( 259 var appWindow = new AppWindowWrapper(
260 'main.html', FILES_ID_PREFIX + id, createFileManagerOptions); 260 util.platform.newUI() ? 'main_new_ui.html' : 'main.html',
261 FILES_ID_PREFIX + id,
262 createFileManagerOptions);
261 appWindow.launch(opt_appState || {}); 263 appWindow.launch(opt_appState || {});
262 } 264 }
263 265
264 /** 266 /**
265 * Relaunch file manager windows based on the persisted state. 267 * Relaunch file manager windows based on the persisted state.
266 */ 268 */
267 function reopenFileManagers() { 269 function reopenFileManagers() {
268 chrome.storage.local.get(function(items) { 270 chrome.storage.local.get(function(items) {
269 for (var key in items) { 271 for (var key in items) {
270 if (items.hasOwnProperty(key)) { 272 if (items.hasOwnProperty(key)) {
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 } 396 }
395 397
396 chrome.app.runtime.onLaunched.addListener(launch); 398 chrome.app.runtime.onLaunched.addListener(launch);
397 chrome.app.runtime.onRestarted.addListener(restart); 399 chrome.app.runtime.onRestarted.addListener(restart);
398 400
399 function addExecuteHandler() { 401 function addExecuteHandler() {
400 chrome.fileBrowserHandler.onExecute.addListener(executeFileBrowserTask); 402 chrome.fileBrowserHandler.onExecute.addListener(executeFileBrowserTask);
401 } 403 }
402 404
403 addExecuteHandler(); 405 addExecuteHandler();
OLDNEW
« no previous file with comments | « chrome/browser/resources/file_manager/css/file_manager.css ('k') | chrome/browser/resources/file_manager/js/file_manager.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698