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

Unified Diff: sdk/lib/html/templates/html/impl/impl_EventTarget.darttemplate

Issue 11365019: Merging dart:html interfaces and implementations (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixing merged classes in dartium not compiling under dartc. Created 8 years, 1 month 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
Index: sdk/lib/html/templates/html/impl/impl_EventTarget.darttemplate
diff --git a/sdk/lib/html/templates/html/impl/impl_EventTarget.darttemplate b/sdk/lib/html/templates/html/impl/impl_EventTarget.darttemplate
index 23e8f5b9dcfbd8ca068e89ab2aee85daf7ec49b5..cc89779fe842d1839b33528f1e0b16a76520d297 100644
--- a/sdk/lib/html/templates/html/impl/impl_EventTarget.darttemplate
+++ b/sdk/lib/html/templates/html/impl/impl_EventTarget.darttemplate
@@ -2,36 +2,33 @@
// 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.
-class _EventsImpl implements Events {
+class Events {
/* Raw event target. */
- // TODO(jacobr): it would be nice if we could specify this as
- // _EventTargetImpl or EventTarget
- final _ptr;
+ final EventTarget _ptr;
- _EventsImpl(this._ptr);
+ Events(this._ptr);
- _EventListenerListImpl operator [](String type) {
- return new _EventListenerListImpl(_ptr, type);
+ EventListenerList operator [](String type) {
+ return new EventListenerList(_ptr, type);
}
}
-class _EventListenerListImpl implements EventListenerList {
+class EventListenerList {
- // TODO(jacobr): make this _EventTargetImpl
- final _ptr;
+ final EventTarget _ptr;
final String _type;
- _EventListenerListImpl(this._ptr, this._type);
+ EventListenerList(this._ptr, this._type);
// TODO(jacobr): implement equals.
- _EventListenerListImpl add(EventListener listener,
+ EventListenerList add(EventListener listener,
[bool useCapture = false]) {
_add(listener, useCapture);
return this;
}
- _EventListenerListImpl remove(EventListener listener,
+ EventListenerList remove(EventListener listener,
[bool useCapture = false]) {
_remove(listener, useCapture);
return this;
@@ -53,6 +50,7 @@ class _EventListenerListImpl implements EventListenerList {
class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
- Events get on => new _EventsImpl(this);
+ /** @domName EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent */
+ Events get on => new Events(this);
$!MEMBERS
}

Powered by Google App Engine
This is Rietveld 408576698