OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | |
5 // TODO(mpcomplete): We need documentation before we can release this. | 4 // TODO(mpcomplete): We need documentation before we can release this. |
6 | 5 |
6 // Use the <code>chrome.alarms</code> module to schedule code to run | |
7 // periodically or at a specified time in the future. | |
8 | |
9 [availability=22] | |
not at google - send to devlin
2013/04/02 10:29:39
We should be able to determine this automatically
epeterson
2013/04/03 00:36:35
If you're using preview.py, then this patch is onl
not at google - send to devlin
2013/04/03 00:41:14
Ah - makes sense, sorry about that. I was actually
| |
7 namespace alarms { | 10 namespace alarms { |
8 dictionary Alarm { | 11 dictionary Alarm { |
9 // Name of this alarm. | 12 // Name of this alarm. |
10 DOMString name; | 13 DOMString name; |
11 | 14 |
12 // Time at which this alarm was scheduled to fire, in milliseconds past the | 15 // Time at which this alarm was scheduled to fire, in milliseconds past the |
13 // epoch (e.g. <code>Date.now() + n</code>). For performance reasons, the | 16 // epoch (e.g. <code>Date.now() + n</code>). For performance reasons, the |
14 // alarm may have been delayed an arbitrary amount beyond this. | 17 // alarm may have been delayed an arbitrary amount beyond this. |
15 double scheduledTime; | 18 double scheduledTime; |
16 | 19 |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
88 // Clears all alarms. | 91 // Clears all alarms. |
89 static void clearAll(); | 92 static void clearAll(); |
90 }; | 93 }; |
91 | 94 |
92 interface Events { | 95 interface Events { |
93 // Fired when an alarm has elapsed. Useful for event pages. | 96 // Fired when an alarm has elapsed. Useful for event pages. |
94 // |alarm|: The alarm that has elapsed. | 97 // |alarm|: The alarm that has elapsed. |
95 static void onAlarm(Alarm alarm); | 98 static void onAlarm(Alarm alarm); |
96 }; | 99 }; |
97 }; | 100 }; |
OLD | NEW |