Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(188)

Side by Side Diff: content/browser/worker_host/worker_process_host.h

Issue 338353007: Implementation of shared worker code path for WebView file system permission. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master_sharedworker
Patch Set: Fix a callback bug. Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 7
8 #include <list> 8 #include <list>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/files/file_path.h" 13 #include "base/files/file_path.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/memory/weak_ptr.h"
15 #include "content/browser/worker_host/worker_document_set.h" 16 #include "content/browser/worker_host/worker_document_set.h"
16 #include "content/browser/worker_host/worker_storage_partition.h" 17 #include "content/browser/worker_host/worker_storage_partition.h"
17 #include "content/common/content_export.h" 18 #include "content/common/content_export.h"
18 #include "content/public/browser/browser_child_process_host_delegate.h" 19 #include "content/public/browser/browser_child_process_host_delegate.h"
19 #include "content/public/browser/browser_child_process_host_iterator.h" 20 #include "content/public/browser/browser_child_process_host_iterator.h"
20 #include "content/public/common/process_type.h" 21 #include "content/public/common/process_type.h"
21 #include "ipc/ipc_sender.h" 22 #include "ipc/ipc_sender.h"
22 #include "third_party/WebKit/public/web/WebContentSecurityPolicy.h" 23 #include "third_party/WebKit/public/web/WebContentSecurityPolicy.h"
23 #include "url/gurl.h" 24 #include "url/gurl.h"
24 #include "webkit/common/resource_type.h" 25 #include "webkit/common/resource_type.h"
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 void OnWorkerContextDestroyed(int worker_route_id); 218 void OnWorkerContextDestroyed(int worker_route_id);
218 void OnWorkerScriptLoaded(int worker_route_id); 219 void OnWorkerScriptLoaded(int worker_route_id);
219 void OnWorkerScriptLoadFailed(int worker_route_id); 220 void OnWorkerScriptLoadFailed(int worker_route_id);
220 void OnWorkerConnected(int message_port_id, int worker_route_id); 221 void OnWorkerConnected(int message_port_id, int worker_route_id);
221 void OnAllowDatabase(int worker_route_id, 222 void OnAllowDatabase(int worker_route_id,
222 const GURL& url, 223 const GURL& url,
223 const base::string16& name, 224 const base::string16& name,
224 const base::string16& display_name, 225 const base::string16& display_name,
225 unsigned long estimated_size, 226 unsigned long estimated_size,
226 bool* result); 227 bool* result);
227 void OnRequestFileSystemAccessSync(int worker_route_id, 228 void OnRequestFileSystemAccess(int worker_route_id,
228 const GURL& url, 229 const GURL& url,
229 bool* result); 230 IPC::Message* reply_msg);
231 void OnRequestFileSystemAccessResponse(scoped_ptr<IPC::Message> reply_msg,
232 bool allowed);
230 void OnAllowIndexedDB(int worker_route_id, 233 void OnAllowIndexedDB(int worker_route_id,
231 const GURL& url, 234 const GURL& url,
232 const base::string16& name, 235 const base::string16& name,
233 bool* result); 236 bool* result);
234 void OnForceKillWorkerProcess(); 237 void OnForceKillWorkerProcess();
235 238
236 // Relays a message to the given endpoint. Takes care of parsing the message 239 // Relays a message to the given endpoint. Takes care of parsing the message
237 // if it contains a message port and sending it a valid route id. 240 // if it contains a message port and sending it a valid route id.
238 void RelayMessage(const IPC::Message& message, 241 void RelayMessage(const IPC::Message& message,
239 WorkerMessageFilter* incoming_filter, 242 WorkerMessageFilter* incoming_filter,
(...skipping 24 matching lines...) Expand all
264 // A reference to the filter associated with this worker process. We need to 267 // A reference to the filter associated with this worker process. We need to
265 // keep this around since we'll use it when forward messages to the worker 268 // keep this around since we'll use it when forward messages to the worker
266 // process. 269 // process.
267 scoped_refptr<WorkerMessageFilter> worker_message_filter_; 270 scoped_refptr<WorkerMessageFilter> worker_message_filter_;
268 271
269 scoped_ptr<BrowserChildProcessHostImpl> process_; 272 scoped_ptr<BrowserChildProcessHostImpl> process_;
270 bool process_launched_; 273 bool process_launched_;
271 274
272 scoped_refptr<SocketStreamDispatcherHost> socket_stream_dispatcher_host_; 275 scoped_refptr<SocketStreamDispatcherHost> socket_stream_dispatcher_host_;
273 276
277 base::WeakPtrFactory<WorkerProcessHost> weak_factory_;
278
274 DISALLOW_COPY_AND_ASSIGN(WorkerProcessHost); 279 DISALLOW_COPY_AND_ASSIGN(WorkerProcessHost);
275 }; 280 };
276 281
277 class WorkerProcessHostIterator 282 class WorkerProcessHostIterator
278 : public BrowserChildProcessHostTypeIterator<WorkerProcessHost> { 283 : public BrowserChildProcessHostTypeIterator<WorkerProcessHost> {
279 public: 284 public:
280 WorkerProcessHostIterator() 285 WorkerProcessHostIterator()
281 : BrowserChildProcessHostTypeIterator<WorkerProcessHost>( 286 : BrowserChildProcessHostTypeIterator<WorkerProcessHost>(
282 PROCESS_TYPE_WORKER) { 287 PROCESS_TYPE_WORKER) {
283 } 288 }
284 }; 289 };
285 290
286 } // namespace content 291 } // namespace content
287 292
288 #endif // CONTENT_BROWSER_WORKER_HOST_WORKER_PROCESS_HOST_H_ 293 #endif // CONTENT_BROWSER_WORKER_HOST_WORKER_PROCESS_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698