| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 // process has terminated, at which point the whole instance will eventually | 48 // process has terminated, at which point the whole instance will eventually |
| 49 // be destroyed. | 49 // be destroyed. |
| 50 virtual bool Send(IPC::Message* message) OVERRIDE; | 50 virtual bool Send(IPC::Message* message) OVERRIDE; |
| 51 | 51 |
| 52 // Returns the existing registration handle whose reference count is | 52 // Returns the existing registration handle whose reference count is |
| 53 // incremented or newly created one if it doesn't exist. | 53 // incremented or newly created one if it doesn't exist. |
| 54 ServiceWorkerRegistrationHandle* GetOrCreateRegistrationHandle( | 54 ServiceWorkerRegistrationHandle* GetOrCreateRegistrationHandle( |
| 55 int provider_id, | 55 int provider_id, |
| 56 ServiceWorkerRegistration* registration); | 56 ServiceWorkerRegistration* registration); |
| 57 | 57 |
| 58 ServiceWorkerRegistrationHandle* GetRegistrationHandle( |
| 59 int registration_handle_id); |
| 60 |
| 58 void RegisterServiceWorkerHandle(scoped_ptr<ServiceWorkerHandle> handle); | 61 void RegisterServiceWorkerHandle(scoped_ptr<ServiceWorkerHandle> handle); |
| 59 void RegisterServiceWorkerRegistrationHandle( | 62 void RegisterServiceWorkerRegistrationHandle( |
| 60 scoped_ptr<ServiceWorkerRegistrationHandle> handle); | 63 scoped_ptr<ServiceWorkerRegistrationHandle> handle); |
| 61 | 64 |
| 62 MessagePortMessageFilter* message_port_message_filter() { | 65 MessagePortMessageFilter* message_port_message_filter() { |
| 63 return message_port_message_filter_; | 66 return message_port_message_filter_; |
| 64 } | 67 } |
| 65 | 68 |
| 66 protected: | 69 protected: |
| 67 virtual ~ServiceWorkerDispatcherHost(); | 70 virtual ~ServiceWorkerDispatcherHost(); |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 | 168 |
| 166 bool channel_ready_; // True after BrowserMessageFilter::sender_ != NULL. | 169 bool channel_ready_; // True after BrowserMessageFilter::sender_ != NULL. |
| 167 ScopedVector<IPC::Message> pending_messages_; | 170 ScopedVector<IPC::Message> pending_messages_; |
| 168 | 171 |
| 169 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDispatcherHost); | 172 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDispatcherHost); |
| 170 }; | 173 }; |
| 171 | 174 |
| 172 } // namespace content | 175 } // namespace content |
| 173 | 176 |
| 174 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_ | 177 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_ |
| OLD | NEW |