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

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

Issue 20413: old1 (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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
« no previous file with comments | « chrome/browser/worker_process_host.cc ('k') | chrome/browser/worker_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_SERVICE_H_
6 #define CHROME_BROWSER_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 // This can be called on the main thread and IO thread. However it must
24 // be created on the main thread.
25 class WorkerService {
26 public:
27 // Returns the WorkerService singleton.
28 static WorkerService* GetInstance();
29
30 // Creates a dedicated worker, returning the route id to talk to it. Returns
31 // MSG_ROUTING_NONE if the worker couldn't be created.
32 int CreateDedicatedWorker(const GURL &url);
33
34 void ForwardMessage(const IPC::Message& message);
35
36 private:
37 friend DefaultSingletonTraits<WorkerService>;
38
39 WorkerService();
40 ~WorkerService();
41
42 int next_route_id_;
43
44 DISALLOW_COPY_AND_ASSIGN(WorkerService);
45 };
46
47 #endif // CHROME_BROWSER_WORKER_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/worker_process_host.cc ('k') | chrome/browser/worker_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698