Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Side by Side Diff: content/child/child_thread_impl.h

Issue 2119973002: Port WebSockets to Mojo IPC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unused code Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_IMPL_H_ 5 #ifndef CONTENT_CHILD_CHILD_THREAD_IMPL_H_
6 #define CONTENT_CHILD_CHILD_THREAD_IMPL_H_ 6 #define CONTENT_CHILD_CHILD_THREAD_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 class ChildSharedBitmapManager; 54 class ChildSharedBitmapManager;
55 class FileSystemDispatcher; 55 class FileSystemDispatcher;
56 class InProcessChildThreadParams; 56 class InProcessChildThreadParams;
57 class NotificationDispatcher; 57 class NotificationDispatcher;
58 class PushDispatcher; 58 class PushDispatcher;
59 class ServiceWorkerMessageFilter; 59 class ServiceWorkerMessageFilter;
60 class QuotaDispatcher; 60 class QuotaDispatcher;
61 class QuotaMessageFilter; 61 class QuotaMessageFilter;
62 class ResourceDispatcher; 62 class ResourceDispatcher;
63 class ThreadSafeSender; 63 class ThreadSafeSender;
64 class WebSocketDispatcher;
65 class WebSocketMessageFilter;
66 struct RequestInfo; 64 struct RequestInfo;
67 65
68 // The main thread of a child process derives from this class. 66 // The main thread of a child process derives from this class.
69 class CONTENT_EXPORT ChildThreadImpl 67 class CONTENT_EXPORT ChildThreadImpl
70 : public IPC::Listener, 68 : public IPC::Listener,
71 virtual public ChildThread, 69 virtual public ChildThread,
72 public NON_EXPORTED_BASE(shell::Service){ 70 public NON_EXPORTED_BASE(shell::Service){
73 public: 71 public:
74 struct CONTENT_EXPORT Options; 72 struct CONTENT_EXPORT Options;
75 73
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 132
135 ChildDiscardableSharedMemoryManager* discardable_shared_memory_manager() 133 ChildDiscardableSharedMemoryManager* discardable_shared_memory_manager()
136 const { 134 const {
137 return discardable_shared_memory_manager_.get(); 135 return discardable_shared_memory_manager_.get();
138 } 136 }
139 137
140 ResourceDispatcher* resource_dispatcher() const { 138 ResourceDispatcher* resource_dispatcher() const {
141 return resource_dispatcher_.get(); 139 return resource_dispatcher_.get();
142 } 140 }
143 141
144 WebSocketDispatcher* websocket_dispatcher() const {
145 return websocket_dispatcher_.get();
146 }
147
148 FileSystemDispatcher* file_system_dispatcher() const { 142 FileSystemDispatcher* file_system_dispatcher() const {
149 return file_system_dispatcher_.get(); 143 return file_system_dispatcher_.get();
150 } 144 }
151 145
152 QuotaDispatcher* quota_dispatcher() const { 146 QuotaDispatcher* quota_dispatcher() const {
153 return quota_dispatcher_.get(); 147 return quota_dispatcher_.get();
154 } 148 }
155 149
156 NotificationDispatcher* notification_dispatcher() const { 150 NotificationDispatcher* notification_dispatcher() const {
157 return notification_dispatcher_.get(); 151 return notification_dispatcher_.get();
(...skipping 23 matching lines...) Expand all
181 } 175 }
182 176
183 QuotaMessageFilter* quota_message_filter() const { 177 QuotaMessageFilter* quota_message_filter() const {
184 return quota_message_filter_.get(); 178 return quota_message_filter_.get();
185 } 179 }
186 180
187 ChildResourceMessageFilter* child_resource_message_filter() const { 181 ChildResourceMessageFilter* child_resource_message_filter() const {
188 return resource_message_filter_.get(); 182 return resource_message_filter_.get();
189 } 183 }
190 184
191 WebSocketMessageFilter* websocket_message_filter() const {
192 return websocket_message_filter_.get();
193 }
194
195 base::MessageLoop* message_loop() const { return message_loop_; } 185 base::MessageLoop* message_loop() const { return message_loop_; }
196 186
197 // Returns the one child thread. Can only be called on the main thread. 187 // Returns the one child thread. Can only be called on the main thread.
198 static ChildThreadImpl* current(); 188 static ChildThreadImpl* current();
199 189
200 #if defined(OS_ANDROID) 190 #if defined(OS_ANDROID)
201 // Called on Android's service thread to shutdown the main thread of this 191 // Called on Android's service thread to shutdown the main thread of this
202 // process. 192 // process.
203 static void ShutdownThread(); 193 static void ShutdownThread();
204 #endif 194 #endif
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 255
266 scoped_refptr<ThreadSafeSender> thread_safe_sender_; 256 scoped_refptr<ThreadSafeSender> thread_safe_sender_;
267 257
268 // Implements message routing functionality to the consumers of 258 // Implements message routing functionality to the consumers of
269 // ChildThreadImpl. 259 // ChildThreadImpl.
270 ChildThreadMessageRouter router_; 260 ChildThreadMessageRouter router_;
271 261
272 // Handles resource loads for this process. 262 // Handles resource loads for this process.
273 std::unique_ptr<ResourceDispatcher> resource_dispatcher_; 263 std::unique_ptr<ResourceDispatcher> resource_dispatcher_;
274 264
275 std::unique_ptr<WebSocketDispatcher> websocket_dispatcher_;
276
277 // The OnChannelError() callback was invoked - the channel is dead, don't 265 // The OnChannelError() callback was invoked - the channel is dead, don't
278 // attempt to communicate. 266 // attempt to communicate.
279 bool on_channel_error_called_; 267 bool on_channel_error_called_;
280 268
281 base::MessageLoop* message_loop_; 269 base::MessageLoop* message_loop_;
282 270
283 std::unique_ptr<FileSystemDispatcher> file_system_dispatcher_; 271 std::unique_ptr<FileSystemDispatcher> file_system_dispatcher_;
284 272
285 std::unique_ptr<QuotaDispatcher> quota_dispatcher_; 273 std::unique_ptr<QuotaDispatcher> quota_dispatcher_;
286 274
287 scoped_refptr<ChildHistogramMessageFilter> histogram_message_filter_; 275 scoped_refptr<ChildHistogramMessageFilter> histogram_message_filter_;
288 276
289 scoped_refptr<ChildResourceMessageFilter> resource_message_filter_; 277 scoped_refptr<ChildResourceMessageFilter> resource_message_filter_;
290 278
291 scoped_refptr<ServiceWorkerMessageFilter> service_worker_message_filter_; 279 scoped_refptr<ServiceWorkerMessageFilter> service_worker_message_filter_;
292 280
293 scoped_refptr<QuotaMessageFilter> quota_message_filter_; 281 scoped_refptr<QuotaMessageFilter> quota_message_filter_;
294 282
295 scoped_refptr<WebSocketMessageFilter> websocket_message_filter_;
296
297 scoped_refptr<NotificationDispatcher> notification_dispatcher_; 283 scoped_refptr<NotificationDispatcher> notification_dispatcher_;
298 284
299 scoped_refptr<PushDispatcher> push_dispatcher_; 285 scoped_refptr<PushDispatcher> push_dispatcher_;
300 286
301 std::unique_ptr<ChildSharedBitmapManager> shared_bitmap_manager_; 287 std::unique_ptr<ChildSharedBitmapManager> shared_bitmap_manager_;
302 288
303 std::unique_ptr<ChildGpuMemoryBufferManager> gpu_memory_buffer_manager_; 289 std::unique_ptr<ChildGpuMemoryBufferManager> gpu_memory_buffer_manager_;
304 290
305 std::unique_ptr<ChildDiscardableSharedMemoryManager> 291 std::unique_ptr<ChildDiscardableSharedMemoryManager>
306 discardable_shared_memory_manager_; 292 discardable_shared_memory_manager_;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 330
345 private: 331 private:
346 struct Options options_; 332 struct Options options_;
347 333
348 DISALLOW_COPY_AND_ASSIGN(Builder); 334 DISALLOW_COPY_AND_ASSIGN(Builder);
349 }; 335 };
350 336
351 } // namespace content 337 } // namespace content
352 338
353 #endif // CONTENT_CHILD_CHILD_THREAD_IMPL_H_ 339 #endif // CONTENT_CHILD_CHILD_THREAD_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698