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

Side by Side Diff: chrome/browser/worker_host/worker_service.h

Issue 27157: Initial checkin of the out of process worker implementation.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_WORKER_HOST__WORKER_SERVICE_H_
6 #define CHROME_BROWSER_WORKER_HOST__WORKER_SERVICE_H_
7
8 #include <list>
9
10 #include "base/basictypes.h"
11 #include "base/hash_tables.h"
12 #include "base/singleton.h"
13 #include "googleurl/src/gurl.h"
14
15 namespace IPC {
16 class Message;
17 }
18
19 class MessageLoop;
20 class WorkerProcessHost;
21 class ResourceMessageFilter;
22
23 class WorkerService {
24 public:
25 // Returns the WorkerService singleton.
26 static WorkerService* GetInstance();
27
28 // Creates a dedicated worker. Returns true on success.
29 bool CreateDedicatedWorker(const GURL &url,
30 ResourceMessageFilter* filter,
31 int renderer_route_id);
32
33 // Called by ResourceMessageFilter when a message from the renderer comes that
34 // should be forwarded to the worker process.
35 void ForwardMessage(const IPC::Message& message);
36
37 // Called by ResourceMessageFilter when it's destructed so that all the
38 // WorkerProcessHost objects can remove their pointers to it.
39 void RendererShutdown(ResourceMessageFilter* filter);
40
41 private:
42 friend struct DefaultSingletonTraits<WorkerService>;
43
44 WorkerService();
45 ~WorkerService();
46
47 int next_worker_route_id_;
48
49 DISALLOW_COPY_AND_ASSIGN(WorkerService);
50 };
51
52 #endif // CHROME_BROWSER_WORKER_HOST__WORKER_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/worker_host/worker_process_host.cc ('k') | chrome/browser/worker_host/worker_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698