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" |
11 #include "base/shared_memory.h" | 11 #include "base/shared_memory.h" |
12 #include "base/tracked_objects.h" | 12 #include "base/tracked_objects.h" |
13 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
14 #include "content/common/message_router.h" | 14 #include "content/common/message_router.h" |
15 #include "webkit/glue/resource_loader_bridge.h" | 15 #include "webkit/glue/resource_loader_bridge.h" |
16 | 16 |
| 17 class ChildHistogramMessageFilter; |
17 class FileSystemDispatcher; | 18 class FileSystemDispatcher; |
18 class MessageLoop; | 19 class MessageLoop; |
19 class QuotaDispatcher; | 20 class QuotaDispatcher; |
20 class ResourceDispatcher; | 21 class ResourceDispatcher; |
21 class SocketStreamDispatcher; | 22 class SocketStreamDispatcher; |
22 | 23 |
23 namespace IPC { | 24 namespace IPC { |
24 class SyncChannel; | 25 class SyncChannel; |
25 class SyncMessageFilter; | 26 class SyncMessageFilter; |
26 } | 27 } |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 } | 73 } |
73 | 74 |
74 QuotaDispatcher* quota_dispatcher() const { | 75 QuotaDispatcher* quota_dispatcher() const { |
75 return quota_dispatcher_.get(); | 76 return quota_dispatcher_.get(); |
76 } | 77 } |
77 | 78 |
78 // Safe to call on any thread, as long as it's guaranteed that the thread's | 79 // Safe to call on any thread, as long as it's guaranteed that the thread's |
79 // lifetime is less than the main thread. | 80 // lifetime is less than the main thread. |
80 IPC::SyncMessageFilter* sync_message_filter(); | 81 IPC::SyncMessageFilter* sync_message_filter(); |
81 | 82 |
| 83 ChildHistogramMessageFilter* child_histogram_message_filter() const { |
| 84 return histogram_message_filter_; |
| 85 } |
| 86 |
82 MessageLoop* message_loop(); | 87 MessageLoop* message_loop(); |
83 | 88 |
84 // Returns the one child thread. | 89 // Returns the one child thread. |
85 static ChildThread* current(); | 90 static ChildThread* current(); |
86 | 91 |
87 virtual bool IsWebFrameValid(WebKit::WebFrame* frame); | 92 virtual bool IsWebFrameValid(WebKit::WebFrame* frame); |
88 | 93 |
89 protected: | 94 protected: |
90 friend class ChildProcess; | 95 friend class ChildProcess; |
91 | 96 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 // The OnChannelError() callback was invoked - the channel is dead, don't | 142 // The OnChannelError() callback was invoked - the channel is dead, don't |
138 // attempt to communicate. | 143 // attempt to communicate. |
139 bool on_channel_error_called_; | 144 bool on_channel_error_called_; |
140 | 145 |
141 MessageLoop* message_loop_; | 146 MessageLoop* message_loop_; |
142 | 147 |
143 scoped_ptr<FileSystemDispatcher> file_system_dispatcher_; | 148 scoped_ptr<FileSystemDispatcher> file_system_dispatcher_; |
144 | 149 |
145 scoped_ptr<QuotaDispatcher> quota_dispatcher_; | 150 scoped_ptr<QuotaDispatcher> quota_dispatcher_; |
146 | 151 |
| 152 ChildHistogramMessageFilter* histogram_message_filter_; |
| 153 |
147 DISALLOW_COPY_AND_ASSIGN(ChildThread); | 154 DISALLOW_COPY_AND_ASSIGN(ChildThread); |
148 }; | 155 }; |
149 | 156 |
150 #endif // CONTENT_COMMON_CHILD_THREAD_H_ | 157 #endif // CONTENT_COMMON_CHILD_THREAD_H_ |
OLD | NEW |