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/extensions/api/notifications/notifications_api.h" | 5 #include "chrome/browser/extensions/api/notifications/notifications_api.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/guid.h" | 8 #include "base/guid.h" |
9 #include "base/rand_util.h" | 9 #include "base/rand_util.h" |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
11 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
13 #include "chrome/browser/browser_process.h" | 13 #include "chrome/browser/browser_process.h" |
14 #include "chrome/browser/extensions/event_names.h" | 14 #include "chrome/browser/extensions/event_names.h" |
15 #include "chrome/browser/extensions/extension_system.h" | |
16 #include "chrome/browser/notifications/desktop_notification_service.h" | 15 #include "chrome/browser/notifications/desktop_notification_service.h" |
17 #include "chrome/browser/notifications/desktop_notification_service_factory.h" | 16 #include "chrome/browser/notifications/desktop_notification_service_factory.h" |
18 #include "chrome/browser/notifications/notification.h" | 17 #include "chrome/browser/notifications/notification.h" |
19 #include "chrome/browser/notifications/notification_ui_manager.h" | 18 #include "chrome/browser/notifications/notification_ui_manager.h" |
| 19 #include "chrome/browser/profiles/profile.h" |
20 #include "chrome/common/chrome_version_info.h" | 20 #include "chrome/common/chrome_version_info.h" |
21 #include "content/public/browser/render_process_host.h" | 21 #include "content/public/browser/render_process_host.h" |
22 #include "content/public/browser/render_view_host.h" | 22 #include "content/public/browser/render_view_host.h" |
23 #include "extensions/browser/event_router.h" | 23 #include "extensions/browser/event_router.h" |
| 24 #include "extensions/browser/extension_system.h" |
24 #include "extensions/common/extension.h" | 25 #include "extensions/common/extension.h" |
25 #include "extensions/common/features/feature.h" | 26 #include "extensions/common/features/feature.h" |
26 #include "third_party/skia/include/core/SkBitmap.h" | 27 #include "third_party/skia/include/core/SkBitmap.h" |
27 #include "ui/gfx/image/image.h" | 28 #include "ui/gfx/image/image.h" |
28 #include "ui/gfx/image/image_skia.h" | 29 #include "ui/gfx/image/image_skia.h" |
29 #include "ui/gfx/image/image_skia_rep.h" | 30 #include "ui/gfx/image/image_skia_rep.h" |
30 #include "ui/message_center/message_center_style.h" | 31 #include "ui/message_center/message_center_style.h" |
31 #include "ui/message_center/message_center_util.h" | 32 #include "ui/message_center/message_center_util.h" |
32 #include "ui/message_center/notifier_settings.h" | 33 #include "ui/message_center/notifier_settings.h" |
33 #include "url/gurl.h" | 34 #include "url/gurl.h" |
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
629 ? api::notifications::PERMISSION_LEVEL_GRANTED | 630 ? api::notifications::PERMISSION_LEVEL_GRANTED |
630 : api::notifications::PERMISSION_LEVEL_DENIED; | 631 : api::notifications::PERMISSION_LEVEL_DENIED; |
631 | 632 |
632 SetResult(new base::StringValue(api::notifications::ToString(result))); | 633 SetResult(new base::StringValue(api::notifications::ToString(result))); |
633 SendResponse(true); | 634 SendResponse(true); |
634 | 635 |
635 return true; | 636 return true; |
636 } | 637 } |
637 | 638 |
638 } // namespace extensions | 639 } // namespace extensions |
OLD | NEW |