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

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

Issue 1814923002: Nuke NotificationUIManager from PlatformNotificationServiceImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@profile_manager_load
Patch Set: Review comments + unique_ptr rename Created 4 years, 8 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_DISPLAY_SERVICE_H_
6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_DISPLAY_SERVICE_H_
7
8 #include <set>
9 #include <string>
10 #include "base/macros.h"
11 #include "components/keyed_service/core/keyed_service.h"
12
13 class Notification;
14 class NotificationBridge;
15 class Profile;
16
17 // Profile-bound service that enables notifications to be displayed and
18 // interacted with on the user's screen, orthogonal of whether this
19 // functionality is provided by the browser or by the operating system. An
20 // instance can be retrieved through the NotificationDisplayServiceFactory.
21 //
22 // TODO(peter): Add a NotificationHandler mechanism for registering listeners.
23 // TODO(miguelg): Remove the SupportsNotificationCenter method.
24 class NotificationDisplayService : public KeyedService {
25 public:
26 NotificationDisplayService() {}
27 ~NotificationDisplayService() override {}
28
29 // Displays the |notification| identified by |notification_id|.
30 virtual void Display(const std::string& notification_id,
31 const Notification& notification) = 0;
32
33 // Closes the notification identified by |notification_id|.
34 virtual void Close(const std::string& notification_id) = 0;
35
36 // Returns whether the implementation can retrieve a list of currently visible
37 // notifications and stores them in |*notification_ids| when possible.
38 virtual bool GetDisplayed(std::set<std::string>* notifications) const = 0;
39
40 // Temporary method while we finish the refactor. Returns whether there is
41 // a native notification center backing up notifications.
42 virtual bool SupportsNotificationCenter() const = 0;
43
44 private:
45 DISALLOW_COPY_AND_ASSIGN(NotificationDisplayService);
46 };
47
48 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_DISPLAY_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698