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

Side by Side Diff: client/base/Env.dart

Issue 9382027: Move client/{base, observable, layout, touch, util, view} to samples/ui_lib . (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 8 years, 10 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
« no previous file with comments | « client/base/DomWrapper.dart ('k') | client/base/Size.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 /**
6 * This class has static fields that hold objects that this isolate
7 * uses to interact with the environment. Which objects are available
8 * depend on how the isolate was started. In the UI isolate
9 * of the browser, the window object is available.
10 */
11 class Env {
12 static AnimationScheduler _animationScheduler;
13
14 /**
15 * Provides functionality similar to [:window.requestAnimationFrame:] for
16 * all platforms. [callback] is executed on the next animation frame that
17 * occurs at or after [minTime]. If [minTime] is not specified, the first
18 * available animation frame is used. Returns an id that can be used to
19 * cancel the pending callback.
20 */
21 static int requestAnimationFrame(AnimationCallback callback,
22 [Element element = null,
23 num minTime = null]) {
24 if (_animationScheduler == null) {
25 _animationScheduler = new AnimationScheduler();
26 }
27 return _animationScheduler.requestAnimationFrame(
28 callback, element, minTime);
29 }
30
31 /**
32 * Cancel the pending callback callback matching the specified [id].
33 */
34 static void cancelRequestAnimationFrame(int id) {
35 window.clearTimeout(id);
36 _animationScheduler.cancelRequestAnimationFrame(id);
37 }
38 }
39
40 typedef void XMLHttpRequestCompleted(XMLHttpRequest req);
OLDNEW
« no previous file with comments | « client/base/DomWrapper.dart ('k') | client/base/Size.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698