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

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

Issue 12313142: Revert 184837 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 10 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 binding for the chrome.app.runtime API. 5 // Custom bindings for the chrome.app.runtime API.
6
7 var binding = require('binding').Binding.create('app.runtime');
8 6
9 var chromeHidden = requireNative('chrome_hidden').GetChromeHidden(); 7 var chromeHidden = requireNative('chrome_hidden').GetChromeHidden();
10 var chrome = requireNative('chrome').GetChrome();
11 var fileSystemHelpers = requireNative('file_system_natives'); 8 var fileSystemHelpers = requireNative('file_system_natives');
12 var GetIsolatedFileSystem = fileSystemHelpers.GetIsolatedFileSystem; 9 var GetIsolatedFileSystem = fileSystemHelpers.GetIsolatedFileSystem;
13 var appNatives = requireNative('app_runtime'); 10 var appNatives = requireNative('app_runtime');
14 var DeserializeString = appNatives.DeserializeString; 11 var DeserializeString = appNatives.DeserializeString;
15 var SerializeToString = appNatives.SerializeToString; 12 var SerializeToString = appNatives.SerializeToString;
16 var CreateBlob = appNatives.CreateBlob; 13 var CreateBlob = appNatives.CreateBlob;
17 14
18 chromeHidden.Event.registerArgumentMassager('app.runtime.onLaunched', 15 chromeHidden.Event.registerArgumentMassager('app.runtime.onLaunched',
19 function(args, dispatch) { 16 function(args, dispatch) {
20 var launchData = args[0]; 17 var launchData = args[0];
(...skipping 24 matching lines...) Expand all
45 }, function(fileError) { 42 }, function(fileError) {
46 itemLoaded(fileError); 43 itemLoaded(fileError);
47 }); 44 });
48 }); 45 });
49 } else if (launchData) { 46 } else if (launchData) {
50 dispatch([launchData]); 47 dispatch([launchData]);
51 } else { 48 } else {
52 dispatch([]); 49 dispatch([]);
53 } 50 }
54 }); 51 });
55
56 exports.binding = binding.generate();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698