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

Side by Side Diff: chrome/browser/notifications/persistent_notification_handler.h

Issue 2917923004: Move handler processing to NotificationDisplayService
Patch Set: Created 3 years, 6 months 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #ifndef CHROME_BROWSER_NOTIFICATIONS_PERSISTENT_NOTIFICATION_HANDLER_H_ 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_PERSISTENT_NOTIFICATION_HANDLER_H_
6 #define CHROME_BROWSER_NOTIFICATIONS_PERSISTENT_NOTIFICATION_HANDLER_H_ 6 #define CHROME_BROWSER_NOTIFICATIONS_PERSISTENT_NOTIFICATION_HANDLER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "chrome/browser/notifications/notification_handler.h" 9 #include "chrome/browser/notifications/notification_handler.h"
10 10
11 // NotificationHandler implementation for persistent, service worker backed, 11 // NotificationHandler implementation for persistent, service worker backed,
12 // notifications. 12 // notifications.
13 class PersistentNotificationHandler : public NotificationHandler { 13 class PersistentNotificationHandler : public NotificationHandler {
14 public: 14 public:
15 PersistentNotificationHandler(); 15 PersistentNotificationHandler();
16 ~PersistentNotificationHandler() override; 16 ~PersistentNotificationHandler() override;
17 17
18 // NotificationHandler implementation. 18 // NotificationHandler implementation.
19 void OnShow(Profile* profile, const std::string& notification_id) override;
19 void OnClose(Profile* profile, 20 void OnClose(Profile* profile,
20 const std::string& origin, 21 const std::string& origin,
21 const std::string& notification_id, 22 const std::string& notification_id,
22 bool by_user) override; 23 bool by_user) override;
23 void OnClick(Profile* profile, 24 void OnClick(Profile* profile,
24 const std::string& origin, 25 const std::string& origin,
25 const std::string& notification_id, 26 const std::string& notification_id,
26 int action_index, 27 int action_index,
27 const base::NullableString16& reply) override; 28 const base::NullableString16& reply) override;
28 void OpenSettings(Profile* profile) override; 29 void OpenSettings(Profile* profile) override;
29 30
30 private: 31 private:
31 DISALLOW_COPY_AND_ASSIGN(PersistentNotificationHandler); 32 DISALLOW_COPY_AND_ASSIGN(PersistentNotificationHandler);
32 }; 33 };
33 34
34 #endif // CHROME_BROWSER_NOTIFICATIONS_PERSISTENT_NOTIFICATION_HANDLER_H_ 35 #endif // CHROME_BROWSER_NOTIFICATIONS_PERSISTENT_NOTIFICATION_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698