OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_WORKER_HOST_WORKER_PROCESS_HOST_H_ | 5 #ifndef CONTENT_BROWSER_WORKER_HOST_WORKER_PROCESS_HOST_H_ |
6 #define CONTENT_BROWSER_WORKER_HOST_WORKER_PROCESS_HOST_H_ | 6 #define CONTENT_BROWSER_WORKER_HOST_WORKER_PROCESS_HOST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <list> | 9 #include <list> |
10 #include <utility> | 10 #include <utility> |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 // the worker. | 124 // the worker. |
125 bool FilterMessage(const IPC::Message& message, WorkerMessageFilter* filter); | 125 bool FilterMessage(const IPC::Message& message, WorkerMessageFilter* filter); |
126 | 126 |
127 void FilterShutdown(WorkerMessageFilter* filter); | 127 void FilterShutdown(WorkerMessageFilter* filter); |
128 | 128 |
129 // Shuts down any shared workers that are no longer referenced by active | 129 // Shuts down any shared workers that are no longer referenced by active |
130 // documents. | 130 // documents. |
131 void DocumentDetached(WorkerMessageFilter* filter, | 131 void DocumentDetached(WorkerMessageFilter* filter, |
132 unsigned long long document_id); | 132 unsigned long long document_id); |
133 | 133 |
| 134 // Terminates the given worker, i.e. based on a UI action. |
| 135 void TerminateWorker(int worker_route_id); |
| 136 |
134 typedef std::list<WorkerInstance> Instances; | 137 typedef std::list<WorkerInstance> Instances; |
135 const Instances& instances() const { return instances_; } | 138 const Instances& instances() const { return instances_; } |
136 | 139 |
137 const content::ResourceContext* resource_context() const { | 140 const content::ResourceContext* resource_context() const { |
138 return resource_context_; | 141 return resource_context_; |
139 } | 142 } |
140 | 143 |
141 protected: | 144 protected: |
142 friend class WorkerService; | 145 friend class WorkerService; |
143 | 146 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 // keep this around since we'll use it when forward messages to the worker | 187 // keep this around since we'll use it when forward messages to the worker |
185 // process. | 188 // process. |
186 scoped_refptr<WorkerMessageFilter> worker_message_filter_; | 189 scoped_refptr<WorkerMessageFilter> worker_message_filter_; |
187 | 190 |
188 ResourceDispatcherHost* const resource_dispatcher_host_; | 191 ResourceDispatcherHost* const resource_dispatcher_host_; |
189 | 192 |
190 DISALLOW_COPY_AND_ASSIGN(WorkerProcessHost); | 193 DISALLOW_COPY_AND_ASSIGN(WorkerProcessHost); |
191 }; | 194 }; |
192 | 195 |
193 #endif // CONTENT_BROWSER_WORKER_HOST_WORKER_PROCESS_HOST_H_ | 196 #endif // CONTENT_BROWSER_WORKER_HOST_WORKER_PROCESS_HOST_H_ |
OLD | NEW |