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

Unified Diff: chrome/renderer/resources/extensions/log_private_custom_bindings.js

Issue 329853010: Additional methods for chrome.logPrivate API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/resources/extensions/log_private_custom_bindings.js
diff --git a/chrome/renderer/resources/extensions/log_private_custom_bindings.js b/chrome/renderer/resources/extensions/log_private_custom_bindings.js
new file mode 100644
index 0000000000000000000000000000000000000000..ae209d07ef7bfe6460cdf9cdfa92f3fe8c78027a
--- /dev/null
+++ b/chrome/renderer/resources/extensions/log_private_custom_bindings.js
@@ -0,0 +1,26 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Custom binding for the logPrivate API.
+var binding = require('binding').Binding.create('logPrivate');
+var sendRequest = require('sendRequest');
+
+var getFileBindingsForApi =
+ require('fileEntryBindingUtil').getFileBindingsForApi;
+var fileBindings = getFileBindingsForApi('logPrivate');
+var bindFileEntryCallback = fileBindings.bindFileEntryCallback;
+
+binding.registerCustomHook(function(bindingsAPI) {
+ var apiFunctions = bindingsAPI.apiFunctions;
+ var fileSystem = bindingsAPI.compiledApi;
+
+ $Array.forEach(['dumpLogs'],
+ function(functionName) {
+ bindFileEntryCallback(functionName, apiFunctions);
+ });
+
+});
+
+exports.bindFileEntryCallback = bindFileEntryCallback;
+exports.binding = binding.generate();
« no previous file with comments | « chrome/renderer/resources/extensions/file_system_custom_bindings.js ('k') | chrome/renderer/resources/renderer_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698