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

Side by Side Diff: chrome/worker/worker_thread.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/worker/worker_process.cc ('k') | chrome/worker/worker_thread.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_WORKER_WORKER_THREAD_H_
6 #define CHROME_WORKER_WORKER_THREAD_H_
7
8 #include "base/thread.h"
9 #include "chrome/common/ipc_sync_channel.h"
10 #include "chrome/common/message_router.h"
11 #include "chrome/common/resource_dispatcher.h"
12
13 class WebWorkerContextStub;
14 class WorkerProcess;
15
16 class WorkerThread : public IPC::Channel::Listener,
17 public IPC::Message::Sender,
18 public base::Thread {
19 public:
20 WorkerThread(WorkerProcess *process, const std::wstring& channel_name);
21 ~WorkerThread();
22
23 // IPC::Channel::Listener implementation:
24 virtual void OnMessageReceived(const IPC::Message& msg);
25 virtual void OnChannelError();
26
27 // IPC::Message::Sender implementation:
28 virtual bool Send(IPC::Message* msg);
29
30 void OnWorkerDestruction(WebWorkerContextStub* worker);
31
32 private:
33 // Thread implementation:
34 void Init();
35 void CleanUp();
36
37 void OnCreateWorker(const GURL& url, int route_id);
38
39 // The process that has created this thread
40 WorkerProcess *worker_process_;
41
42 // The message loop used to run tasks on the thread that started this thread.
43 MessageLoop* owner_loop_;
44
45 std::wstring channel_name_;
46 scoped_ptr<IPC::SyncChannel> channel_;
47
48 // Used to implement message routing functionality to
49 // WebWorkerContextProxyStub objects.
50 MessageRouter router_;
51
52 DISALLOW_EVIL_CONSTRUCTORS(WorkerThread);
53 };
54
55 #endif // CHROME_WORKER_WORKER_THREAD_H_
OLDNEW
« no previous file with comments | « chrome/worker/worker_process.cc ('k') | chrome/worker/worker_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698