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

Unified Diff: chrome/browser/notifications/web_notification_delegate.h

Issue 2921263002: Remove many delegates, let's see what breaks
Patch Set: compile Created 3 years, 6 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
Index: chrome/browser/notifications/web_notification_delegate.h
diff --git a/chrome/browser/notifications/web_notification_delegate.h b/chrome/browser/notifications/web_notification_delegate.h
index d4629fc6f4b68891d4de58e8047cc71e9cc5bf87..e57535fa646abe2a00391af74ce0101ef8c8d0c9 100644
--- a/chrome/browser/notifications/web_notification_delegate.h
+++ b/chrome/browser/notifications/web_notification_delegate.h
@@ -7,46 +7,39 @@
#include <string>
-#include "base/feature_list.h"
#include "base/macros.h"
+#include "chrome/browser/notifications/notification_common.h"
#include "chrome/browser/notifications/notification_delegate.h"
#include "url/gurl.h"
-namespace content {
-class BrowserContext;
-}
+class Profile;
-namespace features {
-
-extern const base::Feature kAllowFullscreenWebNotificationsFeature;
-
-} // namespace features
-
-// Base class for the PersistentNotificationDelegate and the
-// NotificationObjectProxy. All common functionality for displaying web
-// notifications is found here.
-// TODO(peter, crbug.com/596161): Migrate this functionality offered by the
-// delegate to the NotificationDisplayService.
+// Delegate class for Web Notifications.
class WebNotificationDelegate : public NotificationDelegate {
public:
+ WebNotificationDelegate(NotificationCommon::Type notification_type,
+ Profile* profile,
+ const std::string& notification_id,
+ const GURL& origin);
+
// NotificationDelegate implementation.
std::string id() const override;
bool SettingsClick() override;
bool ShouldDisplaySettingsButton() override;
bool ShouldDisplayOverFullscreen() const override;
+ void Close(bool by_user) override;
+ void Click() override;
+ void ButtonClick(int button_index) override;
+ void ButtonClickWithReply(int button_index,
+ const base::string16& reply) override;
protected:
- WebNotificationDelegate(content::BrowserContext* browser_context,
- const std::string& notification_id,
- const GURL& origin);
-
~WebNotificationDelegate() override;
-
- content::BrowserContext* browser_context() { return browser_context_; }
const GURL& origin() { return origin_; }
private:
- content::BrowserContext* browser_context_;
+ NotificationCommon::Type notification_type_;
+ Profile* profile_;
std::string notification_id_;
GURL origin_;

Powered by Google App Engine
This is Rietveld 408576698