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

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

Issue 10834261: Move chrome.experimental.app.onLaunched event handler to chrome.app.runtime.onLaunched. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Another merge before retrying commit. Created 8 years, 4 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 // Custom bindings for the experimental.app API. 5 // Custom bindings for the chrome.app.runtime API.
6 6
7 var chromeHidden = requireNative('chrome_hidden').GetChromeHidden(); 7 var chromeHidden = requireNative('chrome_hidden').GetChromeHidden();
8 var fileSystemHelpers = requireNative('file_system_natives'); 8 var fileSystemHelpers = requireNative('file_system_natives');
9 var GetIsolatedFileSystem = fileSystemHelpers.GetIsolatedFileSystem; 9 var GetIsolatedFileSystem = fileSystemHelpers.GetIsolatedFileSystem;
10 var appNatives = requireNative('experimental_app'); 10 var appNatives = requireNative('app_runtime');
11 var DeserializeString = appNatives.DeserializeString; 11 var DeserializeString = appNatives.DeserializeString;
12 var CreateBlob = appNatives.CreateBlob; 12 var CreateBlob = appNatives.CreateBlob;
13 13
14 chromeHidden.Event.registerArgumentMassager('experimental.app.onLaunched', 14 chromeHidden.Event.registerArgumentMassager('app.runtime.onLaunched',
15 function(args, dispatch) { 15 function(args, dispatch) {
16 var launchData = args[0]; 16 var launchData = args[0];
17 var intentData = args[1]; 17 var intentData = args[1];
18 18
19 if (launchData && intentData) { 19 if (launchData && intentData) {
20 switch(intentData.format) { 20 switch(intentData.format) {
21 case('fileEntry'): 21 case('fileEntry'):
22 var fs = GetIsolatedFileSystem(intentData.fileSystemId); 22 var fs = GetIsolatedFileSystem(intentData.fileSystemId);
23 try { 23 try {
24 fs.root.getFile(intentData.baseName, {}, function(fileEntry) { 24 fs.root.getFile(intentData.baseName, {}, function(fileEntry) {
(...skipping 28 matching lines...) Expand all
53 default: 53 default:
54 console.error('Unexpected launch data format'); 54 console.error('Unexpected launch data format');
55 dispatch([]); 55 dispatch([]);
56 } 56 }
57 } else if (launchData) { 57 } else if (launchData) {
58 dispatch([launchData]); 58 dispatch([launchData]);
59 } else { 59 } else {
60 dispatch([]); 60 dispatch([]);
61 } 61 }
62 }); 62 });
OLDNEW
« no previous file with comments | « chrome/renderer/renderer_resources.grd ('k') | chrome/renderer/resources/extensions/experimental.app_custom_bindings.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698