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

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

Issue 776813004: Introduce new content APIs for persistent notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@n-sw-contentclient
Patch Set: 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
OLDNEW
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 "chrome/browser/notifications/platform_notification_service_impl.h" 5 #include "chrome/browser/notifications/platform_notification_service_impl.h"
6 6
7 #include "chrome/browser/notifications/desktop_notification_service.h" 7 #include "chrome/browser/notifications/desktop_notification_service.h"
8 #include "chrome/browser/notifications/desktop_notification_service_factory.h" 8 #include "chrome/browser/notifications/desktop_notification_service_factory.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/profiles/profile_io_data.h" 10 #include "chrome/browser/profiles/profile_io_data.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 88
89 DesktopNotificationService* service = 89 DesktopNotificationService* service =
90 DesktopNotificationServiceFactory::GetForProfile(profile); 90 DesktopNotificationServiceFactory::GetForProfile(profile);
91 DCHECK(service); 91 DCHECK(service);
92 92
93 service->ShowDesktopNotification( 93 service->ShowDesktopNotification(
94 params, render_process_id, delegate.Pass(), cancel_callback); 94 params, render_process_id, delegate.Pass(), cancel_callback);
95 profile->GetHostContentSettingsMap()->UpdateLastUsage( 95 profile->GetHostContentSettingsMap()->UpdateLastUsage(
96 params.origin, params.origin, CONTENT_SETTINGS_TYPE_NOTIFICATIONS); 96 params.origin, params.origin, CONTENT_SETTINGS_TYPE_NOTIFICATIONS);
97 } 97 }
98
99 void PlatformNotificationServiceImpl::DisplayPersistentNotification(
100 content::BrowserContext* browser_context,
101 int64 service_worker_registration_id,
102 const content::ShowDesktopNotificationHostMsgParams& params,
103 int render_process_id) {
104 NOTIMPLEMENTED();
105 }
106
107 void PlatformNotificationServiceImpl::ClosePersistentNotification(
108 content::BrowserContext* browser_context,
109 const std::string& persistent_notification_id) {
110 NOTIMPLEMENTED();
111 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698