Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(440)

Side by Side Diff: chrome/browser/notifications/desktop_notification_service.cc

Issue 794633002: Remove ShowDesktopNotificationHostMsgParams in favor of PlatformNotificationData. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/notifications/platform_notification_service_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "chrome/browser/browser_process.h" 11 #include "chrome/browser/browser_process.h"
12 #include "chrome/browser/notifications/desktop_notification_profile_util.h" 12 #include "chrome/browser/notifications/desktop_notification_profile_util.h"
13 #include "chrome/browser/notifications/notification.h" 13 #include "chrome/browser/notifications/notification.h"
14 #include "chrome/browser/notifications/notification_object_proxy.h" 14 #include "chrome/browser/notifications/notification_object_proxy.h"
15 #include "chrome/browser/notifications/notification_ui_manager.h" 15 #include "chrome/browser/notifications/notification_ui_manager.h"
16 #include "chrome/browser/profiles/profile.h" 16 #include "chrome/browser/profiles/profile.h"
17 #include "chrome/browser/ui/browser.h" 17 #include "chrome/browser/ui/browser.h"
18 #include "chrome/common/pref_names.h" 18 #include "chrome/common/pref_names.h"
19 #include "components/content_settings/core/common/permission_request_id.h" 19 #include "components/content_settings/core/common/permission_request_id.h"
20 #include "components/pref_registry/pref_registry_syncable.h" 20 #include "components/pref_registry/pref_registry_syncable.h"
21 #include "content/public/browser/browser_thread.h" 21 #include "content/public/browser/browser_thread.h"
22 #include "content/public/browser/desktop_notification_delegate.h"
23 #include "content/public/common/show_desktop_notification_params.h"
24 #include "ui/base/webui/web_ui_util.h" 22 #include "ui/base/webui/web_ui_util.h"
25 #include "ui/message_center/notifier_settings.h" 23 #include "ui/message_center/notifier_settings.h"
26 24
27 #if defined(ENABLE_EXTENSIONS) 25 #if defined(ENABLE_EXTENSIONS)
28 #include "chrome/browser/extensions/api/notifications/notifications_api.h" 26 #include "chrome/browser/extensions/api/notifications/notifications_api.h"
29 #include "chrome/browser/extensions/extension_service.h" 27 #include "chrome/browser/extensions/extension_service.h"
30 #include "extensions/browser/event_router.h" 28 #include "extensions/browser/event_router.h"
31 #include "extensions/browser/extension_registry.h" 29 #include "extensions/browser/extension_registry.h"
32 #include "extensions/browser/extension_system.h" 30 #include "extensions/browser/extension_system.h"
33 #include "extensions/browser/extension_util.h" 31 #include "extensions/browser/extension_util.h"
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 // Tell the IO thread that this extension's permission for notifications 266 // Tell the IO thread that this extension's permission for notifications
269 // has changed. 267 // has changed.
270 extensions::InfoMap* extension_info_map = 268 extensions::InfoMap* extension_info_map =
271 extensions::ExtensionSystem::Get(profile_)->info_map(); 269 extensions::ExtensionSystem::Get(profile_)->info_map();
272 BrowserThread::PostTask( 270 BrowserThread::PostTask(
273 BrowserThread::IO, FROM_HERE, 271 BrowserThread::IO, FROM_HERE,
274 base::Bind(&extensions::InfoMap::SetNotificationsDisabled, 272 base::Bind(&extensions::InfoMap::SetNotificationsDisabled,
275 extension_info_map, notifier_id.id, !enabled)); 273 extension_info_map, notifier_id.id, !enabled));
276 #endif 274 #endif
277 } 275 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/notifications/platform_notification_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698