| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_NOTIFICATIONS_NOTIFICATION_DISPATCHER_H_ | 5 #ifndef CONTENT_CHILD_NOTIFICATIONS_NOTIFICATION_DISPATCHER_H_ |
| 6 #define CONTENT_CHILD_NOTIFICATIONS_NOTIFICATION_DISPATCHER_H_ | 6 #define CONTENT_CHILD_NOTIFICATIONS_NOTIFICATION_DISPATCHER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/synchronization/lock.h" | 10 #include "base/synchronization/lock.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 // WorkerThreadMessageFilter: | 27 // WorkerThreadMessageFilter: |
| 28 bool ShouldHandleMessage(const IPC::Message& msg) const override; | 28 bool ShouldHandleMessage(const IPC::Message& msg) const override; |
| 29 void OnFilteredMessageReceived(const IPC::Message& msg) override; | 29 void OnFilteredMessageReceived(const IPC::Message& msg) override; |
| 30 bool GetWorkerThreadIdForMessage(const IPC::Message& msg, | 30 bool GetWorkerThreadIdForMessage(const IPC::Message& msg, |
| 31 int* ipc_thread_id) override; | 31 int* ipc_thread_id) override; |
| 32 | 32 |
| 33 using NotificationIdToThreadId = std::map<int, int>; | 33 using NotificationIdToThreadId = std::map<int, int>; |
| 34 | 34 |
| 35 base::Lock notification_id_map_lock_; | 35 base::Lock notification_id_map_lock_; |
| 36 NotificationIdToThreadId notification_id_map_; | 36 NotificationIdToThreadId notification_id_map_; |
| 37 int next_notification_id_; | 37 int next_notification_id_ = 0; |
| 38 | 38 |
| 39 DISALLOW_COPY_AND_ASSIGN(NotificationDispatcher); | 39 DISALLOW_COPY_AND_ASSIGN(NotificationDispatcher); |
| 40 }; | 40 }; |
| 41 | 41 |
| 42 } // namespace content | 42 } // namespace content |
| 43 | 43 |
| 44 #endif // CONTENT_CHILD_NOTIFICATIONS_NOTIFICATION_DISPATCHER_H_ | 44 #endif // CONTENT_CHILD_NOTIFICATIONS_NOTIFICATION_DISPATCHER_H_ |
| OLD | NEW |