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

Side by Side Diff: chrome/renderer/resources/extensions/app_runtime_custom_bindings.js

Issue 14912009: Support getEntryId for entries passed to apps as launch data. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 7 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 // Custom binding for the chrome.app.runtime API. 5 // Custom binding for the chrome.app.runtime API.
6 6
7 var binding = require('binding').Binding.create('app.runtime'); 7 var binding = require('binding').Binding.create('app.runtime');
8 8
9 var chromeHidden = requireNative('chrome_hidden').GetChromeHidden(); 9 var chromeHidden = requireNative('chrome_hidden').GetChromeHidden();
10 var chrome = requireNative('chrome').GetChrome(); 10 var chrome = requireNative('chrome').GetChrome();
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 dispatch([]); 67 dispatch([]);
68 } else { 68 } else {
69 var data = { id: launchData.id, items: items }; 69 var data = { id: launchData.id, items: items };
70 dispatch([data]); 70 dispatch([data]);
71 } 71 }
72 } 72 }
73 }; 73 };
74 forEach(launchData.items, function(i, item) { 74 forEach(launchData.items, function(i, item) {
75 var fs = GetIsolatedFileSystem(item.fileSystemId); 75 var fs = GetIsolatedFileSystem(item.fileSystemId);
76 fs.root.getFile(item.baseName, {}, function(fileEntry) { 76 fs.root.getFile(item.baseName, {}, function(fileEntry) {
77 entryIdManager.registerEntry(item.entryId, fileEntry);
77 itemLoaded(null, { entry: fileEntry, type: item.mimeType }); 78 itemLoaded(null, { entry: fileEntry, type: item.mimeType });
78 }, function(fileError) { 79 }, function(fileError) {
79 itemLoaded(fileError); 80 itemLoaded(fileError);
80 }); 81 });
81 }); 82 });
82 } else if (launchData) { 83 } else if (launchData) {
83 dispatch([launchData]); 84 dispatch([launchData]);
84 } else { 85 } else {
85 dispatch([]); 86 dispatch([]);
86 } 87 }
87 }); 88 });
88 89
89 exports.binding = binding.generate(); 90 exports.binding = binding.generate();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698