Refactor WebsiteSettings to operate on a SecurityInfo
[chromium-blink-merge.git] / content / renderer / background_sync / background_sync_client_impl.h
blobf9a06bed9288261e2dfd42382037d66e9fa6d196
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CONTENT_RENDERER_BACKGROUND_SYNC_BACKGROUND_SYNC_CLIENT_IMPL_H_
6 #define CONTENT_RENDERER_BACKGROUND_SYNC_BACKGROUND_SYNC_CLIENT_IMPL_H_
8 #include "base/compiler_specific.h"
9 #include "base/macros.h"
10 #include "content/common/background_sync_service.mojom.h"
11 #include "content/common/content_export.h"
12 #include "third_party/mojo/src/mojo/public/cpp/bindings/strong_binding.h"
14 namespace content {
16 class CONTENT_EXPORT BackgroundSyncClientImpl
17 : public NON_EXPORTED_BASE(BackgroundSyncServiceClient) {
18 public:
19 static void Create(
20 int64_t service_worker_registration_id,
21 mojo::InterfaceRequest<BackgroundSyncServiceClient> request);
23 ~BackgroundSyncClientImpl() override;
25 private:
26 using SyncCallback = mojo::Callback<void(ServiceWorkerEventStatus)>;
27 BackgroundSyncClientImpl(
28 int64_t service_worker_registration_id,
29 mojo::InterfaceRequest<BackgroundSyncServiceClient> request);
31 // BackgroundSyncServiceClient methods:
32 void Sync(int handle_id, const SyncCallback& callback) override;
33 void SyncDidGetRegistration(const SyncCallback& callback,
34 BackgroundSyncError error,
35 const SyncRegistrationPtr& registration);
37 int64_t service_worker_registration_id_;
38 mojo::StrongBinding<BackgroundSyncServiceClient> binding_;
40 DISALLOW_COPY_AND_ASSIGN(BackgroundSyncClientImpl);
43 } // namespace content
45 #endif // CONTENT_RENDERER_BACKGROUND_SYNC_BACKGROUND_SYNC_CLIENT_IMPL_H_