| 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_EMBEDDED_WORKER_REGISTRY_H_ | 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_REGISTRY_H_ |
| 6 #define CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_REGISTRY_H_ | 6 #define CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_REGISTRY_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 // Returns true if |embedded_worker_id| is managed by this registry. | 105 // Returns true if |embedded_worker_id| is managed by this registry. |
| 106 bool CanHandle(int embedded_worker_id) const; | 106 bool CanHandle(int embedded_worker_id) const; |
| 107 | 107 |
| 108 MessagePortMessageFilter* MessagePortMessageFilterForProcess(int process_id); | 108 MessagePortMessageFilter* MessagePortMessageFilterForProcess(int process_id); |
| 109 | 109 |
| 110 private: | 110 private: |
| 111 friend class base::RefCounted<EmbeddedWorkerRegistry>; | 111 friend class base::RefCounted<EmbeddedWorkerRegistry>; |
| 112 friend class MojoEmbeddedWorkerInstanceTest; | 112 friend class MojoEmbeddedWorkerInstanceTest; |
| 113 friend class EmbeddedWorkerInstance; | 113 friend class EmbeddedWorkerInstance; |
| 114 friend class EmbeddedWorkerInstanceTest; | 114 friend class EmbeddedWorkerInstanceTest; |
| 115 FRIEND_TEST_ALL_PREFIXES(EmbeddedWorkerInstanceTestP, | 115 FRIEND_TEST_ALL_PREFIXES(EmbeddedWorkerInstanceTest, |
| 116 RemoveWorkerInSharedProcess); | 116 RemoveWorkerInSharedProcess); |
| 117 | 117 |
| 118 using WorkerInstanceMap = std::map<int, EmbeddedWorkerInstance*>; | 118 using WorkerInstanceMap = std::map<int, EmbeddedWorkerInstance*>; |
| 119 using ProcessToSenderMap = std::map<int, IPC::Sender*>; | 119 using ProcessToSenderMap = std::map<int, IPC::Sender*>; |
| 120 using ProcessToMessagePortMessageFilterMap = | 120 using ProcessToMessagePortMessageFilterMap = |
| 121 std::map<int, MessagePortMessageFilter*>; | 121 std::map<int, MessagePortMessageFilter*>; |
| 122 | 122 |
| 123 EmbeddedWorkerRegistry( | 123 EmbeddedWorkerRegistry( |
| 124 const base::WeakPtr<ServiceWorkerContextCore>& context, | 124 const base::WeakPtr<ServiceWorkerContextCore>& context, |
| 125 int initial_embedded_worker_id); | 125 int initial_embedded_worker_id); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 156 | 156 |
| 157 int next_embedded_worker_id_; | 157 int next_embedded_worker_id_; |
| 158 const int initial_embedded_worker_id_; | 158 const int initial_embedded_worker_id_; |
| 159 | 159 |
| 160 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerRegistry); | 160 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerRegistry); |
| 161 }; | 161 }; |
| 162 | 162 |
| 163 } // namespace content | 163 } // namespace content |
| 164 | 164 |
| 165 #endif // CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_REGISTRY_H_ | 165 #endif // CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_REGISTRY_H_ |
| OLD | NEW |