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

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

Issue 2941743002: Revert of Deprecate native and extension notification delegates. (Closed)
Patch Set: 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 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_NOTIFICATION_COMMON_H_ 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_COMMON_H_
6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_COMMON_H_ 6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_COMMON_H_
7 7
8 #include "base/feature_list.h"
9
10 namespace features {
11
12 // TODO(miguelg) We can probably get rid of this altogether.
13 extern const base::Feature kAllowFullscreenWebNotificationsFeature;
14
15 } // namespace features
16
17 namespace content { 8 namespace content {
18 class BrowserContext; 9 class BrowserContext;
19 } // namespace content 10 } // namespace content
20 11
21 class GURL;
22 class Profile;
23
24 // Shared functionality for both in page and persistent notification 12 // Shared functionality for both in page and persistent notification
25 class NotificationCommon { 13 class NotificationCommon {
26 public: 14 public:
27 // Things as user can do to a notification. 15 // Things as user can do to a notification.
28 // TODO(peter): Prefix these options with OPERATION_. 16 // TODO(peter): Prefix these options with OPERATION_.
29 enum Operation { 17 enum Operation {
30 CLICK = 0, 18 CLICK = 0,
31 CLOSE = 1, 19 CLOSE = 1,
32 SETTINGS = 2, 20 SETTINGS = 2,
33 OPERATION_MAX = SETTINGS 21 OPERATION_MAX = SETTINGS
34 }; 22 };
35 23
36 // Possible kinds of notifications 24 // Possible kinds of notifications
37 // TODO(peter): Prefix these options with TYPE_. 25 // TODO(peter): Prefix these options with TYPE_.
38 enum Type { 26 enum Type {
39 PERSISTENT = 0, 27 PERSISTENT = 0,
40 NON_PERSISTENT = 1, 28 NON_PERSISTENT = 1,
41 EXTENSION = 2, 29 EXTENSION = 2,
42 TYPE_MAX = EXTENSION 30 TYPE_MAX = EXTENSION
43 }; 31 };
44 32
45 // Open the Notification settings screen when clicking the right button. 33 // Open the Notification settings screen when clicking the right button.
46 // TODO(miguelg) have it take a Profile instead once NotificationObjectProxy 34 // TODO(miguelg) have it take a Profile instead once NotificationObjectProxy
47 // is updated. 35 // is updated.
48 static void OpenNotificationSettings( 36 static void OpenNotificationSettings(
49 content::BrowserContext* browser_context); 37 content::BrowserContext* browser_context);
50
51 // Whether a web notification should be displayed when chrome is in full
52 // screen mode.
53 static bool ShouldDisplayOnFullScreen(Profile* profile, const GURL& origin);
54 }; 38 };
55 39
56 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_COMMON_H_ 40 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_COMMON_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698