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_COMMON_CHILD_THREAD_H_ | 5 #ifndef CHROME_COMMON_CHILD_THREAD_H_ |
6 #define CHROME_COMMON_CHILD_THREAD_H_ | 6 #define CHROME_COMMON_CHILD_THREAD_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/scoped_ptr.h" | 9 #include "base/scoped_ptr.h" |
10 #include "base/thread.h" | 10 #include "base/thread.h" |
11 #include "chrome/common/ipc_sync_channel.h" | |
12 #include "chrome/common/message_router.h" | 11 #include "chrome/common/message_router.h" |
13 #include "chrome/common/resource_dispatcher.h" | 12 #include "chrome/common/resource_dispatcher.h" |
| 13 #include "ipc/ipc_sync_channel.h" |
14 | 14 |
15 // Child processes's background thread should derive from this class. | 15 // Child processes's background thread should derive from this class. |
16 class ChildThread : public IPC::Channel::Listener, | 16 class ChildThread : public IPC::Channel::Listener, |
17 public IPC::Message::Sender, | 17 public IPC::Message::Sender, |
18 public base::Thread { | 18 public base::Thread { |
19 public: | 19 public: |
20 // Creates the thread. | 20 // Creates the thread. |
21 ChildThread(Thread::Options options); | 21 ChildThread(Thread::Options options); |
22 virtual ~ChildThread(); | 22 virtual ~ChildThread(); |
23 | 23 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 | 84 |
85 // If true, checks with the browser process before shutdown. This avoids race | 85 // If true, checks with the browser process before shutdown. This avoids race |
86 // conditions if the process refcount is 0 but there's an IPC message inflight | 86 // conditions if the process refcount is 0 but there's an IPC message inflight |
87 // that would addref it. | 87 // that would addref it. |
88 bool check_with_browser_before_shutdown_; | 88 bool check_with_browser_before_shutdown_; |
89 | 89 |
90 DISALLOW_COPY_AND_ASSIGN(ChildThread); | 90 DISALLOW_COPY_AND_ASSIGN(ChildThread); |
91 }; | 91 }; |
92 | 92 |
93 #endif // CHROME_COMMON_CHILD_THREAD_H_ | 93 #endif // CHROME_COMMON_CHILD_THREAD_H_ |
OLD | NEW |