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

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

Issue 2377553003: Add ShouldDisplayOverFullscreen support to web notifications. (Closed)
Patch Set: Final formatting fixes 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
(Empty)
1 // Copyright 2016 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_WEB_NOTIFICATION_DELEGATE_H_
6 #define CHROME_BROWSER_NOTIFICATIONS_WEB_NOTIFICATION_DELEGATE_H_
7
8 #include <string>
9
10 #include "base/macros.h"
11 #include "chrome/browser/notifications/notification_delegate.h"
12 #include "url/gurl.h"
13
14 namespace content {
15 class BrowserContext;
16 }
17
18 // Base class for the PersistentNotificationDelegate and the
19 // NotificationObjectProxy. All common functionality for displaying web
20 // notifications is found here.
21 // TODO(peter, crbug.com/596161): Migrate this functionality offered by the
22 // delegate to the NotificationDisplayService.
23 class WebNotificationDelegate : public NotificationDelegate {
24 public:
25 // NotificationDelegate implementation.
26 std::string id() const override;
27 void SettingsClick() override;
28 bool ShouldDisplaySettingsButton() override;
29 bool ShouldDisplayOverFullscreen() const override;
30
31 protected:
32 WebNotificationDelegate(content::BrowserContext* browser_context,
33 const std::string& notification_id,
34 const GURL& origin);
35
36 ~WebNotificationDelegate() override;
37
38 content::BrowserContext* browser_context() { return browser_context_; }
39 const GURL& origin() { return origin_; }
40
41 private:
42 content::BrowserContext* browser_context_;
43 std::string notification_id_;
44 GURL origin_;
45
46 DISALLOW_COPY_AND_ASSIGN(WebNotificationDelegate);
47 };
48
49 #endif // CHROME_BROWSER_NOTIFICATIONS_WEB_NOTIFICATION_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698