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

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

Issue 1509923002: Implement native web notifications for mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_UI_MANAGER_H_ 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_UI_MANAGER_H_
6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_UI_MANAGER_H_ 6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_UI_MANAGER_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 27 matching lines...) Expand all
38 return static_cast<ProfileID>(profile); 38 return static_cast<ProfileID>(profile);
39 } 39 }
40 40
41 virtual ~NotificationUIManager() {} 41 virtual ~NotificationUIManager() {}
42 42
43 // Creates an initialized UI manager. 43 // Creates an initialized UI manager.
44 // TODO(dewittj): Remove the PrefService argument which is unused. See 44 // TODO(dewittj): Remove the PrefService argument which is unused. See
45 // crbug.com/530376 45 // crbug.com/530376
46 static NotificationUIManager* Create(PrefService* local_state); 46 static NotificationUIManager* Create(PrefService* local_state);
47 47
48 // Some platforms can integrate notifications with their own
49 // notification center. In those cases it will return a pointer
50 // to the object dealing with OS specific notifications which will
51 // be owned by the caller.
52 // Otherwise it will return null and chrome notifications will be
53 // used instead.
54 static NotificationUIManager* CreateNativeNotificationManager();
55
48 // Adds a notification to be displayed. Virtual for unit test override. 56 // Adds a notification to be displayed. Virtual for unit test override.
49 virtual void Add(const Notification& notification, Profile* profile) = 0; 57 virtual void Add(const Notification& notification, Profile* profile) = 0;
50 58
51 // Updates an existing notification. If |update_progress_only|, assume 59 // Updates an existing notification. If |update_progress_only|, assume
52 // only message and progress properties are updated. 60 // only message and progress properties are updated.
53 virtual bool Update(const Notification& notification, Profile* profile) = 0; 61 virtual bool Update(const Notification& notification, Profile* profile) = 0;
54 62
55 // Returns the pointer to a notification if it match the supplied ID, either 63 // Returns the pointer to a notification if it match the supplied ID, either
56 // currently displayed or in the queue. 64 // currently displayed or in the queue.
57 // This function can be bound for delayed execution, where a profile pointer 65 // This function can be bound for delayed execution, where a profile pointer
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 virtual void CancelAll() = 0; 98 virtual void CancelAll() = 0;
91 99
92 protected: 100 protected:
93 NotificationUIManager() {} 101 NotificationUIManager() {}
94 102
95 private: 103 private:
96 DISALLOW_COPY_AND_ASSIGN(NotificationUIManager); 104 DISALLOW_COPY_AND_ASSIGN(NotificationUIManager);
97 }; 105 };
98 106
99 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_UI_MANAGER_H_ 107 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_UI_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698