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

Unified Diff: chrome/common/extensions/api/alarms.idl

Issue 10545104: Refactor chrome.alarms interface to support absolute alarm deadlines. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/test_extension_system.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/api/alarms.idl
diff --git a/chrome/common/extensions/api/alarms.idl b/chrome/common/extensions/api/alarms.idl
index cd61d8696c7666faf4e5c7a06985fc1c1e159594..dc243dabacb30fa003acbe3b620e2292e4fa84f1 100644
--- a/chrome/common/extensions/api/alarms.idl
+++ b/chrome/common/extensions/api/alarms.idl
@@ -10,25 +10,37 @@ namespace alarms {
// Name of this alarm.
DOMString name;
- // Original length of time in minutes after which the onAlarm event should
- // fire.
- // TODO: need minimum=0
- double delayInMinutes;
+ // Time at which this alarm was scheduled to fire, in milliseconds past the
+ // epoch (e.g. Date.now() + n). For performance reasons, the alarm may have
+ // been delayed an arbitrary amount beyond this.
+ double scheduledTime;
- // True if the alarm repeatedly fires at regular intervals, false if it
- // only fires once.
- boolean repeating;
+ // If not null, the alarm was re-scheduled 'repeatAfterMinutes' minutes
+ // after it fired.
+ double? repeatAfterMinutes;
Aaron Boodman 2012/06/09 04:21:10 What is the purpose of this property?
Jeffrey Yasskin 2012/06/11 19:28:36 Checking whether it's set at all replaces the 'rep
};
// TODO(mpcomplete): rename to CreateInfo when http://crbug.com/123073 is
// fixed.
dictionary AlarmCreateInfo {
+ // Time at which the alarm should fire, in milliseconds past the epoch
+ // (e.g. Date.now() + n). Note that granularity is not guaranteed: this
+ // value is more of a hint to the browser. For performance reasons, alarms
+ // may be delayed an arbitrary amount of time before firing.
+ //
+ // This option may not be set if delayInMinutes is set or
Aaron Boodman 2012/06/09 04:21:10 How about just creating two methods: createOneShot
Jeffrey Yasskin 2012/06/11 19:28:36 Sure. How's this look?
+ // repeating is true.
+ double? approxTimeToFire;
Aaron Boodman 2012/06/09 04:21:10 I don't think the 'approx' qualifier is needed. Th
Jeffrey Yasskin 2012/06/11 19:28:36 Done.
+
// Length of time in minutes after which the onAlarm event should fire.
// Note that granularity is not guaranteed: this value is more of a hint to
// the browser. For performance reasons, alarms may be delayed an arbitrary
// amount of time before firing.
+ //
+ // This option may not be set if approxTimeToFire is set.
+ //
// TODO: need minimum=0
- double delayInMinutes;
+ double? delayInMinutes;
// True if the alarm should repeatedly fire at regular intervals. Defaults
// to false.
« no previous file with comments | « chrome/browser/extensions/test_extension_system.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698