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

Side by Side Diff: chrome/browser/notifications/persistent_notification_delegate.h

Issue 2906883003: Deprecate per notification type delegates. (Closed)
Patch Set: review 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 unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_NOTIFICATIONS_PERSISTENT_NOTIFICATION_DELEGATE_H_
6 #define CHROME_BROWSER_NOTIFICATIONS_PERSISTENT_NOTIFICATION_DELEGATE_H_
7
8 #include <string>
9
10 #include "base/macros.h"
11 #include "chrome/browser/notifications/web_notification_delegate.h"
12
13 class GURL;
14
15 namespace content {
16 class BrowserContext;
17 }
18
19 // Delegate responsible for listening to the click event on persistent
20 // notifications, to forward them to the PlatformNotificationService so that
21 // JavaScript events can be fired on the associated Service Worker.
22 class PersistentNotificationDelegate : public WebNotificationDelegate {
23 public:
24 PersistentNotificationDelegate(content::BrowserContext* browser_context,
25 const std::string& notification_id,
26 const GURL& origin,
27 int notification_settings_index);
28
29 // NotificationDelegate implementation.
30 void Display() override;
31 void Close(bool by_user) override;
32 void Click() override;
33 void ButtonClick(int button_index) override;
34 void ButtonClickWithReply(int button_index,
35 const base::string16& reply) override;
36
37 protected:
38 ~PersistentNotificationDelegate() override;
39
40 private:
41 int notification_settings_index_;
42
43 DISALLOW_COPY_AND_ASSIGN(PersistentNotificationDelegate);
44 };
45
46 #endif // CHROME_BROWSER_NOTIFICATIONS_PERSISTENT_NOTIFICATION_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698