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

Side by Side Diff: ui/file_manager/file_manager/background/js/background.js

Issue 550863003: Rename fileBrowserPrivate to fileManagerPrivate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
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 * Type of a Files.app's instance launch. 8 * Type of a Files.app's instance launch.
9 * @enum {number} 9 * @enum {number}
10 */ 10 */
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 this.driveSyncHandler_ = new DriveSyncHandler(this.progressCenter); 76 this.driveSyncHandler_ = new DriveSyncHandler(this.progressCenter);
77 this.driveSyncHandler_.addEventListener( 77 this.driveSyncHandler_.addEventListener(
78 DriveSyncHandler.COMPLETED_EVENT, 78 DriveSyncHandler.COMPLETED_EVENT,
79 function() { this.tryClose(); }.bind(this)); 79 function() { this.tryClose(); }.bind(this));
80 80
81 /** 81 /**
82 * Promise of string data. 82 * Promise of string data.
83 * @type {Promise} 83 * @type {Promise}
84 */ 84 */
85 this.stringDataPromise = new Promise(function(fulfill) { 85 this.stringDataPromise = new Promise(function(fulfill) {
86 chrome.fileBrowserPrivate.getStrings(fulfill); 86 chrome.fileManagerPrivate.getStrings(fulfill);
87 }); 87 });
88 88
89 /** 89 /**
90 * String assets. 90 * String assets.
91 * @type {Object.<string, string>} 91 * @type {Object.<string, string>}
92 */ 92 */
93 this.stringData = null; 93 this.stringData = null;
94 94
95 /** 95 /**
96 * Callback list to be invoked after initialization. 96 * Callback list to be invoked after initialization.
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 * Focuses the window on the specified desktop. 284 * Focuses the window on the specified desktop.
285 * @param {AppWindow} appWindow Application window. 285 * @param {AppWindow} appWindow Application window.
286 * @param {string=} opt_profileId The profiled ID of the target window. If it is 286 * @param {string=} opt_profileId The profiled ID of the target window. If it is
287 * dropped, the window is focused on the current window. 287 * dropped, the window is focused on the current window.
288 */ 288 */
289 AppWindowWrapper.focusOnDesktop = function(appWindow, opt_profileId) { 289 AppWindowWrapper.focusOnDesktop = function(appWindow, opt_profileId) {
290 new Promise(function(onFulfilled, onRejected) { 290 new Promise(function(onFulfilled, onRejected) {
291 if (opt_profileId) { 291 if (opt_profileId) {
292 onFulfilled(opt_profileId); 292 onFulfilled(opt_profileId);
293 } else { 293 } else {
294 chrome.fileBrowserPrivate.getProfiles(function(profiles, 294 chrome.fileManagerPrivate.getProfiles(function(profiles,
295 currentId, 295 currentId,
296 displayedId) { 296 displayedId) {
297 onFulfilled(currentId); 297 onFulfilled(currentId);
298 }); 298 });
299 } 299 }
300 }).then(function(profileId) { 300 }).then(function(profileId) {
301 appWindow.contentWindow.chrome.fileBrowserPrivate.visitDesktop( 301 appWindow.contentWindow.chrome.fileManagerPrivate.visitDesktop(
302 profileId, function() { 302 profileId, function() {
303 appWindow.focus(); 303 appWindow.focus();
304 }); 304 });
305 }); 305 });
306 }; 306 };
307 307
308 /** 308 /**
309 * Shift distance to avoid overlapping windows. 309 * Shift distance to avoid overlapping windows.
310 * @type {number} 310 * @type {number}
311 * @const 311 * @const
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
941 contexts: ['launcher'], 941 contexts: ['launcher'],
942 title: str('NEW_WINDOW_BUTTON_LABEL') 942 title: str('NEW_WINDOW_BUTTON_LABEL')
943 }); 943 });
944 }; 944 };
945 945
946 /** 946 /**
947 * Singleton instance of Background. 947 * Singleton instance of Background.
948 * @type {Background} 948 * @type {Background}
949 */ 949 */
950 window.background = new Background(); 950 window.background = new Background();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698