OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_ | 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_ |
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_ | 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_ |
7 | 7 |
8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
9 #include "content/browser/service_worker/service_worker_registration_status.h" | 9 #include "content/browser/service_worker/service_worker_registration_status.h" |
10 #include "content/public/browser/browser_message_filter.h" | 10 #include "content/public/browser/browser_message_filter.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 virtual ~ServiceWorkerDispatcherHost(); | 32 virtual ~ServiceWorkerDispatcherHost(); |
33 | 33 |
34 private: | 34 private: |
35 friend class BrowserThread; | 35 friend class BrowserThread; |
36 friend class base::DeleteHelper<ServiceWorkerDispatcherHost>; | 36 friend class base::DeleteHelper<ServiceWorkerDispatcherHost>; |
37 friend class TestingServiceWorkerDispatcherHost; | 37 friend class TestingServiceWorkerDispatcherHost; |
38 | 38 |
39 // IPC Message handlers | 39 // IPC Message handlers |
40 void OnRegisterServiceWorker(int32 thread_id, | 40 void OnRegisterServiceWorker(int32 thread_id, |
41 int32 request_id, | 41 int32 request_id, |
| 42 int provider_id, |
42 const GURL& pattern, | 43 const GURL& pattern, |
43 const GURL& script_url); | 44 const GURL& script_url); |
44 void OnUnregisterServiceWorker(int32 thread_id, | 45 void OnUnregisterServiceWorker(int32 thread_id, |
45 int32 request_id, | 46 int32 request_id, |
| 47 int provider_id, |
46 const GURL& pattern); | 48 const GURL& pattern); |
47 void OnProviderCreated(int provider_id); | 49 void OnProviderCreated(int provider_id); |
48 void OnProviderDestroyed(int provider_id); | 50 void OnProviderDestroyed(int provider_id); |
49 void OnWorkerStarted(int thread_id, | 51 void OnWorkerStarted(int thread_id, |
50 int embedded_worker_id); | 52 int embedded_worker_id); |
51 void OnWorkerStopped(int embedded_worker_id); | 53 void OnWorkerStopped(int embedded_worker_id); |
52 void OnSendMessageToBrowser(int embedded_worker_id, | 54 void OnSendMessageToBrowser(int embedded_worker_id, |
53 const IPC::Message& message); | 55 const IPC::Message& message); |
54 | 56 |
55 // Callbacks from ServiceWorkerContextCore | 57 // Callbacks from ServiceWorkerContextCore |
56 void RegistrationComplete(int32 thread_id, | 58 void RegistrationComplete(int32 thread_id, |
57 int32 request_id, | 59 int32 request_id, |
58 ServiceWorkerStatusCode status, | 60 ServiceWorkerStatusCode status, |
59 int64 registration_id); | 61 int64 registration_id); |
60 | 62 |
61 void UnregistrationComplete(int32 thread_id, | 63 void UnregistrationComplete(int32 thread_id, |
62 int32 request_id, | 64 int32 request_id, |
63 ServiceWorkerStatusCode status); | 65 ServiceWorkerStatusCode status); |
64 | 66 |
65 void SendRegistrationError(int32 thread_id, | 67 void SendRegistrationError(int32 thread_id, |
66 int32 request_id, | 68 int32 request_id, |
67 ServiceWorkerStatusCode status); | 69 ServiceWorkerStatusCode status); |
68 int render_process_id_; | 70 int render_process_id_; |
69 base::WeakPtr<ServiceWorkerContextCore> context_; | 71 base::WeakPtr<ServiceWorkerContextCore> context_; |
70 }; | 72 }; |
71 | 73 |
72 } // namespace content | 74 } // namespace content |
73 | 75 |
74 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_ | 76 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_ |
OLD | NEW |