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

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

Issue 2749453002: Make GetDisplayedNotifications asynchronous. (Closed)
Patch Set: review Created 3 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/notifications/message_center_display_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_MESSAGE_CENTER_DISPLAY_SERVICE_H_ 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_MESSAGE_CENTER_DISPLAY_SERVICE_H_
6 #define CHROME_BROWSER_NOTIFICATIONS_MESSAGE_CENTER_DISPLAY_SERVICE_H_ 6 #define CHROME_BROWSER_NOTIFICATIONS_MESSAGE_CENTER_DISPLAY_SERVICE_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "chrome/browser/notifications/notification_common.h" 9 #include "chrome/browser/notifications/notification_common.h"
10 #include "chrome/browser/notifications/notification_display_service.h" 10 #include "chrome/browser/notifications/notification_display_service.h"
11 11
12 class Notification; 12 class Notification;
13 class NotificationUIManager; 13 class NotificationUIManager;
14 class Profile; 14 class Profile;
15 15
16 // Implementation of display service for notifications displayed by chrome 16 // Implementation of display service for notifications displayed by chrome
17 // instead of the native platform notification center. 17 // instead of the native platform notification center.
18 class MessageCenterDisplayService : public NotificationDisplayService { 18 class MessageCenterDisplayService : public NotificationDisplayService {
19 public: 19 public:
20 MessageCenterDisplayService(Profile* profile, 20 MessageCenterDisplayService(Profile* profile,
21 NotificationUIManager* ui_manager); 21 NotificationUIManager* ui_manager);
22 ~MessageCenterDisplayService() override; 22 ~MessageCenterDisplayService() override;
23 23
24 // NotificationDisplayService implementation. 24 // NotificationDisplayService implementation.
25 void Display(NotificationCommon::Type notification_type, 25 void Display(NotificationCommon::Type notification_type,
26 const std::string& notification_id, 26 const std::string& notification_id,
27 const Notification& notification) override; 27 const Notification& notification) override;
28 void Close(NotificationCommon::Type notification_type, 28 void Close(NotificationCommon::Type notification_type,
29 const std::string& notification_id) override; 29 const std::string& notification_id) override;
30 bool GetDisplayed(std::set<std::string>* notifications) const override; 30 void GetDisplayed(
31 const DisplayedNotificationsCallback& callback) const override;
31 32
32 private: 33 private:
33 Profile* profile_; 34 Profile* profile_;
34 NotificationUIManager* ui_manager_; 35 NotificationUIManager* ui_manager_;
35 36
36 DISALLOW_COPY_AND_ASSIGN(MessageCenterDisplayService); 37 DISALLOW_COPY_AND_ASSIGN(MessageCenterDisplayService);
37 }; 38 };
38 39
39 #endif // CHROME_BROWSER_NOTIFICATIONS_MESSAGE_CENTER_DISPLAY_SERVICE_H_ 40 #endif // CHROME_BROWSER_NOTIFICATIONS_MESSAGE_CENTER_DISPLAY_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/notifications/message_center_display_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698