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

Side by Side Diff: chrome/common/extensions/api/experimental.alarms.idl

Issue 10217018: Alarm resolution changed to minutes and minimum delay added. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 8 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
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 // File-level comment to appease parser. Eventually this will not be necessary. 5 // File-level comment to appease parser. Eventually this will not be necessary.
6 // TODO(mpcomplete): We need documentation before we can release this. 6 // TODO(mpcomplete): We need documentation before we can release this.
7 7
8 namespace experimental.alarms { 8 namespace experimental.alarms {
9 dictionary Alarm { 9 dictionary Alarm {
10 // Name of this alarm. 10 // Name of this alarm.
11 DOMString name; 11 DOMString name;
12 12
13 // Original length of time in seconds after which the onAlarm event should 13 // Original length of time in minutes after which the onAlarm event should
14 // fire. 14 // fire. minimum = 5 minute.
Matt Perry 2012/04/25 19:11:06 Keep the "minimum" stuff as a TODO. What I meant w
Matt Tytel 2012/04/30 23:36:21 Done.
15 // TODO: need minimum=0 15 double delayInMinutes;
16 long delayInSeconds;
17 16
18 // True if the alarm repeatedly fires at regular intervals, false if it 17 // True if the alarm repeatedly fires at regular intervals, false if it
19 // only fires once. 18 // only fires once.
20 boolean repeating; 19 boolean repeating;
21 }; 20 };
22 21
23 // TODO(mpcomplete): rename to CreateInfo when http://crbug.com/123073 is 22 // TODO(mpcomplete): rename to CreateInfo when http://crbug.com/123073 is
24 // fixed. 23 // fixed.
25 dictionary AlarmCreateInfo { 24 dictionary AlarmCreateInfo {
26 // Length of time in seconds after which the onAlarm event should fire. 25 // Length of time in minutes after which the onAlarm event should fire.
27 // Note that granularity is not guaranteed: this value is more of a hint to 26 // Note that granularity is not guaranteed: this value is more of a hint to
28 // the browser. For performance reasons, alarms may be delayed an arbitrary 27 // the browser. For performance reasons, alarms may be delayed an arbitrary
29 // amount of time before firing. 28 // amount of time before firing. minimum = 1 minute.
30 // TODO: need minimum=0 29 double delayInMinutes;
31 long delayInSeconds;
32 30
33 // True if the alarm should repeatedly fire at regular intervals. Defaults 31 // True if the alarm should repeatedly fire at regular intervals. Defaults
34 // to false. 32 // to false.
35 boolean? repeating; 33 boolean? repeating;
36 }; 34 };
37 35
38 callback AlarmCallback = void (Alarm alarm); 36 callback AlarmCallback = void (Alarm alarm);
39 callback AlarmListCallback = void (Alarm[] alarms); 37 callback AlarmListCallback = void (Alarm[] alarms);
40 38
41 interface Functions { 39 interface Functions {
(...skipping 18 matching lines...) Expand all
60 // Clears all alarms. 58 // Clears all alarms.
61 static void clearAll(); 59 static void clearAll();
62 }; 60 };
63 61
64 interface Events { 62 interface Events {
65 // Fired when an alarm has elapsed. Useful for transient background pages. 63 // Fired when an alarm has elapsed. Useful for transient background pages.
66 // |alarm|: The alarm that has elapsed. 64 // |alarm|: The alarm that has elapsed.
67 static void onAlarm(Alarm alarm); 65 static void onAlarm(Alarm alarm);
68 }; 66 };
69 }; 67 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698