| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/status_icons/desktop_notification_balloon.h" | 5 #include "chrome/browser/status_icons/desktop_notification_balloon.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| 11 #include "base/single_thread_task_runner.h" | 11 #include "base/single_thread_task_runner.h" |
| 12 #include "base/strings/string_number_conversions.h" | 12 #include "base/strings/string_number_conversions.h" |
| 13 #include "base/thread_task_runner_handle.h" | |
| 14 #include "base/threading/thread_restrictions.h" | 13 #include "base/threading/thread_restrictions.h" |
| 14 #include "base/threading/thread_task_runner_handle.h" |
| 15 #include "chrome/browser/browser_process.h" | 15 #include "chrome/browser/browser_process.h" |
| 16 #include "chrome/browser/notifications/notification.h" | 16 #include "chrome/browser/notifications/notification.h" |
| 17 #include "chrome/browser/notifications/notification_delegate.h" | 17 #include "chrome/browser/notifications/notification_delegate.h" |
| 18 #include "chrome/browser/notifications/notification_ui_manager.h" | 18 #include "chrome/browser/notifications/notification_ui_manager.h" |
| 19 #include "chrome/browser/profiles/profile_manager.h" | 19 #include "chrome/browser/profiles/profile_manager.h" |
| 20 #include "third_party/skia/include/core/SkBitmap.h" | 20 #include "third_party/skia/include/core/SkBitmap.h" |
| 21 #include "ui/gfx/image/image_skia.h" | 21 #include "ui/gfx/image/image_skia.h" |
| 22 #include "ui/message_center/notification_types.h" | 22 #include "ui/message_center/notification_types.h" |
| 23 #include "ui/message_center/notifier_settings.h" | 23 #include "ui/message_center/notifier_settings.h" |
| 24 | 24 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 new DummyNotificationDelegate(base::IntToString(id_count_++), profile_); | 90 new DummyNotificationDelegate(base::IntToString(id_count_++), profile_); |
| 91 Notification notification(message_center::NOTIFICATION_TYPE_SIMPLE, title, | 91 Notification notification(message_center::NOTIFICATION_TYPE_SIMPLE, title, |
| 92 contents, gfx::Image(icon), notifier_id, base::string16(), GURL(), | 92 contents, gfx::Image(icon), notifier_id, base::string16(), GURL(), |
| 93 std::string(), message_center::RichNotificationData(), delegate); | 93 std::string(), message_center::RichNotificationData(), delegate); |
| 94 | 94 |
| 95 g_browser_process->notification_ui_manager()->Add(notification, profile); | 95 g_browser_process->notification_ui_manager()->Add(notification, profile); |
| 96 | 96 |
| 97 notification_id_ = notification.delegate_id(); | 97 notification_id_ = notification.delegate_id(); |
| 98 profile_ = profile; | 98 profile_ = profile; |
| 99 } | 99 } |
| OLD | NEW |