// 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.mojom; import "content/public/common/background_sync.mojom"; import "content/public/common/service_worker_event_status.mojom"; enum BackgroundSyncError { NONE, STORAGE, NOT_FOUND, NO_SERVICE_WORKER, NOT_ALLOWED, PERMISSION_DENIED, MAX=PERMISSION_DENIED }; enum BackgroundSyncState { PENDING, FIRING, REREGISTERED_WHILE_FIRING, }; enum BackgroundSyncEventLastChance { IS_NOT_LAST_CHANCE, IS_LAST_CHANCE }; interface BackgroundSyncService { Register(SyncRegistration options, int64 service_worker_registration_id) => (BackgroundSyncError err, SyncRegistration options); GetRegistrations(int64 service_worker_registration_id) => (BackgroundSyncError err, array registrations); }; interface BackgroundSyncServiceClient { Sync(string tag, BackgroundSyncEventLastChance last_chance) => (ServiceWorkerEventStatus status); };