projects
/
platform
/
framework
/
web
/
crosswalk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git]
/
src
/
content
/
child
/
service_worker
/
service_worker_provider_context.h
diff --git
a/src/content/child/service_worker/service_worker_provider_context.h
b/src/content/child/service_worker/service_worker_provider_context.h
index
ee294d9
..
75348bb
100644
(file)
--- a/
src/content/child/service_worker/service_worker_provider_context.h
+++ b/
src/content/child/service_worker/service_worker_provider_context.h
@@
-24,6
+24,7
@@
class Message;
namespace content {
class ServiceWorkerHandleReference;
namespace content {
class ServiceWorkerHandleReference;
+class ServiceWorkerRegistrationHandleReference;
struct ServiceWorkerProviderContextDeleter;
class ThreadSafeSender;
struct ServiceWorkerProviderContextDeleter;
class ThreadSafeSender;
@@
-38,15
+39,18
@@
class ServiceWorkerProviderContext
explicit ServiceWorkerProviderContext(int provider_id);
// Called from ServiceWorkerDispatcher.
explicit ServiceWorkerProviderContext(int provider_id);
// Called from ServiceWorkerDispatcher.
+ void OnAssociateRegistration(const ServiceWorkerRegistrationObjectInfo& info,
+ const ServiceWorkerVersionAttributes& attrs);
+ void OnDisassociateRegistration();
void OnServiceWorkerStateChanged(int handle_id,
blink::WebServiceWorkerState state);
void OnServiceWorkerStateChanged(int handle_id,
blink::WebServiceWorkerState state);
- void OnSetInstallingServiceWorker(int
provider
_id,
+ void OnSetInstallingServiceWorker(int
registration_handle
_id,
const ServiceWorkerObjectInfo& info);
const ServiceWorkerObjectInfo& info);
- void OnSetWaitingServiceWorker(int
provider
_id,
+ void OnSetWaitingServiceWorker(int
registration_handle
_id,
const ServiceWorkerObjectInfo& info);
const ServiceWorkerObjectInfo& info);
- void OnSetActiveServiceWorker(int
provider
_id,
+ void OnSetActiveServiceWorker(int
registration_handle
_id,
const ServiceWorkerObjectInfo& info);
const ServiceWorkerObjectInfo& info);
- void OnSetControllerServiceWorker(int
provider
_id,
+ void OnSetControllerServiceWorker(int
registration_handle
_id,
const ServiceWorkerObjectInfo& info);
int provider_id() const { return provider_id_; }
const ServiceWorkerObjectInfo& info);
int provider_id() const { return provider_id_; }
@@
-55,6
+59,9
@@
class ServiceWorkerProviderContext
ServiceWorkerHandleReference* waiting();
ServiceWorkerHandleReference* active();
ServiceWorkerHandleReference* controller();
ServiceWorkerHandleReference* waiting();
ServiceWorkerHandleReference* active();
ServiceWorkerHandleReference* controller();
+ ServiceWorkerRegistrationHandleReference* registration();
+
+ ServiceWorkerVersionAttributes GetVersionAttributes();
// Gets the handle ID of the installing Service Worker, or
// kInvalidServiceWorkerHandleId if the provider does not have a
// Gets the handle ID of the installing Service Worker, or
// kInvalidServiceWorkerHandleId if the provider does not have a
@@
-76,10
+83,17
@@
class ServiceWorkerProviderContext
// by a Service Worker.
int controller_handle_id() const;
// by a Service Worker.
int controller_handle_id() const;
+ // Gets the handle ID of the associated registration, or
+ // kInvalidRegistrationHandleId if the provider is not associated with any
+ // registration.
+ int registration_handle_id() const;
+
private:
friend class base::RefCounted<ServiceWorkerProviderContext>;
~ServiceWorkerProviderContext();
private:
friend class base::RefCounted<ServiceWorkerProviderContext>;
~ServiceWorkerProviderContext();
+ bool IsAssociatedWithRegistration(int registration_handle_id) const;
+
const int provider_id_;
scoped_refptr<base::MessageLoopProxy> main_thread_loop_proxy_;
scoped_refptr<ThreadSafeSender> thread_safe_sender_;
const int provider_id_;
scoped_refptr<base::MessageLoopProxy> main_thread_loop_proxy_;
scoped_refptr<ThreadSafeSender> thread_safe_sender_;
@@
-87,6
+101,7
@@
class ServiceWorkerProviderContext
scoped_ptr<ServiceWorkerHandleReference> waiting_;
scoped_ptr<ServiceWorkerHandleReference> active_;
scoped_ptr<ServiceWorkerHandleReference> controller_;
scoped_ptr<ServiceWorkerHandleReference> waiting_;
scoped_ptr<ServiceWorkerHandleReference> active_;
scoped_ptr<ServiceWorkerHandleReference> controller_;
+ scoped_ptr<ServiceWorkerRegistrationHandleReference> registration_;
DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderContext);
};
DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderContext);
};