| 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_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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 namespace mojo { | 45 namespace mojo { |
| 46 namespace edk { | 46 namespace edk { |
| 47 class ScopedIPCSupport; | 47 class ScopedIPCSupport; |
| 48 } // namespace edk | 48 } // namespace edk |
| 49 } // namespace mojo | 49 } // namespace mojo |
| 50 | 50 |
| 51 namespace blink { | 51 namespace blink { |
| 52 class WebFrame; | 52 class WebFrame; |
| 53 } // namespace blink | 53 } // namespace blink |
| 54 | 54 |
| 55 namespace discardable_memory { |
| 56 class ClientDiscardableSharedMemoryManager; |
| 57 } // namespace discardable_memory |
| 58 |
| 55 namespace content { | 59 namespace content { |
| 56 class ChildMessageFilter; | 60 class ChildMessageFilter; |
| 57 class ChildDiscardableSharedMemoryManager; | |
| 58 class ChildHistogramMessageFilter; | 61 class ChildHistogramMessageFilter; |
| 59 class ChildResourceMessageFilter; | 62 class ChildResourceMessageFilter; |
| 60 class ChildSharedBitmapManager; | 63 class ChildSharedBitmapManager; |
| 61 class FileSystemDispatcher; | 64 class FileSystemDispatcher; |
| 62 class InProcessChildThreadParams; | 65 class InProcessChildThreadParams; |
| 63 class NotificationDispatcher; | 66 class NotificationDispatcher; |
| 64 class PushDispatcher; | 67 class PushDispatcher; |
| 65 class ServiceWorkerMessageFilter; | 68 class ServiceWorkerMessageFilter; |
| 66 class QuotaDispatcher; | 69 class QuotaDispatcher; |
| 67 class QuotaMessageFilter; | 70 class QuotaMessageFilter; |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 | 138 |
| 136 #if defined(OS_LINUX) | 139 #if defined(OS_LINUX) |
| 137 void SetThreadPriority(base::PlatformThreadId id, | 140 void SetThreadPriority(base::PlatformThreadId id, |
| 138 base::ThreadPriority priority); | 141 base::ThreadPriority priority); |
| 139 #endif | 142 #endif |
| 140 | 143 |
| 141 ChildSharedBitmapManager* shared_bitmap_manager() const { | 144 ChildSharedBitmapManager* shared_bitmap_manager() const { |
| 142 return shared_bitmap_manager_.get(); | 145 return shared_bitmap_manager_.get(); |
| 143 } | 146 } |
| 144 | 147 |
| 145 ChildDiscardableSharedMemoryManager* discardable_shared_memory_manager() | 148 discardable_memory::ClientDiscardableSharedMemoryManager* |
| 146 const { | 149 discardable_shared_memory_manager() const { |
| 147 return discardable_shared_memory_manager_.get(); | 150 return discardable_shared_memory_manager_.get(); |
| 148 } | 151 } |
| 149 | 152 |
| 150 ResourceDispatcher* resource_dispatcher() const { | 153 ResourceDispatcher* resource_dispatcher() const { |
| 151 return resource_dispatcher_.get(); | 154 return resource_dispatcher_.get(); |
| 152 } | 155 } |
| 153 | 156 |
| 154 FileSystemDispatcher* file_system_dispatcher() const { | 157 FileSystemDispatcher* file_system_dispatcher() const { |
| 155 return file_system_dispatcher_.get(); | 158 return file_system_dispatcher_.get(); |
| 156 } | 159 } |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 explicit ChildThreadMessageRouter(IPC::Sender* sender); | 240 explicit ChildThreadMessageRouter(IPC::Sender* sender); |
| 238 bool Send(IPC::Message* msg) override; | 241 bool Send(IPC::Message* msg) override; |
| 239 | 242 |
| 240 // MessageRouter overrides. | 243 // MessageRouter overrides. |
| 241 bool RouteMessage(const IPC::Message& msg) override; | 244 bool RouteMessage(const IPC::Message& msg) override; |
| 242 | 245 |
| 243 private: | 246 private: |
| 244 IPC::Sender* const sender_; | 247 IPC::Sender* const sender_; |
| 245 }; | 248 }; |
| 246 | 249 |
| 250 class ClientDiscardableSharedMemoryManagerDelegate; |
| 251 |
| 247 void Init(const Options& options); | 252 void Init(const Options& options); |
| 248 | 253 |
| 249 // We create the channel first without connecting it so we can add filters | 254 // We create the channel first without connecting it so we can add filters |
| 250 // prior to any messages being received, then connect it afterwards. | 255 // prior to any messages being received, then connect it afterwards. |
| 251 void ConnectChannel(); | 256 void ConnectChannel(); |
| 252 | 257 |
| 253 // IPC message handlers. | 258 // IPC message handlers. |
| 254 void OnShutdown(); | 259 void OnShutdown(); |
| 255 void OnSetProfilerStatus(tracked_objects::ThreadData::Status status); | 260 void OnSetProfilerStatus(tracked_objects::ThreadData::Status status); |
| 256 void OnGetChildProfilerData(int sequence_number, int current_profiling_phase); | 261 void OnGetChildProfilerData(int sequence_number, int current_profiling_phase); |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 scoped_refptr<ServiceWorkerMessageFilter> service_worker_message_filter_; | 329 scoped_refptr<ServiceWorkerMessageFilter> service_worker_message_filter_; |
| 325 | 330 |
| 326 scoped_refptr<QuotaMessageFilter> quota_message_filter_; | 331 scoped_refptr<QuotaMessageFilter> quota_message_filter_; |
| 327 | 332 |
| 328 scoped_refptr<NotificationDispatcher> notification_dispatcher_; | 333 scoped_refptr<NotificationDispatcher> notification_dispatcher_; |
| 329 | 334 |
| 330 scoped_refptr<PushDispatcher> push_dispatcher_; | 335 scoped_refptr<PushDispatcher> push_dispatcher_; |
| 331 | 336 |
| 332 std::unique_ptr<ChildSharedBitmapManager> shared_bitmap_manager_; | 337 std::unique_ptr<ChildSharedBitmapManager> shared_bitmap_manager_; |
| 333 | 338 |
| 334 std::unique_ptr<ChildDiscardableSharedMemoryManager> | 339 std::unique_ptr<discardable_memory::ClientDiscardableSharedMemoryManager> |
| 335 discardable_shared_memory_manager_; | 340 discardable_shared_memory_manager_; |
| 336 | 341 |
| 342 std::unique_ptr<ClientDiscardableSharedMemoryManagerDelegate> |
| 343 client_discardable_shared_memory_manager_delegate_; |
| 344 |
| 337 std::unique_ptr<base::PowerMonitor> power_monitor_; | 345 std::unique_ptr<base::PowerMonitor> power_monitor_; |
| 338 | 346 |
| 339 scoped_refptr<base::SequencedTaskRunner> browser_process_io_runner_; | 347 scoped_refptr<base::SequencedTaskRunner> browser_process_io_runner_; |
| 340 | 348 |
| 341 std::unique_ptr<base::WeakPtrFactory<ChildThreadImpl>> | 349 std::unique_ptr<base::WeakPtrFactory<ChildThreadImpl>> |
| 342 channel_connected_factory_; | 350 channel_connected_factory_; |
| 343 | 351 |
| 344 base::WeakPtrFactory<ChildThreadImpl> weak_factory_; | 352 base::WeakPtrFactory<ChildThreadImpl> weak_factory_; |
| 345 | 353 |
| 346 DISALLOW_COPY_AND_ASSIGN(ChildThreadImpl); | 354 DISALLOW_COPY_AND_ASSIGN(ChildThreadImpl); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 375 | 383 |
| 376 private: | 384 private: |
| 377 struct Options options_; | 385 struct Options options_; |
| 378 | 386 |
| 379 DISALLOW_COPY_AND_ASSIGN(Builder); | 387 DISALLOW_COPY_AND_ASSIGN(Builder); |
| 380 }; | 388 }; |
| 381 | 389 |
| 382 } // namespace content | 390 } // namespace content |
| 383 | 391 |
| 384 #endif // CONTENT_CHILD_CHILD_THREAD_IMPL_H_ | 392 #endif // CONTENT_CHILD_CHILD_THREAD_IMPL_H_ |
| OLD | NEW |