OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 // The chrome.mojoPrivate API provides access to the mojo modules. | 5 // The chrome.mojoPrivate API provides access to the mojo modules. |
6 namespace mojoPrivate { | 6 [use_movable_types=true] namespace mojoPrivate { |
7 | 7 |
8 // |modules| is an array of the values returned by |dependencies| factories. | 8 // |modules| is an array of the values returned by |dependencies| factories. |
9 callback DefineCallback = void (any[] modules); | 9 callback DefineCallback = void (any[] modules); |
10 | 10 |
11 interface Functions { | 11 interface Functions { |
12 // Defines a AMD module. | 12 // Defines a AMD module. |
13 [nocompile] static void define( | 13 [nocompile] static void define( |
14 DOMString moduleName, | 14 DOMString moduleName, |
15 optional DOMString[] dependencies, | 15 optional DOMString[] dependencies, |
16 DefineCallback factory); | 16 DefineCallback factory); |
17 | 17 |
18 // Returns a promise that will resolve to an asynchronously | 18 // Returns a promise that will resolve to an asynchronously |
19 // loaded module. | 19 // loaded module. |
20 [nocompile] static any requireAsync(DOMString name); | 20 [nocompile] static any requireAsync(DOMString name); |
21 }; | 21 }; |
22 | 22 |
23 }; | 23 }; |
OLD | NEW |