Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / content / child / service_worker / web_service_worker_registration_impl.h
1 // Copyright 2014 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.
4
5 #ifndef CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_REGISTRATION_IMPL_H_
6 #define CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_REGISTRATION_IMPL_H_
7
8 #include "base/compiler_specific.h"
9 #include "third_party/WebKit/public/platform/WebServiceWorkerRegistration.h"
10
11 namespace blink {
12 class WebServiceWorker;
13 class WebServiceWorkerRegistrationProxy;
14 }
15
16 namespace content {
17
18 class ServiceWorkerRegistrationHandleReference;
19 class ThreadSafeSender;
20 struct ServiceWorkerObjectInfo;
21
22 class WebServiceWorkerRegistrationImpl
23     : NON_EXPORTED_BASE(public blink::WebServiceWorkerRegistration) {
24  public:
25   explicit WebServiceWorkerRegistrationImpl(
26       scoped_ptr<ServiceWorkerRegistrationHandleReference> handle_ref);
27   virtual ~WebServiceWorkerRegistrationImpl();
28
29   void OnUpdateFound();
30
31   virtual void setProxy(blink::WebServiceWorkerRegistrationProxy* proxy);
32   virtual blink::WebServiceWorkerRegistrationProxy* proxy();
33   virtual void setInstalling(blink::WebServiceWorker* service_worker);
34   virtual void setWaiting(blink::WebServiceWorker* service_worker);
35   virtual void setActive(blink::WebServiceWorker* service_worker);
36
37   virtual blink::WebURL scope() const;
38
39  private:
40   scoped_ptr<ServiceWorkerRegistrationHandleReference> handle_ref_;
41   blink::WebServiceWorkerRegistrationProxy* proxy_;
42
43   DISALLOW_COPY_AND_ASSIGN(WebServiceWorkerRegistrationImpl);
44 };
45
46 }  // namespace content
47
48 #endif  // CONTENT_CHILD_SERVICE_WORKER_WEB_SERVICE_WORKER_REGISTRATION_IMPL_H_