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

Unified Diff: content/browser/service_worker/service_worker_global_scope_host_impl.h

Issue 2168513004: [DO NOT COMMIT] ServiceWorker: First touch of mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove an unnecessary file Created 4 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/browser/service_worker/service_worker_global_scope_host_impl.h
diff --git a/content/browser/service_worker/service_worker_global_scope_host_impl.h b/content/browser/service_worker/service_worker_global_scope_host_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..127b01873e99af3e2f4b186b7684390da5c37e3a
--- /dev/null
+++ b/content/browser/service_worker/service_worker_global_scope_host_impl.h
@@ -0,0 +1,47 @@
+// Copyright 2016 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_BROWSER_SERVICE_WORKER_SERVICE_WORKER_GLOBAL_SCOPE_HOST_IMPL_H_
+#define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_GLOBAL_SCOPE_HOST_IMPL_H_
+
+#include "base/macros.h"
+#include "base/memory/weak_ptr.h"
+#include "content/common/service_worker/service_worker_status_code.h"
+#include "mojo/public/cpp/bindings/strong_binding.h"
+#include "third_party/WebKit/public/platform/modules/serviceworker/service_worker_global_scope.mojom.h"
+#include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerEventResult.h"
+
+namespace content {
+
+class ServiceWorkerVersion;
+
+class ServiceWorkerGlobalScopeHostImpl :
+ public blink::mojom::ServiceWorkerGlobalScopeHost {
+
+ public:
+ static void Create(
+ base::WeakPtr<ServiceWorkerVersion> version,
+ blink::mojom::ServiceWorkerGlobalScopeHostRequest request);
+
+ private:
+ ServiceWorkerGlobalScopeHostImpl(
+ base::WeakPtr<ServiceWorkerVersion> version,
+ blink::mojom::ServiceWorkerGlobalScopeHostRequest request);
+ ~ServiceWorkerGlobalScopeHostImpl() override;
+
+ void SetClient(
+ blink::mojom::ServiceWorkerGlobalScopeClientPtr client) override;
+ void DidHandleSimpleEvent(int request_id,
+ ServiceWorkerStatusCode status) override;
+
+ base::WeakPtr<ServiceWorkerVersion> version_;
+ mojo::StrongBinding<blink::mojom::ServiceWorkerGlobalScopeHost> binding_;
+
+ DISALLOW_COPY_AND_ASSIGN(ServiceWorkerGlobalScopeHostImpl);
+};
+
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_GLOBAL_SCOPE_HOST_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698