OLD | NEW |
| (Empty) |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | |
2 // for details. All rights reserved. Use of this source code is governed by a | |
3 // BSD-style license that can be found in the LICENSE file. | |
4 | |
5 @patch | |
6 class Asset { | |
7 /// Call to request assets from the embedder. | |
8 @patch | |
9 static HashMap<String, Asset> request() { | |
10 Uint8List tarBytes = _requestAssets(); | |
11 if (tarBytes == null) { | |
12 return null; | |
13 } | |
14 List assetList = _decodeAssets(tarBytes); | |
15 HashMap<String, Asset> assets = new HashMap<String, Asset>(); | |
16 for (int i = 0; i < assetList.length; i += 2) { | |
17 var a = new Asset(assetList[i], assetList[i + 1]); | |
18 assets[a.name] = a; | |
19 } | |
20 return assets; | |
21 } | |
22 } | |
23 | |
24 List _decodeAssets(Uint8List data) native "VMService_DecodeAssets"; | |
25 | |
26 @patch | |
27 bool sendIsolateServiceMessage(SendPort sp, List m) | |
28 native "VMService_SendIsolateServiceMessage"; | |
29 @patch | |
30 void sendRootServiceMessage(List m) native "VMService_SendRootServiceMessage"; | |
31 @patch | |
32 void sendObjectRootServiceMessage(List m) | |
33 native "VMService_SendObjectRootServiceMessage"; | |
34 @patch | |
35 void _onStart() native "VMService_OnStart"; | |
36 @patch | |
37 void _onExit() native "VMService_OnExit"; | |
38 @patch | |
39 void onServerAddressChange(String address) | |
40 native "VMService_OnServerAddressChange"; | |
41 @patch | |
42 bool _vmListenStream(String streamId) native "VMService_ListenStream"; | |
43 @patch | |
44 void _vmCancelStream(String streamId) native "VMService_CancelStream"; | |
45 @patch | |
46 Uint8List _requestAssets() native "VMService_RequestAssets"; | |
47 @patch | |
48 void _spawnUriNotify(obj, String token) native "VMService_spawnUriNotify"; | |
OLD | NEW |