Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(356)

Side by Side Diff: content/child/push_messaging/push_dispatcher.cc

Issue 793403002: Implement WebPushProvider.unregister() in Chromium. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mvan_2
Patch Set: jochen review comments Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « content/browser/push_messaging/push_messaging_message_filter.cc ('k') | content/child/push_messaging/push_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698