OLD | NEW |
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 #ifndef CHROME_BROWSER_EXTENSIONS_API_NOTIFICATION_PROVIDER_NOTIFICATION_PROVIDE
R_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_NOTIFICATION_PROVIDER_NOTIFICATION_PROVIDE
R_API_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_NOTIFICATION_PROVIDER_NOTIFICATION_PROVIDE
R_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_NOTIFICATION_PROVIDER_NOTIFICATION_PROVIDE
R_API_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 NotificationProviderNotifyOnClearedFunction(); | 63 NotificationProviderNotifyOnClearedFunction(); |
64 | 64 |
65 protected: | 65 protected: |
66 virtual ~NotificationProviderNotifyOnClearedFunction(); | 66 virtual ~NotificationProviderNotifyOnClearedFunction(); |
67 | 67 |
68 private: | 68 private: |
69 DECLARE_EXTENSION_FUNCTION("notificationProvider.notifyOnCleared", | 69 DECLARE_EXTENSION_FUNCTION("notificationProvider.notifyOnCleared", |
70 NOTIFICATIONPROVIDER_NOTIFYONCLEARED); | 70 NOTIFICATIONPROVIDER_NOTIFYONCLEARED); |
71 | 71 |
72 // UIThreadExtensionFunction implementation. | 72 // UIThreadExtensionFunction implementation. |
73 virtual ExtensionFunction::ResponseAction Run() OVERRIDE; | 73 virtual ExtensionFunction::ResponseAction Run() override; |
74 }; | 74 }; |
75 | 75 |
76 // Implememtation of NotifyOnClicked function of the API. It will inform the | 76 // Implememtation of NotifyOnClicked function of the API. It will inform the |
77 // notifier that the user clicked in a non-button area of a notification sent | 77 // notifier that the user clicked in a non-button area of a notification sent |
78 // from that notifier. | 78 // from that notifier. |
79 class NotificationProviderNotifyOnClickedFunction | 79 class NotificationProviderNotifyOnClickedFunction |
80 : public ChromeUIThreadExtensionFunction { | 80 : public ChromeUIThreadExtensionFunction { |
81 public: | 81 public: |
82 NotificationProviderNotifyOnClickedFunction(); | 82 NotificationProviderNotifyOnClickedFunction(); |
83 | 83 |
84 protected: | 84 protected: |
85 virtual ~NotificationProviderNotifyOnClickedFunction(); | 85 virtual ~NotificationProviderNotifyOnClickedFunction(); |
86 | 86 |
87 private: | 87 private: |
88 DECLARE_EXTENSION_FUNCTION("notificationProvider.notifyOnClicked", | 88 DECLARE_EXTENSION_FUNCTION("notificationProvider.notifyOnClicked", |
89 NOTIFICATIONPROVIDER_NOTIFYONCLICKED); | 89 NOTIFICATIONPROVIDER_NOTIFYONCLICKED); |
90 | 90 |
91 // UIThreadExtensionFunction implementation. | 91 // UIThreadExtensionFunction implementation. |
92 virtual ExtensionFunction::ResponseAction Run() OVERRIDE; | 92 virtual ExtensionFunction::ResponseAction Run() override; |
93 }; | 93 }; |
94 | 94 |
95 // Implememtation of NotifyOnButtonClicked function of the API. It will inform | 95 // Implememtation of NotifyOnButtonClicked function of the API. It will inform |
96 // the | 96 // the |
97 // notifier that the user pressed a button in the notification sent from that | 97 // notifier that the user pressed a button in the notification sent from that |
98 // notifier. | 98 // notifier. |
99 class NotificationProviderNotifyOnButtonClickedFunction | 99 class NotificationProviderNotifyOnButtonClickedFunction |
100 : public ChromeUIThreadExtensionFunction { | 100 : public ChromeUIThreadExtensionFunction { |
101 public: | 101 public: |
102 NotificationProviderNotifyOnButtonClickedFunction(); | 102 NotificationProviderNotifyOnButtonClickedFunction(); |
103 | 103 |
104 protected: | 104 protected: |
105 virtual ~NotificationProviderNotifyOnButtonClickedFunction(); | 105 virtual ~NotificationProviderNotifyOnButtonClickedFunction(); |
106 | 106 |
107 private: | 107 private: |
108 DECLARE_EXTENSION_FUNCTION("notificationProvider.notifyOnButtonClicked", | 108 DECLARE_EXTENSION_FUNCTION("notificationProvider.notifyOnButtonClicked", |
109 NOTIFICATIONPROVIDER_NOTIFYONBUTTONCLICKED); | 109 NOTIFICATIONPROVIDER_NOTIFYONBUTTONCLICKED); |
110 | 110 |
111 // UIThreadExtensionFunction implementation. | 111 // UIThreadExtensionFunction implementation. |
112 virtual ExtensionFunction::ResponseAction Run() OVERRIDE; | 112 virtual ExtensionFunction::ResponseAction Run() override; |
113 }; | 113 }; |
114 | 114 |
115 // Implememtation of NotifyOnPermissionLevelChanged function of the API. It will | 115 // Implememtation of NotifyOnPermissionLevelChanged function of the API. It will |
116 // inform the notifier that the user changed the permission level of that | 116 // inform the notifier that the user changed the permission level of that |
117 // notifier. | 117 // notifier. |
118 class NotificationProviderNotifyOnPermissionLevelChangedFunction | 118 class NotificationProviderNotifyOnPermissionLevelChangedFunction |
119 : public ChromeUIThreadExtensionFunction { | 119 : public ChromeUIThreadExtensionFunction { |
120 public: | 120 public: |
121 NotificationProviderNotifyOnPermissionLevelChangedFunction(); | 121 NotificationProviderNotifyOnPermissionLevelChangedFunction(); |
122 | 122 |
123 protected: | 123 protected: |
124 virtual ~NotificationProviderNotifyOnPermissionLevelChangedFunction(); | 124 virtual ~NotificationProviderNotifyOnPermissionLevelChangedFunction(); |
125 | 125 |
126 private: | 126 private: |
127 DECLARE_EXTENSION_FUNCTION( | 127 DECLARE_EXTENSION_FUNCTION( |
128 "notificationProvider.notifyOnPermissionLevelChanged", | 128 "notificationProvider.notifyOnPermissionLevelChanged", |
129 NOTIFICATIONPROVIDER_NOTIFYONPERMISSIONLEVELCHANGED); | 129 NOTIFICATIONPROVIDER_NOTIFYONPERMISSIONLEVELCHANGED); |
130 | 130 |
131 // UIThreadExtensionFunction implementation. | 131 // UIThreadExtensionFunction implementation. |
132 virtual ExtensionFunction::ResponseAction Run() OVERRIDE; | 132 virtual ExtensionFunction::ResponseAction Run() override; |
133 }; | 133 }; |
134 | 134 |
135 // Implememtation of NotifyOnShowSettings function of the API. It will inform | 135 // Implememtation of NotifyOnShowSettings function of the API. It will inform |
136 // the notifier that the user clicked on advanced settings of that notifier. | 136 // the notifier that the user clicked on advanced settings of that notifier. |
137 class NotificationProviderNotifyOnShowSettingsFunction | 137 class NotificationProviderNotifyOnShowSettingsFunction |
138 : public ChromeUIThreadExtensionFunction { | 138 : public ChromeUIThreadExtensionFunction { |
139 public: | 139 public: |
140 NotificationProviderNotifyOnShowSettingsFunction(); | 140 NotificationProviderNotifyOnShowSettingsFunction(); |
141 | 141 |
142 protected: | 142 protected: |
143 virtual ~NotificationProviderNotifyOnShowSettingsFunction(); | 143 virtual ~NotificationProviderNotifyOnShowSettingsFunction(); |
144 | 144 |
145 private: | 145 private: |
146 DECLARE_EXTENSION_FUNCTION("notificationProvider.notifyOnShowSettings", | 146 DECLARE_EXTENSION_FUNCTION("notificationProvider.notifyOnShowSettings", |
147 NOTIFICATIONPROVIDER_NOTIFYONSHOWSETTINGS); | 147 NOTIFICATIONPROVIDER_NOTIFYONSHOWSETTINGS); |
148 | 148 |
149 // UIThreadExtensionFunction implementation. | 149 // UIThreadExtensionFunction implementation. |
150 virtual ExtensionFunction::ResponseAction Run() OVERRIDE; | 150 virtual ExtensionFunction::ResponseAction Run() override; |
151 }; | 151 }; |
152 | 152 |
153 // Implememtation of GetNotifier function of the API. It will get the notifier | 153 // Implememtation of GetNotifier function of the API. It will get the notifier |
154 // object that corresponds to the notifier ID. | 154 // object that corresponds to the notifier ID. |
155 class NotificationProviderGetNotifierFunction | 155 class NotificationProviderGetNotifierFunction |
156 : public ChromeUIThreadExtensionFunction { | 156 : public ChromeUIThreadExtensionFunction { |
157 public: | 157 public: |
158 NotificationProviderGetNotifierFunction(); | 158 NotificationProviderGetNotifierFunction(); |
159 | 159 |
160 protected: | 160 protected: |
161 virtual ~NotificationProviderGetNotifierFunction(); | 161 virtual ~NotificationProviderGetNotifierFunction(); |
162 | 162 |
163 private: | 163 private: |
164 DECLARE_EXTENSION_FUNCTION("notificationProvider.getNotifier", | 164 DECLARE_EXTENSION_FUNCTION("notificationProvider.getNotifier", |
165 NOTIFICATIONPROVIDER_GETNOTIFIER); | 165 NOTIFICATIONPROVIDER_GETNOTIFIER); |
166 | 166 |
167 // UIThreadExtensionFunction implementation. | 167 // UIThreadExtensionFunction implementation. |
168 virtual ExtensionFunction::ResponseAction Run() OVERRIDE; | 168 virtual ExtensionFunction::ResponseAction Run() override; |
169 }; | 169 }; |
170 | 170 |
171 // Implememtation of GetAllNotifiers function of the API. It will get all the | 171 // Implememtation of GetAllNotifiers function of the API. It will get all the |
172 // notifiers that would send notifications. | 172 // notifiers that would send notifications. |
173 class NotificationProviderGetAllNotifiersFunction | 173 class NotificationProviderGetAllNotifiersFunction |
174 : public ChromeUIThreadExtensionFunction { | 174 : public ChromeUIThreadExtensionFunction { |
175 public: | 175 public: |
176 NotificationProviderGetAllNotifiersFunction(); | 176 NotificationProviderGetAllNotifiersFunction(); |
177 | 177 |
178 protected: | 178 protected: |
179 virtual ~NotificationProviderGetAllNotifiersFunction(); | 179 virtual ~NotificationProviderGetAllNotifiersFunction(); |
180 | 180 |
181 private: | 181 private: |
182 DECLARE_EXTENSION_FUNCTION("notificationProvider.getAllNotifiers", | 182 DECLARE_EXTENSION_FUNCTION("notificationProvider.getAllNotifiers", |
183 NOTIFICATIONPROVIDER_GETALLNOTIFIERS); | 183 NOTIFICATIONPROVIDER_GETALLNOTIFIERS); |
184 | 184 |
185 // UIThreadExtensionFunction implementation. | 185 // UIThreadExtensionFunction implementation. |
186 virtual ExtensionFunction::ResponseAction Run() OVERRIDE; | 186 virtual ExtensionFunction::ResponseAction Run() override; |
187 }; | 187 }; |
188 | 188 |
189 } // namespace extensions | 189 } // namespace extensions |
190 | 190 |
191 #endif // CHROME_BROWSER_EXTENSIONS_API_NOTIFICATION_PROVIDER_NOTIFICATION_PROV
IDER_API_H_ | 191 #endif // CHROME_BROWSER_EXTENSIONS_API_NOTIFICATION_PROVIDER_NOTIFICATION_PROV
IDER_API_H_ |
OLD | NEW |