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

Unified Diff: content/renderer/background_sync/background_sync_client_impl.h

Issue 1220943003: [Background Sync] Use Mojo IPC to fire background sync events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mek
Patch Set: Add connection error handler; make type converter safer. Created 5 years, 5 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/renderer/background_sync/background_sync_client_impl.h
diff --git a/content/renderer/background_sync/background_sync_client_impl.h b/content/renderer/background_sync/background_sync_client_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..2d45f05a65c36f9abbb9bed218b3c1f5f830d563
--- /dev/null
+++ b/content/renderer/background_sync/background_sync_client_impl.h
@@ -0,0 +1,39 @@
+// 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.
+
+#ifndef CONTENT_RENDERER_BACKGROUND_SYNC_BACKGROUND_SYNC_CLIENT_IMPL_H_
+#define CONTENT_RENDERER_BACKGROUND_SYNC_BACKGROUND_SYNC_CLIENT_IMPL_H_
+
+#include "base/memory/ref_counted.h"
jkarlin 2015/07/20 17:17:26 needed?
iclelland 2015/07/20 18:05:21 It provided two macros: NON_EXPORTED_BASE and DISA
+#include "content/common/background_sync_service.mojom.h"
+#include "content/common/content_export.h"
+#include "third_party/mojo/src/mojo/public/cpp/bindings/strong_binding.h"
+
+namespace content {
+
+class CONTENT_EXPORT BackgroundSyncClientImpl
+ : public NON_EXPORTED_BASE(BackgroundSyncServiceClient) {
+ public:
+ static void Create(
+ mojo::InterfaceRequest<BackgroundSyncServiceClient> request);
+
+ ~BackgroundSyncClientImpl() override;
+
+ private:
+ using SyncCallback = mojo::Callback<void(ServiceWorkerEventStatus)>;
+ explicit BackgroundSyncClientImpl(
+ mojo::InterfaceRequest<BackgroundSyncServiceClient> request);
+
+ // BackgroundSyncClient methods:
jkarlin 2015/07/20 17:17:25 BackgruondSyncServiceClient
iclelland 2015/07/20 18:05:21 I spent 5 minutes looking for the typo, before I s
+ void Sync(content::SyncRegistrationPtr registration,
+ const SyncCallback& callback) override;
+
+ mojo::StrongBinding<BackgroundSyncServiceClient> binding_;
+
+ DISALLOW_COPY_AND_ASSIGN(BackgroundSyncClientImpl);
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_BACKGROUND_SYNC_BACKGROUND_SYNC_CLIENT_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698