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

Unified Diff: content/common/background_sync.mojom

Issue 1106193002: Add Mojo types and service definitions for Background Sync API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
Index: content/common/background_sync.mojom
diff --git a/content/common/background_sync.mojom b/content/common/background_sync.mojom
new file mode 100644
index 0000000000000000000000000000000000000000..3ddfc838729dea9248066f5b3f4a042b72aead24
--- /dev/null
+++ b/content/common/background_sync.mojom
@@ -0,0 +1,30 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+module content.background_sync;
jkarlin 2015/04/27 18:25:11 I'd remove the namespace, and see comments below a
iclelland 2015/04/28 12:41:30 Done.
+
+enum SyncNetworkState {
+ Any,
+ AvoidCellular,
+ Online,
jkarlin 2015/04/27 18:25:11 These files are in chromium code and should use ch
iclelland 2015/04/28 12:41:30 The mojo bindings generator already prefixes these
+};
+
+enum SyncPowerState {
+ Auto,
+ AvoidDraining,
jkarlin 2015/04/27 18:25:11 SYNC_POWER_STATE_AUTO and SYNC_POWER_STATE_DRAININ
iclelland 2015/04/28 12:41:30 Done, as noted above (BACKGROUND_SYNC_POWER_STATE_
+};
+
+enum SyncPeriodicity {
+ Periodic,
jkarlin 2015/04/27 18:25:11 SYNC_PERIODICITY_PERIODIC and SYNC_PERIODICITY_ONE
iclelland 2015/04/28 12:41:30 Done, as noted above (BACKGROUND_SYNC_PERIODICITY_
+ OneShot,
+};
+
+struct SyncRegistration {
+ int64 id = -1;
+ SyncPeriodicity periodicity = OneShot;
+ string tag = "";
+ uint64 minPeriodMs = 0;
jkarlin 2015/04/27 18:25:11 min_period_ms
iclelland 2015/04/28 12:41:30 Done.
+ SyncNetworkState networkState = Online;
jkarlin 2015/04/27 18:25:11 network_state
iclelland 2015/04/28 12:41:30 Done.
+ SyncPowerState powerState = Auto;
jkarlin 2015/04/27 18:25:11 power_state
iclelland 2015/04/28 12:41:30 Done.
+};

Powered by Google App Engine
This is Rietveld 408576698