OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 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_EXTENSIONS_API_NOTIFICATIONS_EXTENSION_NOTIFICATION_HANDL
ER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_NOTIFICATIONS_EXTENSION_NOTIFICATION_HANDL
ER_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_NOTIFICATIONS_EXTENSION_NOTIFICATION_HANDL
ER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_NOTIFICATIONS_EXTENSION_NOTIFICATION_HANDL
ER_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 #include "extensions/browser/event_router.h" | 10 #include "extensions/browser/event_router.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 void OnClose(Profile* profile, | 24 void OnClose(Profile* profile, |
25 const std::string& origin, | 25 const std::string& origin, |
26 const std::string& notification_id, | 26 const std::string& notification_id, |
27 bool by_user) override; | 27 bool by_user) override; |
28 void OnClick(Profile* profile, | 28 void OnClick(Profile* profile, |
29 const std::string& origin, | 29 const std::string& origin, |
30 const std::string& notification_id, | 30 const std::string& notification_id, |
31 int action_index, | 31 int action_index, |
32 const base::NullableString16& reply) override; | 32 const base::NullableString16& reply) override; |
33 void OpenSettings(Profile* profile) override; | 33 void OpenSettings(Profile* profile) override; |
| 34 void RegisterNotification(const std::string& notification_id, |
| 35 NotificationDelegate* delegate) override; |
34 | 36 |
35 protected: | 37 protected: |
36 // Overriden in unit tests. | 38 // Overriden in unit tests. |
37 virtual void SendEvent(Profile* profile, | 39 virtual void SendEvent(Profile* profile, |
38 const std::string& extension_id, | 40 const std::string& extension_id, |
39 events::HistogramValue histogram_value, | 41 events::HistogramValue histogram_value, |
40 const std::string& name, | 42 const std::string& name, |
41 EventRouter::UserGestureState user_gesture, | 43 EventRouter::UserGestureState user_gesture, |
42 std::unique_ptr<base::ListValue> args); | 44 std::unique_ptr<base::ListValue> args); |
43 | 45 |
44 DISALLOW_COPY_AND_ASSIGN(ExtensionNotificationHandler); | 46 DISALLOW_COPY_AND_ASSIGN(ExtensionNotificationHandler); |
45 }; | 47 }; |
46 | 48 |
47 } // namespace extensions | 49 } // namespace extensions |
48 | 50 |
49 #endif // CHROME_BROWSER_EXTENSIONS_API_NOTIFICATIONS_EXTENSION_NOTIFICATION_HA
NDLER_H_ | 51 #endif // CHROME_BROWSER_EXTENSIONS_API_NOTIFICATIONS_EXTENSION_NOTIFICATION_HA
NDLER_H_ |
OLD | NEW |