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

Side by Side Diff: chrome/browser/resources/settings/animation/transition.js

Issue 2072643002: MD Settings: animation interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: simplify Created 4 years, 5 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
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 /**
6 * @fileoverview
7 * Transitions are cancellable asynchronous state changes. A transition may
8 * compose web animations and other Transitions to manage a set of animations.
9 * Similar to Promises, they can initiate tasks after completion or
10 * cancellation.
11 */
12 cr.define('settings.animation', function() {
13 'use strict';
14
15 /**
16 * Base class for modular implementations of asynchronous transitions using
17 * web animations.
18 * @constructor
19 */
20 function Transition() {}
21
22 Transition.prototype = {
23 /**
24 * Starts the transition, including scheduling any animations.
25 * @return {!Promise} Convenient reference to |finished| for chaining.
26 */
27 play: function() {},
Dan Beam 2016/07/01 00:33:24 shouldn't this also be assertNotReached() or somet
michaelpg 2016/07/01 20:21:46 Done.
28
29 /**
30 * If the transition is still playing, immediately finishes it and resolves
31 * |finished|.
32 */
33 finish: assertNotReached,
34
35 /**
36 * If the transition is still playing, immediately cancels it and rejects
37 * |finished|.
38 */
39 cancel: assertNotReached,
40
41 /**
42 * Resolved or rejected when the transition is finished or canceled.
43 * @type {?Promise}
44 */
45 finished: null,
46 };
47
48 return {
49 Transition: Transition,
50 };
51 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698