| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 // testing. | 48 // testing. |
| 49 class CONTENT_EXPORT ServiceWorkerDispatcherHost | 49 class CONTENT_EXPORT ServiceWorkerDispatcherHost |
| 50 : public BrowserMessageFilter, | 50 : public BrowserMessageFilter, |
| 51 public BrowserAssociatedInterface<mojom::ServiceWorkerDispatcherHost>, | 51 public BrowserAssociatedInterface<mojom::ServiceWorkerDispatcherHost>, |
| 52 public mojom::ServiceWorkerDispatcherHost { | 52 public mojom::ServiceWorkerDispatcherHost { |
| 53 public: | 53 public: |
| 54 ServiceWorkerDispatcherHost( | 54 ServiceWorkerDispatcherHost( |
| 55 int render_process_id, | 55 int render_process_id, |
| 56 ResourceContext* resource_context); | 56 ResourceContext* resource_context); |
| 57 | 57 |
| 58 // |blob_storage_context| and |loader_factory_getter| are used only | |
| 59 // if IsServicificationEnabled is true. | |
| 60 void Init(ServiceWorkerContextWrapper* context_wrapper); | 58 void Init(ServiceWorkerContextWrapper* context_wrapper); |
| 61 | 59 |
| 62 // BrowserMessageFilter implementation | 60 // BrowserMessageFilter implementation |
| 63 void OnFilterAdded(IPC::Channel* channel) override; | 61 void OnFilterAdded(IPC::Channel* channel) override; |
| 64 void OnFilterRemoved() override; | 62 void OnFilterRemoved() override; |
| 65 void OnDestruct() const override; | 63 void OnDestruct() const override; |
| 66 bool OnMessageReceived(const IPC::Message& message) override; | 64 bool OnMessageReceived(const IPC::Message& message) override; |
| 67 | 65 |
| 68 // IPC::Sender implementation | 66 // IPC::Sender implementation |
| 69 | 67 |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 std::vector<std::unique_ptr<IPC::Message>> pending_messages_; | 272 std::vector<std::unique_ptr<IPC::Message>> pending_messages_; |
| 275 | 273 |
| 276 base::WeakPtrFactory<ServiceWorkerDispatcherHost> weak_factory_; | 274 base::WeakPtrFactory<ServiceWorkerDispatcherHost> weak_factory_; |
| 277 | 275 |
| 278 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDispatcherHost); | 276 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDispatcherHost); |
| 279 }; | 277 }; |
| 280 | 278 |
| 281 } // namespace content | 279 } // namespace content |
| 282 | 280 |
| 283 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_ | 281 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DISPATCHER_HOST_H_ |
| OLD | NEW |