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

Side by Side Diff: runtime/lib/vmservice_patch.dart

Issue 1640773005: Make it possible to share the embedder's dart sources for the vmservice (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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 unified diff | Download patch
« no previous file with comments | « runtime/lib/vmservice.cc ('k') | runtime/vm/bootstrap_natives.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 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 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 patch class Asset { 5 patch class Asset {
6 /// Call to request assets from the embedder. 6 /// Call to request assets from the embedder.
7 /* patch */ static HashMap<String, Asset> request() { 7 /* patch */ static HashMap<String, Asset> request() {
8 HashMap<String, Asset> assets = new HashMap<String, Asset>(); 8 HashMap<String, Asset> assets = new HashMap<String, Asset>();
9 Uint8List tarBytes = _requestAssets(); 9 Uint8List tarBytes = _requestAssets();
10 if (tarBytes == null) { 10 if (tarBytes == null) {
11 return assets; 11 return assets;
12 } 12 }
13 List assetList = _decodeAssets(tarBytes); 13 List assetList = _decodeAssets(tarBytes);
14 for (int i = 0; i < assetList.length; i += 2) { 14 for (int i = 0; i < assetList.length; i += 2) {
15 var a = new Asset(assetList[i], assetList[i + 1]); 15 var a = new Asset(assetList[i], assetList[i + 1]);
16 assets[a.name] = a; 16 assets[a.name] = a;
17 } 17 }
18 return assets; 18 return assets;
19 } 19 }
20 } 20 }
21 21
22 List _decodeAssets(Uint8List data) native "VMService_DecodeAssets"; 22 List _decodeAssets(Uint8List data) native "VMService_DecodeAssets";
23 23
24 patch bool sendIsolateServiceMessage(SendPort sp, List m) 24 patch bool sendIsolateServiceMessage(SendPort sp, List m)
25 native "VMService_SendIsolateServiceMessage"; 25 native "VMService_SendIsolateServiceMessage";
26 patch void sendRootServiceMessage(List m) 26 patch void sendRootServiceMessage(List m)
27 native "VMService_SendRootServiceMessage"; 27 native "VMService_SendRootServiceMessage";
28 patch void _onStart() native "VMService_OnStart"; 28 patch void _onStart() native "VMService_OnStart";
29 patch void _onExit() native "VMService_OnExit"; 29 patch void _onExit() native "VMService_OnExit";
30 patch void onServerAddressChange(String address)
31 native "VMService_OnServerAddressChange";
30 patch bool _vmListenStream(String streamId) native "VMService_ListenStream"; 32 patch bool _vmListenStream(String streamId) native "VMService_ListenStream";
31 patch void _vmCancelStream(String streamId) native "VMService_CancelStream"; 33 patch void _vmCancelStream(String streamId) native "VMService_CancelStream";
32 patch Uint8List _requestAssets() native "VMService_RequestAssets"; 34 patch Uint8List _requestAssets() native "VMService_RequestAssets";
OLDNEW
« no previous file with comments | « runtime/lib/vmservice.cc ('k') | runtime/vm/bootstrap_natives.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698