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

Side by Side Diff: content/child/notifications/notification_manager.h

Issue 803523002: Remove a renderer -> browser roundtrip for resolving the showNotification promise. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@n-rename-params
Patch Set: remove blank link 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 #ifndef CONTENT_CHILD_NOTIFICATIONS_NOTIFICATION_MANAGER_H_ 5 #ifndef CONTENT_CHILD_NOTIFICATIONS_NOTIFICATION_MANAGER_H_
6 #define CONTENT_CHILD_NOTIFICATIONS_NOTIFICATION_MANAGER_H_ 6 #define CONTENT_CHILD_NOTIFICATIONS_NOTIFICATION_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 10
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 // Called by the NotificationDispatcher. 62 // Called by the NotificationDispatcher.
63 bool OnMessageReceived(const IPC::Message& message); 63 bool OnMessageReceived(const IPC::Message& message);
64 64
65 private: 65 private:
66 NotificationManager( 66 NotificationManager(
67 ThreadSafeSender* thread_safe_sender, 67 ThreadSafeSender* thread_safe_sender,
68 base::SingleThreadTaskRunner* main_thread_task_runner, 68 base::SingleThreadTaskRunner* main_thread_task_runner,
69 NotificationDispatcher* notification_dispatcher); 69 NotificationDispatcher* notification_dispatcher);
70 70
71 // IPC message handlers. 71 // IPC message handlers.
72 void OnDidShowPersistent(int request_id);
73 void OnDidShow(int notification_id); 72 void OnDidShow(int notification_id);
74 void OnDidClose(int notification_id); 73 void OnDidClose(int notification_id);
75 void OnDidClick(int notification_id); 74 void OnDidClick(int notification_id);
76 75
77 // Asynchronously starts loading |image_url| on the main thread and returns a 76 // Asynchronously starts loading |image_url| on the main thread and returns a
78 // reference to the notification image loaded responsible for this. |callback| 77 // reference to the notification image loaded responsible for this. |callback|
79 // will be invoked on the calling thread when the load is complete. 78 // will be invoked on the calling thread when the load is complete.
80 scoped_refptr<NotificationImageLoader> CreateImageLoader( 79 scoped_refptr<NotificationImageLoader> CreateImageLoader(
81 const blink::WebURL& image_url, 80 const blink::WebURL& image_url,
82 const NotificationImageLoadedCallback& callback) const; 81 const NotificationImageLoadedCallback& callback) const;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 std::map<int, blink::WebNotificationDelegate*> active_notifications_; 123 std::map<int, blink::WebNotificationDelegate*> active_notifications_;
125 124
126 base::WeakPtrFactory<NotificationManager> weak_factory_; 125 base::WeakPtrFactory<NotificationManager> weak_factory_;
127 126
128 DISALLOW_COPY_AND_ASSIGN(NotificationManager); 127 DISALLOW_COPY_AND_ASSIGN(NotificationManager);
129 }; 128 };
130 129
131 } // namespace content 130 } // namespace content
132 131
133 #endif // CONTENT_CHILD_NOTIFICATIONS_NOTIFICATION_MANAGER_H_ 132 #endif // CONTENT_CHILD_NOTIFICATIONS_NOTIFICATION_MANAGER_H_
OLDNEW
« no previous file with comments | « content/browser/notifications/notification_message_filter.cc ('k') | content/child/notifications/notification_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698