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/notifications/desktop_notification_service.h" | 5 #include "chrome/browser/notifications/desktop_notification_service.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
9 #include "base/prefs/scoped_user_pref_update.h" | 9 #include "base/prefs/scoped_user_pref_update.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
11 #include "base/threading/thread.h" | 11 #include "base/threading/thread.h" |
12 #include "chrome/browser/browser_process.h" | 12 #include "chrome/browser/browser_process.h" |
13 #include "chrome/browser/chrome_notification_types.h" | 13 #include "chrome/browser/chrome_notification_types.h" |
14 #include "chrome/browser/content_settings/content_settings_details.h" | |
15 #include "chrome/browser/content_settings/content_settings_provider.h" | |
16 #include "chrome/browser/notifications/desktop_notification_profile_util.h" | 14 #include "chrome/browser/notifications/desktop_notification_profile_util.h" |
17 #include "chrome/browser/notifications/desktop_notification_service_factory.h" | 15 #include "chrome/browser/notifications/desktop_notification_service_factory.h" |
18 #include "chrome/browser/notifications/notification.h" | 16 #include "chrome/browser/notifications/notification.h" |
19 #include "chrome/browser/notifications/notification_object_proxy.h" | 17 #include "chrome/browser/notifications/notification_object_proxy.h" |
20 #include "chrome/browser/notifications/notification_ui_manager.h" | 18 #include "chrome/browser/notifications/notification_ui_manager.h" |
21 #include "chrome/browser/notifications/sync_notifier/chrome_notifier_service.h" | 19 #include "chrome/browser/notifications/sync_notifier/chrome_notifier_service.h" |
22 #include "chrome/browser/notifications/sync_notifier/chrome_notifier_service_fac tory.h" | 20 #include "chrome/browser/notifications/sync_notifier/chrome_notifier_service_fac tory.h" |
23 #include "chrome/browser/profiles/profile.h" | 21 #include "chrome/browser/profiles/profile.h" |
24 #include "chrome/browser/ui/browser.h" | 22 #include "chrome/browser/ui/browser.h" |
25 #include "chrome/common/pref_names.h" | 23 #include "chrome/common/pref_names.h" |
26 #include "chrome/common/url_constants.h" | 24 #include "chrome/common/url_constants.h" |
25 #include "components/content_settings/core/browser/content_settings_details.h" | |
26 #include "components/content_settings/core/browser/content_settings_provider.h" | |
vabr (Chromium)
2014/09/18 08:54:57
You can remove this line, see https://codereview.c
vasilii
2014/09/18 09:45:41
Done.
| |
27 #include "components/pref_registry/pref_registry_syncable.h" | 27 #include "components/pref_registry/pref_registry_syncable.h" |
28 #include "content/public/browser/browser_thread.h" | 28 #include "content/public/browser/browser_thread.h" |
29 #include "content/public/browser/desktop_notification_delegate.h" | 29 #include "content/public/browser/desktop_notification_delegate.h" |
30 #include "content/public/browser/notification_service.h" | 30 #include "content/public/browser/notification_service.h" |
31 #include "content/public/browser/render_frame_host.h" | 31 #include "content/public/browser/render_frame_host.h" |
32 #include "content/public/browser/render_process_host.h" | 32 #include "content/public/browser/render_process_host.h" |
33 #include "content/public/browser/render_view_host.h" | 33 #include "content/public/browser/render_view_host.h" |
34 #include "content/public/browser/web_contents.h" | 34 #include "content/public/browser/web_contents.h" |
35 #include "content/public/common/show_desktop_notification_params.h" | 35 #include "content/public/common/show_desktop_notification_params.h" |
36 #include "ui/base/webui/web_ui_util.h" | 36 #include "ui/base/webui/web_ui_util.h" |
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
335 // Tell the IO thread that this extension's permission for notifications | 335 // Tell the IO thread that this extension's permission for notifications |
336 // has changed. | 336 // has changed. |
337 extensions::InfoMap* extension_info_map = | 337 extensions::InfoMap* extension_info_map = |
338 extensions::ExtensionSystem::Get(profile_)->info_map(); | 338 extensions::ExtensionSystem::Get(profile_)->info_map(); |
339 BrowserThread::PostTask( | 339 BrowserThread::PostTask( |
340 BrowserThread::IO, FROM_HERE, | 340 BrowserThread::IO, FROM_HERE, |
341 base::Bind(&extensions::InfoMap::SetNotificationsDisabled, | 341 base::Bind(&extensions::InfoMap::SetNotificationsDisabled, |
342 extension_info_map, notifier_id.id, !enabled)); | 342 extension_info_map, notifier_id.id, !enabled)); |
343 #endif | 343 #endif |
344 } | 344 } |
OLD | NEW |