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 #include "content/child/notifications/notification_dispatcher.h" | 5 #include "content/child/notifications/notification_dispatcher.h" |
6 | 6 |
7 #include "base/message_loop/message_loop_proxy.h" | 7 #include "base/message_loop/message_loop_proxy.h" |
8 #include "content/child/notifications/notification_manager.h" | 8 #include "content/child/notifications/notification_manager.h" |
9 #include "content/child/thread_safe_sender.h" | 9 #include "content/child/thread_safe_sender.h" |
10 #include "content/child/worker_thread_task_runner.h" | 10 #include "content/child/worker_thread_task_runner.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 return false; | 56 return false; |
57 | 57 |
58 NotificationManager::ThreadSpecificInstance( | 58 NotificationManager::ThreadSpecificInstance( |
59 thread_safe_sender_.get(), | 59 thread_safe_sender_.get(), |
60 main_thread_loop_proxy_.get(), | 60 main_thread_loop_proxy_.get(), |
61 this)->OnMessageReceived(msg); | 61 this)->OnMessageReceived(msg); |
62 return true; | 62 return true; |
63 } | 63 } |
64 | 64 |
65 bool NotificationDispatcher::ShouldHandleMessage(const IPC::Message& msg) { | 65 bool NotificationDispatcher::ShouldHandleMessage(const IPC::Message& msg) { |
66 // The thread-safe message filter is responsible for handling all the messages | 66 return IPC_MESSAGE_CLASS(msg) == PlatformNotificationMsgStart; |
67 // except for the routed permission-request-completed message, which will be | |
68 // picked up by the RenderFrameImpl instead. | |
69 return IPC_MESSAGE_CLASS(msg) == PlatformNotificationMsgStart && | |
70 msg.type() != PlatformNotificationMsg_PermissionRequestComplete::ID; | |
71 } | 67 } |
72 | 68 |
73 } // namespace content | 69 } // namespace content |
OLD | NEW |