blob: 245c198622f7ccf2a0e0e56ab5f4afaf7daf1079 [file] [log] [blame]
// 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.
#include "base/callback.h"
#include "content/common/content_export.h"
#include "content/public/browser/web_contents.h"
#include "third_party/blink/public/mojom/service_worker/service_worker_provider_type.mojom.h"
namespace content {
// Holds information about a single service worker client:
struct CONTENT_EXPORT ServiceWorkerClientInfo {
int process_id,
int route_id,
const base::RepeatingCallback<WebContents*(void)>& web_contents_getter,
blink::mojom::ServiceWorkerProviderType type);
ServiceWorkerClientInfo(const ServiceWorkerClientInfo& other);
// The renderer process this client lives in.
int process_id;
// If this client is a document |route_id| is its frame id; otherwise it is
int route_id;
// Non-null if this client is a document and its corresponding
// ServiceWorkerProviderHost was pre-created for a navigation. Returns
// information indicating the tab where the navigation is occurring or
// occurred in.
base::RepeatingCallback<WebContents*(void)> web_contents_getter;
// The client type.
blink::mojom::ServiceWorkerProviderType type;
} // namespace content