| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 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 | 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 CHROME_WORKER_WORKER_THREAD_H_ | 5 #ifndef CHROME_WORKER_WORKER_THREAD_H_ |
| 6 #define CHROME_WORKER_WORKER_THREAD_H_ | 6 #define CHROME_WORKER_WORKER_THREAD_H_ |
| 7 | 7 |
| 8 #include "base/thread.h" | |
| 9 #include "chrome/common/child_thread.h" | 8 #include "chrome/common/child_thread.h" |
| 10 | 9 |
| 11 class GURL; | 10 class GURL; |
| 12 class WorkerWebKitClientImpl; | 11 class WorkerWebKitClientImpl; |
| 13 | 12 |
| 14 class WorkerThread : public ChildThread { | 13 class WorkerThread : public ChildThread { |
| 15 public: | 14 public: |
| 16 WorkerThread(); | 15 WorkerThread(); |
| 17 ~WorkerThread(); | 16 ~WorkerThread(); |
| 18 | 17 |
| 19 // Returns the one worker thread. | 18 // Returns the one worker thread. |
| 20 static WorkerThread* current(); | 19 static WorkerThread* current(); |
| 21 | 20 |
| 22 private: | 21 private: |
| 23 virtual void OnControlMessageReceived(const IPC::Message& msg); | 22 virtual void OnControlMessageReceived(const IPC::Message& msg); |
| 24 | 23 |
| 25 // Called by the thread base class | |
| 26 virtual void Init(); | |
| 27 virtual void CleanUp(); | |
| 28 | |
| 29 void OnCreateWorker(const GURL& url, int route_id); | 24 void OnCreateWorker(const GURL& url, int route_id); |
| 30 | 25 |
| 31 scoped_ptr<WorkerWebKitClientImpl> webkit_client_; | 26 scoped_ptr<WorkerWebKitClientImpl> webkit_client_; |
| 32 | 27 |
| 33 DISALLOW_COPY_AND_ASSIGN(WorkerThread); | 28 DISALLOW_COPY_AND_ASSIGN(WorkerThread); |
| 34 }; | 29 }; |
| 35 | 30 |
| 36 #endif // CHROME_WORKER_WORKER_THREAD_H_ | 31 #endif // CHROME_WORKER_WORKER_THREAD_H_ |
| OLD | NEW |