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

Side by Side Diff: client/html/src/WorkerWrappingImplementation.dart

Issue 9537001: Generate dart:html bindings for Dartium as well as Frog. All unittests now pass (or are disabled fo… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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
OLDNEW
(Empty)
1 // Copyright (c) 2011, 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 class WorkerEventsImplementation extends AbstractWorkerEventsImplementation
6 implements WorkerEvents {
7 WorkerEventsImplementation._wrap(_ptr) : super._wrap(_ptr);
8
9 EventListenerList get message() => _get('message');
10 }
11
12 class WorkerWrappingImplementation extends EventTargetWrappingImplementation imp lements Worker {
13 WorkerWrappingImplementation._wrap(ptr) : super._wrap(ptr) {}
14
15 void postMessage(String message, [MessagePort messagePort = null]) {
16 if (messagePort === null) {
17 _ptr.postMessage(message);
18 return;
19 } else {
20 _ptr.postMessage(message, LevelDom.unwrap(messagePort));
21 return;
22 }
23 }
24
25 void terminate() {
26 _ptr.terminate();
27 return;
28 }
29
30 WorkerEvents get on() {
31 if (_on === null) {
32 _on = new WorkerEventsImplementation._wrap(_ptr);
33 }
34 return _on;
35 }
36 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698