summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/resources/extensions/log_private_custom_bindings.js
blob: ae209d07ef7bfe6460cdf9cdfa92f3fe8c78027a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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();