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

Unified Diff: chrome/browser/extensions/api/notification/notification_api.h

Issue 12221127: Actually prevent sending notifications from apps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/api/notification/notification_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/notification/notification_api.h
diff --git a/chrome/browser/extensions/api/notification/notification_api.h b/chrome/browser/extensions/api/notification/notification_api.h
index 37adb314829e9017b80bc4299b71ff10a82cd15e..0423c5e1ddfcddd1cdbf28204ffd7b913f3fa7f7 100644
--- a/chrome/browser/extensions/api/notification/notification_api.h
+++ b/chrome/browser/extensions/api/notification/notification_api.h
@@ -22,6 +22,14 @@ class NotificationApiFunction : public ApiFunction {
void CreateNotification(
const std::string& id,
api::experimental_notification::NotificationOptions* options);
+
+ bool IsNotificationApiEnabled();
+
+ // Called inside of RunImpl.
+ virtual bool RunNotificationApi() = 0;
+
+ // UITHreadExtensionFunction:
+ virtual bool RunImpl() OVERRIDE;
};
class NotificationCreateFunction : public NotificationApiFunction {
@@ -29,7 +37,7 @@ class NotificationCreateFunction : public NotificationApiFunction {
NotificationCreateFunction();
// UIThreadExtensionFunction:
- virtual bool RunImpl() OVERRIDE;
+ virtual bool RunNotificationApi() OVERRIDE;
protected:
virtual ~NotificationCreateFunction();
@@ -46,7 +54,7 @@ class NotificationUpdateFunction : public NotificationApiFunction {
NotificationUpdateFunction();
// UIThreadExtensionFunction:
- virtual bool RunImpl() OVERRIDE;
+ virtual bool RunNotificationApi() OVERRIDE;
protected:
virtual ~NotificationUpdateFunction();
@@ -63,7 +71,7 @@ class NotificationDeleteFunction : public NotificationApiFunction {
NotificationDeleteFunction();
// UIThreadExtensionFunction:
- virtual bool RunImpl() OVERRIDE;
+ virtual bool RunNotificationApi() OVERRIDE;
protected:
virtual ~NotificationDeleteFunction();
« no previous file with comments | « no previous file | chrome/browser/extensions/api/notification/notification_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698