| 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 | 10 |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 virtual void OnProcessLaunched(); | 155 virtual void OnProcessLaunched(); |
| 156 | 156 |
| 157 // Creates and adds the message filters. | 157 // Creates and adds the message filters. |
| 158 void CreateMessageFilters(int render_process_id); | 158 void CreateMessageFilters(int render_process_id); |
| 159 | 159 |
| 160 // IPC::Channel::Listener implementation: | 160 // IPC::Channel::Listener implementation: |
| 161 // Called when a message arrives from the worker process. | 161 // Called when a message arrives from the worker process. |
| 162 virtual bool OnMessageReceived(const IPC::Message& message); | 162 virtual bool OnMessageReceived(const IPC::Message& message); |
| 163 | 163 |
| 164 void OnWorkerContextClosed(int worker_route_id); | 164 void OnWorkerContextClosed(int worker_route_id); |
| 165 void OnAllowDatabase(int worker_route_id, |
| 166 const GURL& url, |
| 167 const string16& name, |
| 168 const string16& display_name, |
| 169 unsigned long estimated_size, |
| 170 bool* result); |
| 171 void OnAllowFileSystem(int worker_route_id, |
| 172 const GURL& url, |
| 173 bool* result); |
| 165 | 174 |
| 166 // Relays a message to the given endpoint. Takes care of parsing the message | 175 // Relays a message to the given endpoint. Takes care of parsing the message |
| 167 // if it contains a message port and sending it a valid route id. | 176 // if it contains a message port and sending it a valid route id. |
| 168 static void RelayMessage(const IPC::Message& message, | 177 static void RelayMessage(const IPC::Message& message, |
| 169 WorkerMessageFilter* filter, | 178 WorkerMessageFilter* filter, |
| 170 int route_id); | 179 int route_id); |
| 171 | 180 |
| 172 virtual bool CanShutdown(); | 181 virtual bool CanShutdown(); |
| 173 | 182 |
| 174 // Updates the title shown in the task manager. | 183 // Updates the title shown in the task manager. |
| 175 void UpdateTitle(); | 184 void UpdateTitle(); |
| 176 | 185 |
| 177 Instances instances_; | 186 Instances instances_; |
| 178 | 187 |
| 179 const content::ResourceContext* const resource_context_; | 188 const content::ResourceContext* const resource_context_; |
| 180 | 189 |
| 181 // A reference to the filter associated with this worker process. We need to | 190 // A reference to the filter associated with this worker process. We need to |
| 182 // keep this around since we'll use it when forward messages to the worker | 191 // keep this around since we'll use it when forward messages to the worker |
| 183 // process. | 192 // process. |
| 184 scoped_refptr<WorkerMessageFilter> worker_message_filter_; | 193 scoped_refptr<WorkerMessageFilter> worker_message_filter_; |
| 185 | 194 |
| 186 ResourceDispatcherHost* const resource_dispatcher_host_; | 195 ResourceDispatcherHost* const resource_dispatcher_host_; |
| 187 | 196 |
| 188 DISALLOW_COPY_AND_ASSIGN(WorkerProcessHost); | 197 DISALLOW_COPY_AND_ASSIGN(WorkerProcessHost); |
| 189 }; | 198 }; |
| 190 | 199 |
| 191 #endif // CONTENT_BROWSER_WORKER_HOST_WORKER_PROCESS_HOST_H_ | 200 #endif // CONTENT_BROWSER_WORKER_HOST_WORKER_PROCESS_HOST_H_ |
| OLD | NEW |