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

Unified Diff: client/html/src/MessageEventWrappingImplementation.dart

Issue 8404013: Add constructors to all the event classes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Regenerate release/html. Created 9 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « client/html/src/MessageEvent.dart ('k') | client/html/src/MouseEvent.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/html/src/MessageEventWrappingImplementation.dart
diff --git a/client/html/generated/src/wrapping/_MessageEventWrappingImplementation.dart b/client/html/src/MessageEventWrappingImplementation.dart
similarity index 51%
rename from client/html/generated/src/wrapping/_MessageEventWrappingImplementation.dart
rename to client/html/src/MessageEventWrappingImplementation.dart
index c196ea95a05af79a401e2637448a2978a9db1c6d..5364ceb61817398775f88309ecda2bdcfe0075b3 100644
--- a/client/html/generated/src/wrapping/_MessageEventWrappingImplementation.dart
+++ b/client/html/src/MessageEventWrappingImplementation.dart
@@ -2,20 +2,27 @@
// 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.
-// WARNING: Do not edit - generated code.
-
class MessageEventWrappingImplementation extends EventWrappingImplementation implements MessageEvent {
- MessageEventWrappingImplementation._wrap(ptr) : super._wrap(ptr) {}
+ MessageEventWrappingImplementation._wrap(ptr) : super._wrap(ptr);
+
+ factory MessageEventWrappingImplementation(String type, String data,
+ String origin, String lastEventId, Window source, MessagePort port,
+ [bool canBubble = true, bool cancelable = true]) {
+ final e = dom.document.createEvent("MessageEvent");
+ e.initMessageEvent(type, canBubble, cancelable, data, origin, lastEventId,
+ LevelDom.unwrap(source), LevelDom.unwrap(port));
+ return LevelDom.wrapMessageEvent(e);
+ }
- String get data() { return _ptr.data; }
+ String get data() => _ptr.data;
- String get lastEventId() { return _ptr.lastEventId; }
+ String get lastEventId() => _ptr.lastEventId;
- MessagePort get messagePort() { return LevelDom.wrapMessagePort(_ptr.messagePort); }
+ MessagePort get messagePort() => LevelDom.wrapMessagePort(_ptr.messagePort);
- String get origin() { return _ptr.origin; }
+ String get origin() => _ptr.origin;
- Window get source() { return LevelDom.wrapWindow(_ptr.source); }
+ Window get source() => LevelDom.wrapWindow(_ptr.source);
void initMessageEvent(String typeArg, bool canBubbleArg, bool cancelableArg, String dataArg, String originArg, String lastEventIdArg, Window sourceArg, MessagePort messagePort) {
_ptr.initMessageEvent(typeArg, canBubbleArg, cancelableArg, dataArg, originArg, lastEventIdArg, LevelDom.unwrap(sourceArg), LevelDom.unwrap(messagePort));
« no previous file with comments | « client/html/src/MessageEvent.dart ('k') | client/html/src/MouseEvent.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698