Index: content/common/child_thread.h |
=================================================================== |
--- content/common/child_thread.h (revision 150143) |
+++ content/common/child_thread.h (working copy) |
@@ -7,6 +7,7 @@ |
#include "base/basictypes.h" |
#include "base/memory/scoped_ptr.h" |
+#include "base/memory/weak_ptr.h" |
#include "base/shared_memory.h" |
#include "base/tracked_objects.h" |
#include "content/common/content_export.h" |
@@ -100,17 +101,7 @@ |
void OnProcessFinalRelease(); |
virtual bool OnControlMessageReceived(const IPC::Message& msg); |
- virtual void OnShutdown(); |
-#ifdef IPC_MESSAGE_LOG_ENABLED |
- virtual void OnSetIPCLoggingEnabled(bool enable); |
-#endif |
- |
- virtual void OnSetProfilerStatus(tracked_objects::ThreadData::Status status); |
- virtual void OnGetChildProfilerData(int sequence_number); |
- |
- virtual void OnDumpHandles(); |
- |
void set_on_channel_error_called(bool on_channel_error_called) { |
on_channel_error_called_ = on_channel_error_called; |
} |
@@ -123,10 +114,20 @@ |
private: |
void Init(); |
+ // IPC message handlers. |
+ void OnShutdown(); |
+ void OnSetProfilerStatus(tracked_objects::ThreadData::Status status); |
+ void OnGetChildProfilerData(int sequence_number); |
+ void OnDumpHandles(); |
+#ifdef IPC_MESSAGE_LOG_ENABLED |
+ void OnSetIPCLoggingEnabled(bool enable); |
+#endif |
#if defined(USE_TCMALLOC) |
void OnGetTcmallocStats(); |
#endif |
+ void EnsureConnected(); |
+ |
std::string channel_name_; |
scoped_ptr<IPC::SyncChannel> channel_; |
@@ -154,6 +155,8 @@ |
scoped_refptr<content::ChildHistogramMessageFilter> histogram_message_filter_; |
+ base::WeakPtrFactory<ChildThread> channel_connected_factory_; |
+ |
DISALLOW_COPY_AND_ASSIGN(ChildThread); |
}; |