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

Side by Side Diff: content/child/notifications/notification_dispatcher.cc

Issue 758603002: Use Mojo Permission Service when requesting Notifications permission. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@permission_geolocation_follow_up
Patch Set: fixes to pass tests 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/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
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
OLDNEW
« no previous file with comments | « content/browser/permissions/permission_service_impl.cc ('k') | content/common/permission_service.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698