| 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_CHILD_CHILD_THREAD_H_ | 5 #ifndef CONTENT_CHILD_CHILD_THREAD_H_ |
| 6 #define CONTENT_CHILD_CHILD_THREAD_H_ | 6 #define CONTENT_CHILD_CHILD_THREAD_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/memory/shared_memory.h" | 10 #include "base/memory/shared_memory.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 // Creates the thread. | 43 // Creates the thread. |
| 44 ChildThread(); | 44 ChildThread(); |
| 45 // Used for single-process mode. | 45 // Used for single-process mode. |
| 46 explicit ChildThread(const std::string& channel_name); | 46 explicit ChildThread(const std::string& channel_name); |
| 47 // ChildProcess::main_thread() is reset after Shutdown(), and before the | 47 // ChildProcess::main_thread() is reset after Shutdown(), and before the |
| 48 // destructor, so any subsystem that relies on ChildProcess::main_thread() | 48 // destructor, so any subsystem that relies on ChildProcess::main_thread() |
| 49 // must be terminated before Shutdown returns. In particular, if a subsystem | 49 // must be terminated before Shutdown returns. In particular, if a subsystem |
| 50 // has a thread that post tasks to ChildProcess::main_thread(), that thread | 50 // has a thread that post tasks to ChildProcess::main_thread(), that thread |
| 51 // should be joined in Shutdown(). | 51 // should be joined in Shutdown(). |
| 52 virtual ~ChildThread(); | 52 virtual ~ChildThread(); |
| 53 virtual void Shutdown() = 0; | 53 virtual void Shutdown(); |
| 54 | 54 |
| 55 // IPC::Sender implementation: | 55 // IPC::Sender implementation: |
| 56 virtual bool Send(IPC::Message* msg) OVERRIDE; | 56 virtual bool Send(IPC::Message* msg) OVERRIDE; |
| 57 | 57 |
| 58 // See documentation on MessageRouter for AddRoute and RemoveRoute | 58 // See documentation on MessageRouter for AddRoute and RemoveRoute |
| 59 void AddRoute(int32 routing_id, IPC::Listener* listener); | 59 void AddRoute(int32 routing_id, IPC::Listener* listener); |
| 60 void RemoveRoute(int32 routing_id); | 60 void RemoveRoute(int32 routing_id); |
| 61 | 61 |
| 62 IPC::SyncChannel* channel() { return channel_.get(); } | 62 IPC::SyncChannel* channel() { return channel_.get(); } |
| 63 | 63 |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 scoped_refptr<ChildResourceMessageFilter> resource_message_filter_; | 185 scoped_refptr<ChildResourceMessageFilter> resource_message_filter_; |
| 186 | 186 |
| 187 base::WeakPtrFactory<ChildThread> channel_connected_factory_; | 187 base::WeakPtrFactory<ChildThread> channel_connected_factory_; |
| 188 | 188 |
| 189 DISALLOW_COPY_AND_ASSIGN(ChildThread); | 189 DISALLOW_COPY_AND_ASSIGN(ChildThread); |
| 190 }; | 190 }; |
| 191 | 191 |
| 192 } // namespace content | 192 } // namespace content |
| 193 | 193 |
| 194 #endif // CONTENT_CHILD_CHILD_THREAD_H_ | 194 #endif // CONTENT_CHILD_CHILD_THREAD_H_ |
| OLD | NEW |