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 "content/public/browser/browser_message_filter.h" | 8 #include "content/public/browser/browser_message_filter.h" |
9 | 9 |
10 class GURL; | 10 class GURL; |
11 | 11 |
12 namespace content { | 12 namespace content { |
13 | 13 |
14 class ServiceWorkerContext; | 14 class ServiceWorkerContext; |
15 | 15 |
16 class ServiceWorkerDispatcherHost : public BrowserMessageFilter { | 16 class ServiceWorkerDispatcherHost : public BrowserMessageFilter { |
17 public: | 17 public: |
18 explicit ServiceWorkerDispatcherHost(ServiceWorkerContext* context); | 18 ServiceWorkerDispatcherHost(int render_process_id, |
19 ServiceWorkerContext* context); | |
19 | 20 |
20 // BrowserIOMessageFilter implementation | 21 // BrowserIOMessageFilter implementation |
21 virtual bool OnMessageReceived(const IPC::Message& message, | 22 virtual bool OnMessageReceived(const IPC::Message& message, |
22 bool* message_was_ok) OVERRIDE; | 23 bool* message_was_ok) OVERRIDE; |
23 | 24 |
24 protected: | 25 protected: |
25 virtual ~ServiceWorkerDispatcherHost(); | 26 virtual ~ServiceWorkerDispatcherHost(); |
26 | 27 |
27 private: | 28 private: |
28 // IPC Message handlers | 29 // IPC Message handlers |
29 | 30 |
30 void OnRegisterServiceWorker(int32 registry_id, | 31 void OnRegisterServiceWorker(int32 thread_id, |
31 const string16& scope, | 32 int32 registry_id, |
kinuko
2013/10/09 12:13:25
nit: request_id
alecflett
2013/10/09 18:54:29
Done.
| |
32 const GURL& script_url); | 33 const GURL& security_origin, |
33 void OnUnregisterServiceWorker(int32 registry_id, const string16& scope); | 34 const string16& scope, |
35 const GURL& script_url); | |
36 void OnUnregisterServiceWorker(int32 thread_id, | |
37 int32 registry_id, | |
kinuko
2013/10/09 12:13:25
nit: request_id
alecflett
2013/10/09 18:54:29
Done.
| |
38 const GURL& security_origin, | |
39 const string16& scope); | |
34 | 40 |
41 int render_process_id_; | |
35 scoped_refptr<ServiceWorkerContext> context_; | 42 scoped_refptr<ServiceWorkerContext> context_; |
36 }; | 43 }; |
37 | 44 |
38 } // namespace content | 45 } // namespace content |
39 | 46 |
40 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_ | 47 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_ |
OLD | NEW |