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/scoped_ptr.h" | |
8 #include "base/thread.h" | 9 #include "base/thread.h" |
9 #include "chrome/common/ipc_sync_channel.h" | 10 #include "chrome/common/ipc_sync_channel.h" |
10 #include "chrome/common/message_router.h" | 11 #include "chrome/common/message_router.h" |
11 #include "chrome/common/resource_dispatcher.h" | 12 #include "chrome/common/resource_dispatcher.h" |
12 | 13 |
13 // Child processes's background thread should derive from this class. | 14 // Child processes's background thread should derive from this class. |
14 class ChildThread : public IPC::Channel::Listener, | 15 class ChildThread : public IPC::Channel::Listener, |
15 public IPC::Message::Sender, | 16 public IPC::Message::Sender, |
16 public base::Thread { | 17 public base::Thread { |
17 public: | 18 public: |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
78 | 79 |
79 // Handles resource loads for this process. | 80 // Handles resource loads for this process. |
80 // NOTE: this object lives on the owner thread. | 81 // NOTE: this object lives on the owner thread. |
81 scoped_ptr<ResourceDispatcher> resource_dispatcher_; | 82 scoped_ptr<ResourceDispatcher> resource_dispatcher_; |
82 | 83 |
83 // If true, checks with the browser process before shutdown. This avoids race | 84 // If true, checks with the browser process before shutdown. This avoids race |
84 // conditions if the process refcount is 0 but there's an IPC message inflight | 85 // conditions if the process refcount is 0 but there's an IPC message inflight |
85 // that would addref it. | 86 // that would addref it. |
86 bool check_with_browser_before_shutdown_; | 87 bool check_with_browser_before_shutdown_; |
87 | 88 |
88 DISALLOW_EVIL_CONSTRUCTORS(ChildThread); | 89 DISALLOW_EVIL_CONSTRUCTORS(ChildThread); |
Dean McNamee
2009/05/28 09:27:18
maybe update this? And we should include basictyp
| |
89 }; | 90 }; |
90 | 91 |
91 #endif // CHROME_COMMON_CHILD_THREAD_H_ | 92 #endif // CHROME_COMMON_CHILD_THREAD_H_ |
OLD | NEW |