OLD | NEW |
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_manager.h" | 5 #include "content/child/notifications/notification_manager.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 | 8 |
9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
10 #include "base/metrics/histogram_macros.h" | 10 #include "base/metrics/histogram_macros.h" |
11 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
12 #include "base/thread_task_runner_handle.h" | 12 #include "base/thread_task_runner_handle.h" |
13 #include "base/threading/thread_local.h" | 13 #include "base/threading/thread_local.h" |
14 #include "content/child/notifications/notification_data_conversions.h" | 14 #include "content/child/notifications/notification_data_conversions.h" |
15 #include "content/child/notifications/notification_dispatcher.h" | 15 #include "content/child/notifications/notification_dispatcher.h" |
16 #include "content/child/service_worker/web_service_worker_registration_impl.h" | 16 #include "content/child/service_worker/web_service_worker_registration_impl.h" |
17 #include "content/child/thread_safe_sender.h" | 17 #include "content/child/thread_safe_sender.h" |
18 #include "content/common/notification_constants.h" | |
19 #include "content/public/common/platform_notification_data.h" | 18 #include "content/public/common/platform_notification_data.h" |
20 #include "third_party/WebKit/public/platform/WebSecurityOrigin.h" | 19 #include "third_party/WebKit/public/platform/WebSecurityOrigin.h" |
21 #include "third_party/WebKit/public/platform/modules/notifications/WebNotificati
onDelegate.h" | 20 #include "third_party/WebKit/public/platform/modules/notifications/WebNotificati
onDelegate.h" |
22 #include "third_party/skia/include/core/SkBitmap.h" | 21 #include "third_party/skia/include/core/SkBitmap.h" |
23 | 22 |
24 using blink::WebNotificationPermission; | 23 using blink::WebNotificationPermission; |
25 | 24 |
26 namespace content { | 25 namespace content { |
27 namespace { | 26 namespace { |
28 | 27 |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 | 339 |
341 // TODO(mkwst): This is potentially doing the wrong thing with unique | 340 // TODO(mkwst): This is potentially doing the wrong thing with unique |
342 // origins. Perhaps also 'file:', 'blob:' and 'filesystem:'. See | 341 // origins. Perhaps also 'file:', 'blob:' and 'filesystem:'. See |
343 // https://crbug.com/490074 for detail. | 342 // https://crbug.com/490074 for detail. |
344 thread_safe_sender_->Send(new PlatformNotificationHostMsg_ShowPersistent( | 343 thread_safe_sender_->Send(new PlatformNotificationHostMsg_ShowPersistent( |
345 request_id, service_worker_registration_id, GURL(origin.toString()), icon, | 344 request_id, service_worker_registration_id, GURL(origin.toString()), icon, |
346 ToPlatformNotificationData(notification_data))); | 345 ToPlatformNotificationData(notification_data))); |
347 } | 346 } |
348 | 347 |
349 } // namespace content | 348 } // namespace content |
OLD | NEW |