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 | 4 |
5 // Use the <code>chrome.alarms</code> API to schedule code to run | 5 // Use the <code>chrome.alarms</code> API to schedule code to run |
6 // periodically or at a specified time in the future. | 6 // periodically or at a specified time in the future. |
7 namespace alarms { | 7 namespace alarms { |
8 dictionary Alarm { | 8 dictionary Alarm { |
9 // Name of this alarm. | 9 // Name of this alarm. |
10 DOMString name; | 10 DOMString name; |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 // Clears all alarms. | 87 // Clears all alarms. |
88 static void clearAll(optional ClearCallback callback); | 88 static void clearAll(optional ClearCallback callback); |
89 }; | 89 }; |
90 | 90 |
91 interface Events { | 91 interface Events { |
92 // Fired when an alarm has elapsed. Useful for event pages. | 92 // Fired when an alarm has elapsed. Useful for event pages. |
93 // |alarm|: The alarm that has elapsed. | 93 // |alarm|: The alarm that has elapsed. |
94 static void onAlarm(Alarm alarm); | 94 static void onAlarm(Alarm alarm); |
95 }; | 95 }; |
96 }; | 96 }; |
OLD | NEW |