[sql] Remove _HAS_EXCEPTIONS=0 from build info.
[chromium-blink-merge.git] / chrome / browser / resources / cryptotoken / countdown.js
blob37460781b76d2ca3fe2fd3142df62485b2c46a4b
1 // Copyright 2014 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.
5 /**
6 * @fileoverview Provides a countdown-based timer interface.
7 */
8 'use strict';
10 /**
11 * A countdown timer.
12 * @interface
14 function Countdown() {}
16 /**
17 * Sets a new timeout for this timer.
18 * @param {number} timeoutMillis how long, in milliseconds, the countdown lasts.
19 * @param {Function=} cb called back when the countdown expires.
20 * @return {boolean} whether the timeout could be set.
22 Countdown.prototype.setTimeout = function(timeoutMillis, cb) {};
24 /** Clears this timer's timeout. Timers that are cleared become expired. */
25 Countdown.prototype.clearTimeout = function() {};
27 /**
28 * @return {number} how many milliseconds are remaining until the timer expires.
30 Countdown.prototype.millisecondsUntilExpired = function() {};
32 /** @return {boolean} whether the timer has expired. */
33 Countdown.prototype.expired = function() {};
35 /**
36 * Constructs a new clone of this timer, while overriding its callback.
37 * @param {Function=} cb callback for new timer.
38 * @return {!Countdown} new clone.
40 Countdown.prototype.clone = function(cb) {};
42 /**
43 * A factory to create countdown timers.
44 * @interface
46 function CountdownFactory() {}
48 /**
49 * Creates a new timer.
50 * @param {number} timeoutMillis How long, in milliseconds, the countdown lasts.
51 * @param {function()=} opt_cb Called back when the countdown expires.
52 * @return {!Countdown} The timer.
54 CountdownFactory.prototype.createTimer = function(timeoutMillis, opt_cb) {};