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

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

Issue 2377553003: Add ShouldDisplayOverFullscreen support to web notifications. (Closed)
Patch Set: Removing previously committed changes from cl (via git pull) Created 4 years, 2 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
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_NOTIFICATIONS_PERSISTENT_NOTIFICATION_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_PERSISTENT_NOTIFICATION_DELEGATE_H_
6 #define CHROME_BROWSER_NOTIFICATIONS_PERSISTENT_NOTIFICATION_DELEGATE_H_ 6 #define CHROME_BROWSER_NOTIFICATIONS_PERSISTENT_NOTIFICATION_DELEGATE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "chrome/browser/notifications/notification_delegate.h" 11 #include "chrome/browser/notifications/web_notification_delegate.h"
12 #include "url/gurl.h" 12 #include "url/gurl.h"
13 13
14 namespace content { 14 namespace content {
15 class BrowserContext; 15 class BrowserContext;
16 } 16 }
17 17
18 // Delegate responsible for listening to the click event on persistent 18 // Delegate responsible for listening to the click event on persistent
19 // notifications, to forward them to the PlatformNotificationService so that 19 // notifications, to forward them to the PlatformNotificationService so that
20 // JavaScript events can be fired on the associated Service Worker. 20 // JavaScript events can be fired on the associated Service Worker.
21 class PersistentNotificationDelegate : public NotificationDelegate { 21 class PersistentNotificationDelegate : public WebNotificationDelegate {
22 public: 22 public:
23 PersistentNotificationDelegate(content::BrowserContext* browser_context, 23 PersistentNotificationDelegate(content::BrowserContext* browser_context,
24 const std::string& notification_id, 24 const std::string& notification_id,
25 const GURL& origin, 25 const GURL& origin,
26 int notification_settings_index); 26 int notification_settings_index);
27 27
28 // NotificationDelegate implementation. 28 // NotificationDelegate implementation.
29 void Display() override; 29 void Display() override;
30 void Close(bool by_user) override; 30 void Close(bool by_user) override;
31 void Click() override; 31 void Click() override;
32 void ButtonClick(int button_index) override; 32 void ButtonClick(int button_index) override;
33 void SettingsClick() override;
34 bool ShouldDisplaySettingsButton() override;
35
36 std::string id() const override;
37 33
38 protected: 34 protected:
39 ~PersistentNotificationDelegate() override; 35 ~PersistentNotificationDelegate() override;
40 36
41 private: 37 private:
42 content::BrowserContext* browser_context_;
43 std::string notification_id_;
44 GURL origin_;
45 int notification_settings_index_; 38 int notification_settings_index_;
46 39
47 DISALLOW_COPY_AND_ASSIGN(PersistentNotificationDelegate); 40 DISALLOW_COPY_AND_ASSIGN(PersistentNotificationDelegate);
48 }; 41 };
49 42
50 #endif // CHROME_BROWSER_NOTIFICATIONS_PERSISTENT_NOTIFICATION_DELEGATE_H_ 43 #endif // CHROME_BROWSER_NOTIFICATIONS_PERSISTENT_NOTIFICATION_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698