| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_COMMON_CHILD_THREAD_H_ | 5 #ifndef CONTENT_COMMON_CHILD_THREAD_H_ |
| 6 #define CONTENT_COMMON_CHILD_THREAD_H_ | 6 #define CONTENT_COMMON_CHILD_THREAD_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 on_channel_error_called_ = on_channel_error_called; | 108 on_channel_error_called_ = on_channel_error_called; |
| 109 } | 109 } |
| 110 | 110 |
| 111 private: | 111 private: |
| 112 void Init(); | 112 void Init(); |
| 113 | 113 |
| 114 // IPC::Channel::Listener implementation: | 114 // IPC::Channel::Listener implementation: |
| 115 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | 115 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
| 116 virtual void OnChannelError() OVERRIDE; | 116 virtual void OnChannelError() OVERRIDE; |
| 117 | 117 |
| 118 #if defined(USE_TCMALLOC) |
| 119 void OnGetTcmallocStats(); |
| 120 #endif |
| 121 |
| 118 std::string channel_name_; | 122 std::string channel_name_; |
| 119 scoped_ptr<IPC::SyncChannel> channel_; | 123 scoped_ptr<IPC::SyncChannel> channel_; |
| 120 | 124 |
| 121 // Allows threads other than the main thread to send sync messages. | 125 // Allows threads other than the main thread to send sync messages. |
| 122 scoped_refptr<IPC::SyncMessageFilter> sync_message_filter_; | 126 scoped_refptr<IPC::SyncMessageFilter> sync_message_filter_; |
| 123 | 127 |
| 124 // Implements message routing functionality to the consumers of ChildThread. | 128 // Implements message routing functionality to the consumers of ChildThread. |
| 125 MessageRouter router_; | 129 MessageRouter router_; |
| 126 | 130 |
| 127 // Handles resource loads for this process. | 131 // Handles resource loads for this process. |
| 128 scoped_ptr<ResourceDispatcher> resource_dispatcher_; | 132 scoped_ptr<ResourceDispatcher> resource_dispatcher_; |
| 129 | 133 |
| 130 // Handles SocketStream for this process. | 134 // Handles SocketStream for this process. |
| 131 scoped_ptr<SocketStreamDispatcher> socket_stream_dispatcher_; | 135 scoped_ptr<SocketStreamDispatcher> socket_stream_dispatcher_; |
| 132 | 136 |
| 133 // The OnChannelError() callback was invoked - the channel is dead, don't | 137 // The OnChannelError() callback was invoked - the channel is dead, don't |
| 134 // attempt to communicate. | 138 // attempt to communicate. |
| 135 bool on_channel_error_called_; | 139 bool on_channel_error_called_; |
| 136 | 140 |
| 137 MessageLoop* message_loop_; | 141 MessageLoop* message_loop_; |
| 138 | 142 |
| 139 scoped_ptr<FileSystemDispatcher> file_system_dispatcher_; | 143 scoped_ptr<FileSystemDispatcher> file_system_dispatcher_; |
| 140 | 144 |
| 141 scoped_ptr<QuotaDispatcher> quota_dispatcher_; | 145 scoped_ptr<QuotaDispatcher> quota_dispatcher_; |
| 142 | 146 |
| 143 DISALLOW_COPY_AND_ASSIGN(ChildThread); | 147 DISALLOW_COPY_AND_ASSIGN(ChildThread); |
| 144 }; | 148 }; |
| 145 | 149 |
| 146 #endif // CONTENT_COMMON_CHILD_THREAD_H_ | 150 #endif // CONTENT_COMMON_CHILD_THREAD_H_ |
| OLD | NEW |