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

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

Issue 2093953002: Introduce a new API to handle native notification clicks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_NOTIFICATIONS_PERSISTENT_NOTIFICATION_HANDLER_H_
6 #define CHROME_BROWSER_NOTIFICATIONS_PERSISTENT_NOTIFICATION_HANDLER_H_
7
8 #include "base/macros.h"
9 #include "chrome/browser/notifications/notification_handler.h"
10 #include "chrome/browser/notifications/notification_operation_common.h"
11
12 // NotificationHandler implementation for persistent, service worker backed,
13 // notifications.
14 class PersistentNotificationHandler : public NotificationHandler {
15 public:
16 PersistentNotificationHandler();
17 ~PersistentNotificationHandler() override;
18
19 void HandleNotificationOperation(
20 notification_operation_common::NotificationOperation operation,
21 Profile* profile,
22 const std::string& origin,
23 const std::string& notification_id,
24 int action_index) override;
25
26 void RegisterNotification(
27 const std::string& notification_id,
28 std::unique_ptr<Notification> notification) override;
29
30 void CloseNotification(Profile* profile,
31 const std::string& notification_id) override;
32
33 notification_operation_common::NotificationHandlerType NotificationType()
34 override;
35
36 private:
37 DISALLOW_COPY_AND_ASSIGN(PersistentNotificationHandler);
38 };
39
40 #endif // CHROME_BROWSER_NOTIFICATIONS_PERSISTENT_NOTIFICATION_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698