| // Copyright 2018 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 blink.mojom; |
| |
| import "services/network/public/mojom/restricted_cookie_manager.mojom"; |
| import "url/mojom/url.mojom"; |
| |
| struct CookieChangeSubscription { |
| url.mojom.Url url; |
| network.mojom.CookieMatchType match_type; |
| string name; |
| }; |
| |
| // Tracks ServiceWorker subscriptions to cookie changes. |
| // |
| // Most code should access the cookie store via the RestrictedCookieManager |
| // interface in //services/network. This interface manages service worker |
| // subscriptions to cookie changes, which currently fall outside the network |
| // service's scope. The implementation lives in the browser process, because it |
| // has the ability to wake up service workers in order to dispatch events to |
| // them. |
| interface CookieStore { |
| // Adds the given subscriptions to the registration's subscription list. |
| AppendSubscriptions( |
| int64 service_worker_registration_id, |
| array<CookieChangeSubscription> subscriptions) => (bool success); |
| |
| // Returns all cookie change subscriptions for a service worker registration. |
| GetSubscriptions(int64 service_worker_registration_id) |
| => (array<CookieChangeSubscription> subscriptions, bool success); |
| }; |