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

Unified Diff: content/child/notifications/pending_notifications_tracker.h

Issue 1237973005: [WIP] Implement notification sound loader Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: content/child/notifications/pending_notifications_tracker.h
diff --git a/content/child/notifications/pending_notifications_tracker.h b/content/child/notifications/pending_notifications_tracker.h
index 2d9d3b5b317652d364b6a5e67e44b75ba15facf6..b12819a3ac15654352c7e7b6e90bcaf50254797f 100644
--- a/content/child/notifications/pending_notifications_tracker.h
+++ b/content/child/notifications/pending_notifications_tracker.h
@@ -29,6 +29,7 @@ class WebSerializedOrigin;
namespace content {
class NotificationImageLoader;
+class NotificationSoundLoader;
class NotificationManager;
// Type definition for the callback signature which is to be invoked when the
@@ -69,23 +70,42 @@ class PendingNotificationsTracker {
private:
// To be called on the worker thread when the pending page notification
// identified by |notification_id| has finished fetching the icon.
- void DidFetchPageNotification(blink::WebNotificationDelegate* delegate,
+ void DidFetchPageNotificationIcon(blink::WebNotificationDelegate* delegate,
int notification_id,
const SkBitmap& icon);
+ // To be called on the worker thread when the pending page notification
+ // identified by |notification_id| has finished fetching the sound.
+ void DidFetchPageNotificationSound(blink::WebNotificationDelegate* delegate,
+ int notification_id,
+ const SkBitmap& sound);
+
// To be called on the worker thread when the pending persistent notification
// identified by |notification_id| has finished fetching the icon.
- void DidFetchPersistentNotification(int notification_id,
+ void DidFetchPersistentNotificationIcon(int notification_id,
const SkBitmap& icon);
- // Common code for starting to fetch resources associated with any kind of
+ // To be called on the worker thread when the pending persistent notification
+ // identified by |notification_id| has finished fetching the sound.
+ void DidFetchPersistentNotificationSound(int notification_id,
+ const SkBitmap& sound);
+
+ // Common code for starting to fetch icon associated with any kind of
// notification. Will return the id of the pending notification as allocated
// in the |pending_notifications_| map.
- int FetchNotificationResources(
+ int FetchNotificationIcon(
const blink::WebNotificationData& notification_data,
const NotificationResourcesFetchedCallback& callback,
const scoped_refptr<NotificationImageLoader>& image_loader);
+ // Common code for starting to fetch sound associated with any kind of
+ // notification. Will return the id of the pending notification as allocated
+ // in the |pending_notifications_| map.
+ int FetchNotificationSound(
+ const blink::WebNotificationData& notification_data,
+ const NotificationResourcesFetchedCallback& callback,
+ const scoped_refptr<NotificationSoundLoader>& sound_loader);
+
scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_;
struct PendingNotification;
« no previous file with comments | « content/child/notifications/notification_sound_loader.cc ('k') | content/child/notifications/pending_notifications_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698