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

Side by Side Diff: chrome/browser/notifications/notification_common.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 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
8 namespace content { 17 namespace content {
9 class BrowserContext; 18 class BrowserContext;
10 } // namespace content 19 } // namespace content
11 20
21 class Profile;
22 class GURL;
23
12 // Shared functionality for both in page and persistent notification 24 // Shared functionality for both in page and persistent notification
13 class NotificationCommon { 25 class NotificationCommon {
14 public: 26 public:
15 // Things as user can do to a notification. 27 // Things as user can do to a notification.
16 // TODO(peter): Prefix these options with OPERATION_. 28 // TODO(peter): Prefix these options with OPERATION_.
17 enum Operation { 29 enum Operation {
18 CLICK = 0, 30 CLICK = 0,
19 CLOSE = 1, 31 CLOSE = 1,
20 SETTINGS = 2, 32 SETTINGS = 2,
21 OPERATION_MAX = SETTINGS 33 OPERATION_MAX = SETTINGS
22 }; 34 };
23 35
24 // Possible kinds of notifications 36 // Possible kinds of notifications
25 // TODO(peter): Prefix these options with TYPE_. 37 // TODO(peter): Prefix these options with TYPE_.
26 enum Type { 38 enum Type {
27 PERSISTENT = 0, 39 PERSISTENT = 0,
28 NON_PERSISTENT = 1, 40 NON_PERSISTENT = 1,
29 EXTENSION = 2, 41 EXTENSION = 2,
30 TYPE_MAX = EXTENSION 42 TYPE_MAX = EXTENSION
31 }; 43 };
32 44
33 // Open the Notification settings screen when clicking the right button. 45 // Open the Notification settings screen when clicking the right button.
34 // TODO(miguelg) have it take a Profile instead once NotificationObjectProxy 46 // TODO(miguelg) have it take a Profile instead once NotificationObjectProxy
35 // is updated. 47 // is updated.
36 static void OpenNotificationSettings( 48 static void OpenNotificationSettings(
37 content::BrowserContext* browser_context); 49 content::BrowserContext* browser_context);
50
51 static bool ActiveTabIsFullScreen(Profile* profile, const GURL& origin);
38 }; 52 };
39 53
40 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_COMMON_H_ 54 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_COMMON_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698