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

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

Issue 8404013: Add constructors to all the event classes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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
Index: client/html/src/MouseEventWrappingImplementation.dart
diff --git a/client/html/generated/src/wrapping/_MouseEventWrappingImplementation.dart b/client/html/src/MouseEventWrappingImplementation.dart
similarity index 65%
rename from client/html/generated/src/wrapping/_MouseEventWrappingImplementation.dart
rename to client/html/src/MouseEventWrappingImplementation.dart
index 2131a3b09549d3692b0f779330daadef5a36992c..652c83afb9d404e397f40a9b1e54a90075fd09bc 100644
--- a/client/html/generated/src/wrapping/_MouseEventWrappingImplementation.dart
+++ b/client/html/src/MouseEventWrappingImplementation.dart
@@ -2,11 +2,21 @@
// 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 MouseEventWrappingImplementation extends UIEventWrappingImplementation implements MouseEvent {
MouseEventWrappingImplementation._wrap(ptr) : super._wrap(ptr) {}
+ factory MouseEventWrappingImplementation(String type, Window view, int detail,
+ int screenX, int screenY, int clientX, int clientY, int button,
+ [bool canBubble = false, bool cancelable = false, bool ctrlKey = false,
+ bool altKey = false, bool shiftKey = false, bool metaKey = false,
+ EventTarget relatedTarget = null]) {
+ var e = dom.document.createEvent("MouseEvent");
Jacob 2011/10/27 21:23:05 use final instead of var here and elsewhere
nweiz 2011/10/27 22:23:54 Done.
+ e.initMouseEvent(type, canBubble, cancelable, LevelDom.unwrap(view), detail,
+ screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, metaKey,
+ button, LevelDom.unwrap(relatedTarget));
+ return LevelDom.wrapMouseEvent(e);
+ }
+
bool get altKey() { return _ptr.altKey; }
int get button() { return _ptr.button; }
@@ -38,9 +48,4 @@ class MouseEventWrappingImplementation extends UIEventWrappingImplementation imp
int get x() { return _ptr.x; }
int get y() { return _ptr.y; }
-
- void initMouseEvent(String type, bool canBubble, bool cancelable, Window view, int detail, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, int button, EventTarget relatedTarget) {
- _ptr.initMouseEvent(type, canBubble, cancelable, LevelDom.unwrap(view), detail, screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, metaKey, button, LevelDom.unwrap(relatedTarget));
- return;
- }
}

Powered by Google App Engine
This is Rietveld 408576698