| 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/push_messaging/push_dispatcher.h" | 5 #include "content/child/push_messaging/push_dispatcher.h" |
| 6 | 6 |
| 7 #include "base/message_loop/message_loop_proxy.h" | 7 #include "base/message_loop/message_loop_proxy.h" |
| 8 #include "base/pickle.h" | 8 #include "base/pickle.h" |
| 9 #include "content/child/push_messaging/push_provider.h" | 9 #include "content/child/push_messaging/push_provider.h" |
| 10 #include "content/child/thread_safe_sender.h" | 10 #include "content/child/thread_safe_sender.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 } | 65 } |
| 66 | 66 |
| 67 bool PushDispatcher::ShouldHandleMessage(const IPC::Message& msg) { | 67 bool PushDispatcher::ShouldHandleMessage(const IPC::Message& msg) { |
| 68 // Note that not all Push API IPC messages flow through this class. A subset | 68 // Note that not all Push API IPC messages flow through this class. A subset |
| 69 // of the API functionality requires a direct association with a document and | 69 // of the API functionality requires a direct association with a document and |
| 70 // a frame, and for those cases the IPC messages are handled by a | 70 // a frame, and for those cases the IPC messages are handled by a |
| 71 // RenderFrameObserver. | 71 // RenderFrameObserver. |
| 72 return msg.type() == PushMessagingMsg_RegisterFromWorkerSuccess::ID || | 72 return msg.type() == PushMessagingMsg_RegisterFromWorkerSuccess::ID || |
| 73 msg.type() == PushMessagingMsg_RegisterFromWorkerError::ID || | 73 msg.type() == PushMessagingMsg_RegisterFromWorkerError::ID || |
| 74 msg.type() == PushMessagingMsg_GetPermissionStatusSuccess::ID || | 74 msg.type() == PushMessagingMsg_GetPermissionStatusSuccess::ID || |
| 75 msg.type() == PushMessagingMsg_GetPermissionStatusError::ID; | 75 msg.type() == PushMessagingMsg_GetPermissionStatusError::ID || |
| 76 msg.type() == PushMessagingMsg_UnregisterSuccess::ID || |
| 77 msg.type() == PushMessagingMsg_UnregisterError::ID; |
| 76 } | 78 } |
| 77 | 79 |
| 78 } // namespace content | 80 } // namespace content |
| OLD | NEW |