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

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

Issue 1014073002: Implement getting notifications up to the browser process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months 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 "content/child/notifications/notification_manager.h" 7 #include "content/child/notifications/notification_manager.h"
8 #include "content/common/platform_notification_messages.h"
9 8
10 namespace content { 9 namespace content {
11 10
12 NotificationDispatcher::NotificationDispatcher( 11 NotificationDispatcher::NotificationDispatcher(
13 ThreadSafeSender* thread_safe_sender) 12 ThreadSafeSender* thread_safe_sender)
14 : WorkerThreadMessageFilter(thread_safe_sender), next_notification_id_(0) { 13 : WorkerThreadMessageFilter(thread_safe_sender), next_notification_id_(0) {
15 } 14 }
16 15
17 NotificationDispatcher::~NotificationDispatcher() {} 16 NotificationDispatcher::~NotificationDispatcher() {}
18 17
(...skipping 25 matching lines...) Expand all
44 base::AutoLock lock(notification_id_map_lock_); 43 base::AutoLock lock(notification_id_map_lock_);
45 auto iterator = notification_id_map_.find(notification_id); 44 auto iterator = notification_id_map_.find(notification_id);
46 if (iterator != notification_id_map_.end()) { 45 if (iterator != notification_id_map_.end()) {
47 *ipc_thread_id = iterator->second; 46 *ipc_thread_id = iterator->second;
48 return true; 47 return true;
49 } 48 }
50 return false; 49 return false;
51 } 50 }
52 51
53 } // namespace content 52 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698