OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/pending_notifications_tracker.h" | 5 #include "content/child/notifications/pending_notifications_tracker.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/thread_task_runner_handle.h" | 9 #include "base/thread_task_runner_handle.h" |
10 #include "content/child/notifications/notification_image_loader.h" | 10 #include "content/child/notifications/notification_image_loader.h" |
11 #include "content/child/notifications/notification_manager.h" | 11 #include "content/child/notifications/notification_manager.h" |
12 #include "third_party/WebKit/public/platform/WebSerializedOrigin.h" | |
13 #include "third_party/WebKit/public/platform/modules/notifications/WebNotificati
onData.h" | 12 #include "third_party/WebKit/public/platform/modules/notifications/WebNotificati
onData.h" |
14 #include "third_party/skia/include/core/SkBitmap.h" | 13 #include "third_party/skia/include/core/SkBitmap.h" |
15 | 14 |
16 namespace content { | 15 namespace content { |
17 | 16 |
18 // Stores the information associated with a pending notification. | 17 // Stores the information associated with a pending notification. |
19 struct PendingNotificationsTracker::PendingNotification { | 18 struct PendingNotificationsTracker::PendingNotification { |
20 PendingNotification( | 19 PendingNotification( |
21 const scoped_refptr<NotificationImageLoader>& image_loader, | 20 const scoped_refptr<NotificationImageLoader>& image_loader, |
22 const NotificationResourcesFetchedCallback& callback) | 21 const NotificationResourcesFetchedCallback& callback) |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 | 106 |
108 main_thread_task_runner_->PostTask( | 107 main_thread_task_runner_->PostTask( |
109 FROM_HERE, base::Bind(&NotificationImageLoader::StartOnMainThread, | 108 FROM_HERE, base::Bind(&NotificationImageLoader::StartOnMainThread, |
110 image_loader, notification_id, | 109 image_loader, notification_id, |
111 GURL(notification_data.icon.spec()))); | 110 GURL(notification_data.icon.spec()))); |
112 | 111 |
113 return notification_id; | 112 return notification_id; |
114 } | 113 } |
115 | 114 |
116 } // namespace content | 115 } // namespace content |
OLD | NEW |