| 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 <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/id_map.h" | 10 #include "base/id_map.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 // class assumes that Send() can only fail after that when the renderer | 55 // class assumes that Send() can only fail after that when the renderer |
| 56 // process has terminated, at which point the whole instance will eventually | 56 // process has terminated, at which point the whole instance will eventually |
| 57 // be destroyed. | 57 // be destroyed. |
| 58 bool Send(IPC::Message* message) override; | 58 bool Send(IPC::Message* message) override; |
| 59 | 59 |
| 60 void RegisterServiceWorkerHandle(scoped_ptr<ServiceWorkerHandle> handle); | 60 void RegisterServiceWorkerHandle(scoped_ptr<ServiceWorkerHandle> handle); |
| 61 void RegisterServiceWorkerRegistrationHandle( | 61 void RegisterServiceWorkerRegistrationHandle( |
| 62 scoped_ptr<ServiceWorkerRegistrationHandle> handle); | 62 scoped_ptr<ServiceWorkerRegistrationHandle> handle); |
| 63 | 63 |
| 64 ServiceWorkerHandle* FindServiceWorkerHandle(int provider_id, | 64 ServiceWorkerHandle* FindServiceWorkerHandle(int provider_id, |
| 65 int64 version_id); | 65 std::string version_uuid); |
| 66 | 66 |
| 67 // Returns the existing registration handle whose reference count is | 67 // Returns the existing registration handle whose reference count is |
| 68 // incremented or newly created one if it doesn't exist. | 68 // incremented or newly created one if it doesn't exist. |
| 69 ServiceWorkerRegistrationHandle* GetOrCreateRegistrationHandle( | 69 ServiceWorkerRegistrationHandle* GetOrCreateRegistrationHandle( |
| 70 base::WeakPtr<ServiceWorkerProviderHost> provider_host, | 70 base::WeakPtr<ServiceWorkerProviderHost> provider_host, |
| 71 ServiceWorkerRegistration* registration); | 71 ServiceWorkerRegistration* registration); |
| 72 | 72 |
| 73 MessagePortMessageFilter* message_port_message_filter() { | 73 MessagePortMessageFilter* message_port_message_filter() { |
| 74 return message_port_message_filter_; | 74 return message_port_message_filter_; |
| 75 } | 75 } |
| (...skipping 22 matching lines...) Expand all Loading... |
| 98 int provider_id, | 98 int provider_id, |
| 99 const GURL& document_url); | 99 const GURL& document_url); |
| 100 void OnGetRegistrations(int thread_id, int request_id, int provider_id); | 100 void OnGetRegistrations(int thread_id, int request_id, int provider_id); |
| 101 void OnGetRegistrationForReady(int thread_id, | 101 void OnGetRegistrationForReady(int thread_id, |
| 102 int request_id, | 102 int request_id, |
| 103 int provider_id); | 103 int provider_id); |
| 104 void OnProviderCreated(int provider_id, | 104 void OnProviderCreated(int provider_id, |
| 105 int route_id, | 105 int route_id, |
| 106 ServiceWorkerProviderType provider_type); | 106 ServiceWorkerProviderType provider_type); |
| 107 void OnProviderDestroyed(int provider_id); | 107 void OnProviderDestroyed(int provider_id); |
| 108 void OnSetHostedVersionId(int provider_id, int64 version_id); | 108 void OnSetHostedVersionId(int provider_id, std::string version_uuid); |
| 109 void OnWorkerReadyForInspection(int embedded_worker_id); | 109 void OnWorkerReadyForInspection(int embedded_worker_id); |
| 110 void OnWorkerScriptLoaded(int embedded_worker_id, | 110 void OnWorkerScriptLoaded(int embedded_worker_id, |
| 111 int thread_id, | 111 int thread_id, |
| 112 int provider_id); | 112 int provider_id); |
| 113 void OnWorkerScriptLoadFailed(int embedded_worker_id); | 113 void OnWorkerScriptLoadFailed(int embedded_worker_id); |
| 114 void OnWorkerScriptEvaluated(int embedded_worker_id, bool success); | 114 void OnWorkerScriptEvaluated(int embedded_worker_id, bool success); |
| 115 void OnWorkerStarted(int embedded_worker_id); | 115 void OnWorkerStarted(int embedded_worker_id); |
| 116 void OnWorkerStopped(int embedded_worker_id); | 116 void OnWorkerStopped(int embedded_worker_id); |
| 117 void OnPausedAfterDownload(int embedded_worker_id); | 117 void OnPausedAfterDownload(int embedded_worker_id); |
| 118 void OnReportException(int embedded_worker_id, | 118 void OnReportException(int embedded_worker_id, |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 | 205 |
| 206 bool channel_ready_; // True after BrowserMessageFilter::sender_ != NULL. | 206 bool channel_ready_; // True after BrowserMessageFilter::sender_ != NULL. |
| 207 ScopedVector<IPC::Message> pending_messages_; | 207 ScopedVector<IPC::Message> pending_messages_; |
| 208 | 208 |
| 209 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDispatcherHost); | 209 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDispatcherHost); |
| 210 }; | 210 }; |
| 211 | 211 |
| 212 } // namespace content | 212 } // namespace content |
| 213 | 213 |
| 214 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_ | 214 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_ |
| OLD | NEW |