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

Side by Side Diff: tools/dom/src/native_DOMImplementation.dart

Issue 12887009: Support asynchronuous spawnDomFunction. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 part of html; 5 part of html;
6 6
7 class _Utils { 7 class _Utils {
8 static double dateTimeToDouble(DateTime dateTime) => 8 static double dateTimeToDouble(DateTime dateTime) =>
9 dateTime.millisecondsSinceEpoch.toDouble(); 9 dateTime.millisecondsSinceEpoch.toDouble();
10 static DateTime doubleToDateTime(double dateTime) { 10 static DateTime doubleToDateTime(double dateTime) {
(...skipping 30 matching lines...) Expand all
41 41
42 static Map createMap() => {}; 42 static Map createMap() => {};
43 43
44 static makeUnimplementedError(String fileName, int lineNo) { 44 static makeUnimplementedError(String fileName, int lineNo) {
45 return new UnsupportedError('[info: $fileName:$lineNo]'); 45 return new UnsupportedError('[info: $fileName:$lineNo]');
46 } 46 }
47 47
48 static window() native "Utils_window"; 48 static window() native "Utils_window";
49 static print(String message) native "Utils_print"; 49 static print(String message) native "Utils_print";
50 static forwardingPrint(String message) native "Utils_forwardingPrint"; 50 static forwardingPrint(String message) native "Utils_forwardingPrint";
51 static SendPort spawnDomFunctionImpl(Function topLevelFunction) native "Utils_ spawnDomFunction"; 51 static void spawnDomFunction(Function topLevelFunction, int replyTo) native "U tils_spawnDomFunction";
52 static int _getNewIsolateId() native "Utils_getNewIsolateId"; 52 static int _getNewIsolateId() native "Utils_getNewIsolateId";
53 static bool shadowRootSupported(Document document) native "Utils_shadowRootSup ported"; 53 static bool shadowRootSupported(Document document) native "Utils_shadowRootSup ported";
54 } 54 }
55 55
56 class _NPObject extends NativeFieldWrapperClass1 { 56 class _NPObject extends NativeFieldWrapperClass1 {
57 _NPObject.internal(); 57 _NPObject.internal();
58 static _NPObject retrieve(String key) native "NPObject_retrieve"; 58 static _NPObject retrieve(String key) native "NPObject_retrieve";
59 property(String propertyName) native "NPObject_property"; 59 property(String propertyName) native "NPObject_property";
60 invoke(String methodName, [List args = null]) native "NPObject_invoke"; 60 invoke(String methodName, [List args = null]) native "NPObject_invoke";
61 } 61 }
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 122
123 get _printClosure => (s) { 123 get _printClosure => (s) {
124 try { 124 try {
125 window.console.log(s); 125 window.console.log(s);
126 } catch (_) { 126 } catch (_) {
127 _Utils.print(s); 127 _Utils.print(s);
128 } 128 }
129 }; 129 };
130 130
131 final _forwardingPrintClosure = _Utils.forwardingPrint; 131 final _forwardingPrintClosure = _Utils.forwardingPrint;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698