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

Unified Diff: Source/platform/serviceworkers/ServiceWorkerRegistrationProxy.h

Issue 478693005: Oilpan: Ship Oilpan for serviceworkers/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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: Source/platform/serviceworkers/ServiceWorkerRegistrationProxy.h
diff --git a/Source/platform/serviceworkers/ServiceWorkerRegistrationProxy.h b/Source/platform/serviceworkers/ServiceWorkerRegistrationProxy.h
new file mode 100644
index 0000000000000000000000000000000000000000..32e6436747ab3436d37606c805c07aeed920fa5d
--- /dev/null
+++ b/Source/platform/serviceworkers/ServiceWorkerRegistrationProxy.h
@@ -0,0 +1,43 @@
+// Copyright 2014 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 ServiceWorkerRegistrationProxy_h
+#define ServiceWorkerRegistrationProxy_h
+
+#include "platform/heap/Handle.h"
+#include "public/platform/WebServiceWorkerRegistrationProxy.h"
+
+namespace blink {
+
+class ServiceWorkerRegistration;
+
+class PLATFORM_EXPORT ServiceWorkerRegistrationProxy FINAL : public GarbageCollected<ServiceWorkerRegistrationProxy> {
+public:
+ static ServiceWorkerRegistrationProxy* create(ServiceWorkerRegistration* registration)
+ {
+ return new ServiceWorkerRegistrationProxy(registration);
+ }
+
+ ServiceWorkerRegistration* registration() const { return m_registration; }
+
+ void trace(Visitor* visitor) { }
+
+private:
+ explicit ServiceWorkerRegistrationProxy(ServiceWorkerRegistration* registration)
+ : m_registration(registration)
+ {
+ }
+
+ // Ideally we want to make this a Member<ServiceWorkerRegistration>, but we cannot do it
+ // because it requires to include modules/serviceworkers/ServiceWorkerRegistration.h.
+ // This violates the include dependency rule.
+ // Using a raw pointer is safe, because the ServiceWorkerRegistrationProxy object is kept
+ // alive by the ServiceWorkerRegistration object.
+ GC_PLUGIN_IGNORE("")
+ ServiceWorkerRegistration* m_registration;
Mads Ager (chromium) 2014/09/03 08:17:34 If we are not tracing this pointer I don't underst
haraken 2014/09/03 08:26:53 The relationship is as follows: WebSWRegistration
+};
+
+} // namespace blink
+
+#endif // ServiceWorkerRegistrationProxy_h
« no previous file with comments | « Source/platform/exported/WebServiceWorkerRegistrationProxy.cpp ('k') | Source/web/ServiceWorkerGlobalScopeClientImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698