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

Side by Side Diff: ui/file_manager/gallery/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
« no previous file with comments | « ui/file_manager/file_manager/manifest.json ('k') | ui/file_manager/gallery/js/gallery.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 * @param {Object.<string, string>} stringData String data. 8 * @param {Object.<string, string>} stringData String data.
9 * @param {VolumeManager} volumeManager Volume manager. 9 * @param {VolumeManager} volumeManager Volume manager.
10 */ 10 */
(...skipping 12 matching lines...) Expand all
23 23
24 Object.freeze(this); 24 Object.freeze(this);
25 } 25 }
26 26
27 /** 27 /**
28 * Loads background component. 28 * Loads background component.
29 * @return {Promise} Promise fulfilled with BackgroundComponents. 29 * @return {Promise} Promise fulfilled with BackgroundComponents.
30 */ 30 */
31 BackgroundComponents.load = function() { 31 BackgroundComponents.load = function() {
32 var stringDataPromise = new Promise(function(fulfill) { 32 var stringDataPromise = new Promise(function(fulfill) {
33 chrome.fileBrowserPrivate.getStrings(function(stringData) { 33 chrome.fileManagerPrivate.getStrings(function(stringData) {
34 loadTimeData.data = stringData; 34 loadTimeData.data = stringData;
35 fulfill(stringData); 35 fulfill(stringData);
36 }); 36 });
37 }); 37 });
38 38
39 // VolumeManager should be obtained after stringData initialized. 39 // VolumeManager should be obtained after stringData initialized.
40 var volumeManagerPromise = stringDataPromise.then(function() { 40 var volumeManagerPromise = stringDataPromise.then(function() {
41 return new Promise(function(fulfill) { 41 return new Promise(function(fulfill) {
42 VolumeManager.getInstance(fulfill); 42 VolumeManager.getInstance(fulfill);
43 }); 43 });
(...skipping 11 matching lines...) Expand all
55 */ 55 */
56 var backgroundComponentsPromise = BackgroundComponents.load(); 56 var backgroundComponentsPromise = BackgroundComponents.load();
57 57
58 /** 58 /**
59 * Resolves file system names and obtains entries. 59 * Resolves file system names and obtains entries.
60 * @param {Array.<FileEntry>} entries Names of isolated file system. 60 * @param {Array.<FileEntry>} entries Names of isolated file system.
61 * @return {Promise} Promise to be fulfilled with an entry array. 61 * @return {Promise} Promise to be fulfilled with an entry array.
62 */ 62 */
63 function resolveEntries(entries) { 63 function resolveEntries(entries) {
64 return new Promise(function(fulfill, reject) { 64 return new Promise(function(fulfill, reject) {
65 chrome.fileBrowserPrivate.resolveIsolatedEntries(entries, 65 chrome.fileManagerPrivate.resolveIsolatedEntries(entries,
66 function(externalEntries) { 66 function(externalEntries) {
67 if (!chrome.runtime.lastError) 67 if (!chrome.runtime.lastError)
68 fulfill(externalEntries); 68 fulfill(externalEntries);
69 else 69 else
70 reject(chrome.runtime.lastError); 70 reject(chrome.runtime.lastError);
71 }); 71 });
72 }); 72 });
73 } 73 }
74 74
75 /** 75 /**
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 chrome.runtime.onMessageExternal.addListener(function(message) { 207 chrome.runtime.onMessageExternal.addListener(function(message) {
208 if (message.name !== 'testResourceLoaded') 208 if (message.name !== 'testResourceLoaded')
209 return; 209 return;
210 var script = document.createElement('script'); 210 var script = document.createElement('script');
211 script.src = 211 script.src =
212 'chrome-extension://' + window.testExtensionId + 212 'chrome-extension://' + window.testExtensionId +
213 '/common/test_loader.js'; 213 '/common/test_loader.js';
214 document.documentElement.appendChild(script); 214 document.documentElement.appendChild(script);
215 }); 215 });
216 } 216 }
OLDNEW
« no previous file with comments | « ui/file_manager/file_manager/manifest.json ('k') | ui/file_manager/gallery/js/gallery.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698