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

Side by Side Diff: chrome/browser/notifications/notification_display_service.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_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 pf |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
64 protected: 69 protected:
65 NotificationHandler* GetNotificationHandler( 70 NotificationHandler* GetNotificationHandler(
66 NotificationCommon::Type notification_type); 71 NotificationCommon::Type notification_type);
67 72
68 private: 73 private:
69 // Registers an implementation object to handle notification operations 74 // Registers an implementation object to handle notification operations
70 // for |notification_type|. 75 // for |notification_type|.
71 void AddNotificationHandler(NotificationCommon::Type notification_type, 76 void AddNotificationHandler(NotificationCommon::Type notification_type,
72 std::unique_ptr<NotificationHandler> handler); 77 std::unique_ptr<NotificationHandler> handler);
73 78
74 std::map<NotificationCommon::Type, std::unique_ptr<NotificationHandler>> 79 std::map<NotificationCommon::Type, std::unique_ptr<NotificationHandler>>
75 notification_handlers_; 80 notification_handlers_;
76 Profile* profile_; 81 Profile* profile_;
77 82
78 DISALLOW_COPY_AND_ASSIGN(NotificationDisplayService); 83 DISALLOW_COPY_AND_ASSIGN(NotificationDisplayService);
79 }; 84 };
80 85
81 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_DISPLAY_SERVICE_H_ 86 #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