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

Unified Diff: lib/isolate/timer_hook.dart

Issue 10827436: Revert "Unify dart:isolate." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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 | « lib/isolate/timer.dart ('k') | runtime/lib/isolate.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/isolate/timer_hook.dart
diff --git a/lib/isolate/timer.dart b/lib/isolate/timer_hook.dart
similarity index 66%
copy from lib/isolate/timer.dart
copy to lib/isolate/timer_hook.dart
index 76f98a1c2cd610ed00ffdbb84d6a6c1b65be3363..37286ac5f24e3a1b04ec3dde2696aeddbda73b71 100644
--- a/lib/isolate/timer.dart
+++ b/lib/isolate/timer_hook.dart
@@ -2,28 +2,6 @@
// 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.
-interface Timer default _TimerFactory {
- /**
- * Creates a new timer. The [callback] callback is invoked after
- * [milliSeconds] milliseconds.
- */
- Timer(int milliSeconds, void callback(Timer timer));
-
- /**
- * Creates a new repeating timer. The [callback] is invoked every
- * [milliSeconds] millisecond until cancelled.
- */
- Timer.repeating(int milliSeconds, void callback(Timer timer));
-
- /**
- * Cancels the timer.
- */
- void cancel();
-}
-
-// TODO(ajohnsen): Patch timer once we have support for patching named
-// factory constructors in the VM.
-
typedef Timer _TimerFactoryClosure(int milliSeconds,
void callback(Timer timer),
bool repeating);
@@ -31,6 +9,7 @@ typedef Timer _TimerFactoryClosure(int milliSeconds,
// _TimerFactory provides a hook which allows various implementations of this
// library to provide a concrete class for the Timer interface.
class _TimerFactory {
+
factory Timer(int milliSeconds, void callback(Timer timer)) {
if (_factory == null) {
throw new UnsupportedOperationException("Timer interface not supported.");
« no previous file with comments | « lib/isolate/timer.dart ('k') | runtime/lib/isolate.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698