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

Side by Side Diff: chrome/browser/notifications/notification_display_service.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_DISPLAY_SERVICE_H_ 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_DISPLAY_SERVICE_H_
6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_DISPLAY_SERVICE_H_ 6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_DISPLAY_SERVICE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <set> 10 #include <set>
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 // The events are received and dispatched to the right consumer depending on 54 // The events are received and dispatched to the right consumer depending on
55 // the type of notification. Consumers include, service workers, pages, 55 // the type of notification. Consumers include, service workers, pages,
56 // extensions... 56 // extensions...
57 void ProcessNotificationOperation(NotificationCommon::Operation operation, 57 void ProcessNotificationOperation(NotificationCommon::Operation operation,
58 NotificationCommon::Type notification_type, 58 NotificationCommon::Type notification_type,
59 const std::string& origin, 59 const std::string& origin,
60 const std::string& notification_id, 60 const std::string& notification_id,
61 int action_index, 61 int action_index,
62 const base::NullableString16& reply); 62 const base::NullableString16& reply);
63 63
64 // Return whether a notification of |notification_type| should be displayed
65 // for |origin| when the browser is in full screen mode.
66 bool ShouldDisplayOverFullscreen(const GURL& origin,
67 NotificationCommon::Type notification_type);
68
69 protected: 64 protected:
70 NotificationHandler* GetNotificationHandler( 65 NotificationHandler* GetNotificationHandler(
71 NotificationCommon::Type notification_type); 66 NotificationCommon::Type notification_type);
72 67
73 private: 68 private:
74 // Registers an implementation object to handle notification operations 69 // Registers an implementation object to handle notification operations
75 // for |notification_type|. 70 // for |notification_type|.
76 void AddNotificationHandler(NotificationCommon::Type notification_type, 71 void AddNotificationHandler(NotificationCommon::Type notification_type,
77 std::unique_ptr<NotificationHandler> handler); 72 std::unique_ptr<NotificationHandler> handler);
78 73
79 std::map<NotificationCommon::Type, std::unique_ptr<NotificationHandler>> 74 std::map<NotificationCommon::Type, std::unique_ptr<NotificationHandler>>
80 notification_handlers_; 75 notification_handlers_;
81 Profile* profile_; 76 Profile* profile_;
82 77
83 DISALLOW_COPY_AND_ASSIGN(NotificationDisplayService); 78 DISALLOW_COPY_AND_ASSIGN(NotificationDisplayService);
84 }; 79 };
85 80
86 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_DISPLAY_SERVICE_H_ 81 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_DISPLAY_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/notifications/notification_delegate.h ('k') | chrome/browser/notifications/notification_display_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698