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

Side by Side Diff: chrome/browser/extensions/api/notifications/extension_notification_handler.h

Issue 2703213004: Migrate extension notifications to the new NotificationDisplayService (Closed)
Patch Set: Finish functionality Created 3 years, 10 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 2017 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_EXTENSIONS_API_NOTIFICATIONS_EXTENSION_NOTIFICATION_HANDL ER_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_NOTIFICATIONS_EXTENSION_NOTIFICATION_HANDL ER_H_
7
8 #include "base/macros.h"
9 #include "chrome/browser/notifications/notification_handler.h"
10
11 // Handler for notifications shown by extensions. Will be created and owned by
12 // the NotificationDisplayService.
13 class ExtensionNotificationHandler : public NotificationHandler {
14 public:
15 ExtensionNotificationHandler();
16 ~ExtensionNotificationHandler() override;
17
18 // NotificationHandler implementation.
19 void OnClose(Profile* profile,
20 const std::string& origin,
21 const std::string& notification_id,
22 bool by_user) override;
23 void OnClick(Profile* profile,
24 const std::string& origin,
25 const std::string& notification_id,
26 int action_index,
27 const base::NullableString16& reply) override;
28 void OpenSettings(Profile* profile) override;
29 void RegisterNotification(const std::string& notification_id,
30 NotificationDelegate* delegate) override;
31
32 private:
33 DISALLOW_COPY_AND_ASSIGN(ExtensionNotificationHandler);
34 };
35
36 #endif // CHROME_BROWSER_EXTENSIONS_API_NOTIFICATIONS_EXTENSION_NOTIFICATION_HA NDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698