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 "base/strings/string16.h" |
9 #include "content/browser/service_worker/service_worker_registration_status.h" | 10 #include "content/browser/service_worker/service_worker_registration_status.h" |
10 #include "content/public/browser/browser_message_filter.h" | 11 #include "content/public/browser/browser_message_filter.h" |
11 | 12 |
12 class GURL; | 13 class GURL; |
13 | 14 |
14 namespace content { | 15 namespace content { |
15 | 16 |
16 class MessagePortMessageFilter; | 17 class MessagePortMessageFilter; |
17 class ServiceWorkerContextCore; | 18 class ServiceWorkerContextCore; |
18 class ServiceWorkerContextWrapper; | 19 class ServiceWorkerContextWrapper; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 void OnProviderDestroyed(int provider_id); | 53 void OnProviderDestroyed(int provider_id); |
53 void OnAddScriptClient(int thread_id, int provider_id); | 54 void OnAddScriptClient(int thread_id, int provider_id); |
54 void OnRemoveScriptClient(int thread_id, int provider_id); | 55 void OnRemoveScriptClient(int thread_id, int provider_id); |
55 void OnSetHostedVersionId(int provider_id, int64 version_id); | 56 void OnSetHostedVersionId(int provider_id, int64 version_id); |
56 void OnWorkerStarted(int thread_id, | 57 void OnWorkerStarted(int thread_id, |
57 int embedded_worker_id); | 58 int embedded_worker_id); |
58 void OnWorkerStopped(int embedded_worker_id); | 59 void OnWorkerStopped(int embedded_worker_id); |
59 void OnSendMessageToBrowser(int embedded_worker_id, | 60 void OnSendMessageToBrowser(int embedded_worker_id, |
60 int request_id, | 61 int request_id, |
61 const IPC::Message& message); | 62 const IPC::Message& message); |
| 63 void OnReportException(int embedded_worker_id, |
| 64 const base::string16& error_message, |
| 65 int line_number, |
| 66 int column_number, |
| 67 const GURL& source_url); |
62 void OnPostMessage(int64 version_id, | 68 void OnPostMessage(int64 version_id, |
63 const base::string16& message, | 69 const base::string16& message, |
64 const std::vector<int>& sent_message_port_ids); | 70 const std::vector<int>& sent_message_port_ids); |
65 | 71 |
66 // Callbacks from ServiceWorkerContextCore | 72 // Callbacks from ServiceWorkerContextCore |
67 void RegistrationComplete(int32 thread_id, | 73 void RegistrationComplete(int32 thread_id, |
68 int32 request_id, | 74 int32 request_id, |
69 ServiceWorkerStatusCode status, | 75 ServiceWorkerStatusCode status, |
70 int64 registration_id, | 76 int64 registration_id, |
71 int64 version_id); | 77 int64 version_id); |
72 | 78 |
73 void UnregistrationComplete(int32 thread_id, | 79 void UnregistrationComplete(int32 thread_id, |
74 int32 request_id, | 80 int32 request_id, |
75 ServiceWorkerStatusCode status); | 81 ServiceWorkerStatusCode status); |
76 | 82 |
77 void SendRegistrationError(int32 thread_id, | 83 void SendRegistrationError(int32 thread_id, |
78 int32 request_id, | 84 int32 request_id, |
79 ServiceWorkerStatusCode status); | 85 ServiceWorkerStatusCode status); |
80 | 86 |
81 int render_process_id_; | 87 int render_process_id_; |
82 MessagePortMessageFilter* const message_port_message_filter_; | 88 MessagePortMessageFilter* const message_port_message_filter_; |
83 | 89 |
84 base::WeakPtr<ServiceWorkerContextCore> context_; | 90 base::WeakPtr<ServiceWorkerContextCore> context_; |
85 }; | 91 }; |
86 | 92 |
87 } // namespace content | 93 } // namespace content |
88 | 94 |
89 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_ | 95 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_ |
OLD | NEW |