| 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_CHILD_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_H_ | 5 #ifndef CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_H_ |
| 6 #define CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_H_ | 6 #define CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/id_map.h" | 10 #include "base/id_map.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 | 63 |
| 64 private: | 64 private: |
| 65 typedef std::map<int, blink::WebServiceWorkerProviderClient*> ScriptClientMap; | 65 typedef std::map<int, blink::WebServiceWorkerProviderClient*> ScriptClientMap; |
| 66 | 66 |
| 67 // WorkerTaskRunner::Observer implementation. | 67 // WorkerTaskRunner::Observer implementation. |
| 68 virtual void OnWorkerRunLoopStopped() OVERRIDE; | 68 virtual void OnWorkerRunLoopStopped() OVERRIDE; |
| 69 | 69 |
| 70 // The asynchronous success response to RegisterServiceWorker. | 70 // The asynchronous success response to RegisterServiceWorker. |
| 71 void OnRegistered(int32 thread_id, | 71 void OnRegistered(int32 thread_id, |
| 72 int32 request_id, | 72 int32 request_id, |
| 73 int64 version_id); | 73 int handle_id); |
| 74 // The asynchronous success response to UregisterServiceWorker. | 74 // The asynchronous success response to UregisterServiceWorker. |
| 75 void OnUnregistered(int32 thread_id, | 75 void OnUnregistered(int32 thread_id, |
| 76 int32 request_id); | 76 int32 request_id); |
| 77 void OnRegistrationError(int32 thread_id, | 77 void OnRegistrationError(int32 thread_id, |
| 78 int32 request_id, | 78 int32 request_id, |
| 79 blink::WebServiceWorkerError::ErrorType error_type, | 79 blink::WebServiceWorkerError::ErrorType error_type, |
| 80 const base::string16& message); | 80 const base::string16& message); |
| 81 | 81 |
| 82 IDMap<blink::WebServiceWorkerProvider::WebServiceWorkerCallbacks, | 82 IDMap<blink::WebServiceWorkerProvider::WebServiceWorkerCallbacks, |
| 83 IDMapOwnPointer> pending_callbacks_; | 83 IDMapOwnPointer> pending_callbacks_; |
| 84 ScriptClientMap script_clients_; | 84 ScriptClientMap script_clients_; |
| 85 | 85 |
| 86 scoped_refptr<ThreadSafeSender> thread_safe_sender_; | 86 scoped_refptr<ThreadSafeSender> thread_safe_sender_; |
| 87 | 87 |
| 88 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDispatcher); | 88 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDispatcher); |
| 89 }; | 89 }; |
| 90 | 90 |
| 91 } // namespace content | 91 } // namespace content |
| 92 | 92 |
| 93 #endif // CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_H_ | 93 #endif // CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_H_ |
| OLD | NEW |