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

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

Issue 12712006: Enable print forwarding. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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
« no previous file with comments | « no previous file | no next file » | 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) 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 29 matching lines...) Expand all
40 static bool isMap(obj) => obj is Map; 40 static bool isMap(obj) => obj is Map;
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 SendPort spawnDomFunctionImpl(Function topLevelFunction) native "Utils_ spawnDomFunction"; 51 static SendPort spawnDomFunctionImpl(Function topLevelFunction) native "Utils_ spawnDomFunction";
51 static int _getNewIsolateId() native "Utils_getNewIsolateId"; 52 static int _getNewIsolateId() native "Utils_getNewIsolateId";
52 static bool shadowRootSupported(Document document) native "Utils_shadowRootSup ported"; 53 static bool shadowRootSupported(Document document) native "Utils_shadowRootSup ported";
53 } 54 }
54 55
55 class _NPObject extends NativeFieldWrapperClass1 { 56 class _NPObject extends NativeFieldWrapperClass1 {
56 _NPObject.internal(); 57 _NPObject.internal();
57 static _NPObject retrieve(String key) native "NPObject_retrieve"; 58 static _NPObject retrieve(String key) native "NPObject_retrieve";
58 property(String propertyName) native "NPObject_property"; 59 property(String propertyName) native "NPObject_property";
59 invoke(String methodName, [List args = null]) native "NPObject_invoke"; 60 invoke(String methodName, [List args = null]) native "NPObject_invoke";
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 bool get isEmpty => Maps.isEmpty(this); 120 bool get isEmpty => Maps.isEmpty(this);
120 } 121 }
121 122
122 get _printClosure => (s) { 123 get _printClosure => (s) {
123 try { 124 try {
124 window.console.log(s); 125 window.console.log(s);
125 } catch (_) { 126 } catch (_) {
126 _Utils.print(s); 127 _Utils.print(s);
127 } 128 }
128 }; 129 };
130
131 final _forwardingPrintClosure = _Utils.forwardingPrint;
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698