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

Unified Diff: lib/html/dartium/html_dartium.dart

Issue 10918059: Changing websocket API to make it possible to send array buffers. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Sync to latest. Created 8 years, 3 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:
Download patch
« lib/dom/idl/dart/dart.idl ('K') | « lib/html/dart2js/html_dart2js.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/html/dartium/html_dartium.dart
diff --git a/lib/html/dartium/html_dartium.dart b/lib/html/dartium/html_dartium.dart
index 29f80ca1a3919bfa5571d4dbda3ad8d64d9025ac..ca3b9fcd82bd84ae0965736b988064dfd1cc0542 100644
--- a/lib/html/dartium/html_dartium.dart
+++ b/lib/html/dartium/html_dartium.dart
@@ -20629,7 +20629,7 @@ class _WebSocketImpl extends _EventTargetImpl implements WebSocket {
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native "WebSocket_removeEventListener_Callback";
- bool send(String data) native "WebSocket_send_Callback";
+ bool send(data) native "WebSocket_send_Callback";
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -39070,7 +39070,7 @@ interface WebSocket extends EventTarget default _WebSocketFactoryProvider {
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]);
/** @domName WebSocket.send */
- bool send(String data);
+ bool send(/*custom*/ data);
}
interface WebSocketEvents extends Events {
@@ -40512,22 +40512,21 @@ class _Timer implements Timer {
void cancel() { canceller(); }
}
-_getTimerFactoryClosure() =>
- (int milliSeconds, void callback(Timer timer), bool repeating) {
- var maker;
- var canceller;
- if (repeating) {
- maker = window.setInterval;
- canceller = window.clearInterval;
- } else {
- maker = window.setTimeout;
- canceller = window.clearTimeout;
- }
- Timer timer;
- final int id = maker(() { callback(timer); }, milliSeconds);
- timer = new _Timer(() { canceller(id); });
- return timer;
- };
+get _timerFactoryClosure => (int milliSeconds, void callback(Timer timer), bool repeating) {
+ var maker;
+ var canceller;
+ if (repeating) {
+ maker = window.setInterval;
+ canceller = window.clearInterval;
+ } else {
+ maker = window.setTimeout;
+ canceller = window.clearTimeout;
+ }
+ Timer timer;
+ final int id = maker(() { callback(timer); }, milliSeconds);
+ timer = new _Timer(() { canceller(id); });
+ return timer;
+};
// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
@@ -41772,12 +41771,11 @@ class _Utils {
}
static window() native "Utils_window";
+ static print(String message) native "Utils_print";
static SendPort spawnDomFunctionImpl(Function topLevelFunction) native "Utils_spawnDomFunction";
static int _getNewIsolateId() native "Utils_getNewIsolateId";
}
-Utils_print(String message) native "Utils_print";
-
class _NPObject extends NativeFieldWrapperClass1 {
_NPObject();
static _NPObject retrieve(String key) native "NPObject_retrieve";
@@ -41845,3 +41843,11 @@ class _DOMStringMapImpl extends NativeFieldWrapperClass1 implements Map<String,
int get length() => Maps.length(this);
bool isEmpty() => Maps.isEmpty(this);
}
+
+get _printClosure => (s) {
+ try {
+ window.console.log(s);
+ } on Dynamic catch(_) {
+ _Utils.print(s);
+ }
+};
« lib/dom/idl/dart/dart.idl ('K') | « lib/html/dart2js/html_dart2js.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698