| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_CROSS_MESSAGE_FILTER_H_ | 5 #ifndef CONTENT_CHILD_CROSS_MESSAGE_FILTER_H_ |
| 6 #define CONTENT_CHILD_CROSS_MESSAGE_FILTER_H_ | 6 #define CONTENT_CHILD_CROSS_MESSAGE_FILTER_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "ipc/ipc_sender.h" | 9 #include "ipc/ipc_sender.h" |
| 10 | 10 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 // PostTask() returns true but OnMessageReceived() is never called on the | 44 // PostTask() returns true but OnMessageReceived() is never called on the |
| 45 // target thread. By default this does nothing. | 45 // target thread. By default this does nothing. |
| 46 virtual void OnStaleMessageReceived(const IPC::Message& msg) {} | 46 virtual void OnStaleMessageReceived(const IPC::Message& msg) {} |
| 47 | 47 |
| 48 protected: | 48 protected: |
| 49 ChildMessageFilter(); | 49 ChildMessageFilter(); |
| 50 ~ChildMessageFilter() override; | 50 ~ChildMessageFilter() override; |
| 51 | 51 |
| 52 private: | 52 private: |
| 53 class Internal; | 53 class Internal; |
| 54 friend class ChildThread; | 54 friend class ChildThreadImpl; |
| 55 friend class RenderThreadImpl; | 55 friend class RenderThreadImpl; |
| 56 friend class WorkerThread; | 56 friend class WorkerThread; |
| 57 | 57 |
| 58 friend class base::RefCountedThreadSafe<ChildMessageFilter>; | 58 friend class base::RefCountedThreadSafe<ChildMessageFilter>; |
| 59 | 59 |
| 60 IPC::MessageFilter* GetFilter(); | 60 IPC::MessageFilter* GetFilter(); |
| 61 | 61 |
| 62 // This implements IPC::MessageFilter to hide the actual filter methods from | 62 // This implements IPC::MessageFilter to hide the actual filter methods from |
| 63 // child classes. | 63 // child classes. |
| 64 Internal* internal_; | 64 Internal* internal_; |
| 65 | 65 |
| 66 scoped_refptr<ThreadSafeSender> thread_safe_sender_; | 66 scoped_refptr<ThreadSafeSender> thread_safe_sender_; |
| 67 | 67 |
| 68 DISALLOW_COPY_AND_ASSIGN(ChildMessageFilter); | 68 DISALLOW_COPY_AND_ASSIGN(ChildMessageFilter); |
| 69 }; | 69 }; |
| 70 | 70 |
| 71 } // namespace content | 71 } // namespace content |
| 72 | 72 |
| 73 #endif // CONTENT_CHILD_CROSS_MESSAGE_FILTER_H_ | 73 #endif // CONTENT_CHILD_CROSS_MESSAGE_FILTER_H_ |
| OLD | NEW |