summaryrefslogtreecommitdiffstats
path: root/extensions/common/api/mojo_private.idl
blob: 7a8ddd0621d7827e5b20f7a0d27482c512be4ce8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Copyright 2015 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.

// The chrome.mojoPrivate API provides access to the mojo modules.
namespace mojoPrivate {

  // |modules| is an array of the values returned by |dependencies| factories.
  callback DefineCallback = void (any[] modules);

  interface Functions {
    // Defines a AMD module.
    [nocompile] static void define(
        DOMString moduleName,
        optional DOMString[] dependencies,
        DefineCallback factory);

    // Returns a promise that will resolve to an asynchronously
    // loaded module.
    [nocompile] static any requireAsync(DOMString name);
  };

};