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

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

Issue 1127013008: Beginnings of synchronizing notifications in the notification database. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 // function to turn a profile pointer into a profile id and pass that in. 65 // function to turn a profile pointer into a profile id and pass that in.
66 virtual bool CancelById(const std::string& delegate_id, 66 virtual bool CancelById(const std::string& delegate_id,
67 ProfileID profile_id) = 0; 67 ProfileID profile_id) = 0;
68 68
69 // Returns the set of all delegate IDs for notifications from the passed 69 // Returns the set of all delegate IDs for notifications from the passed
70 // |profile| and |source|. 70 // |profile| and |source|.
71 virtual std::set<std::string> GetAllIdsByProfileAndSourceOrigin( 71 virtual std::set<std::string> GetAllIdsByProfileAndSourceOrigin(
72 Profile* profile, 72 Profile* profile,
73 const GURL& source) = 0; 73 const GURL& source) = 0;
74 74
75 // Returns the set of all delegate IDs for notifications from |profile|.
76 virtual std::set<std::string> GetAllIdsByProfile(Profile* profile) = 0;
77
75 // Removes notifications matching the |source_origin| (which could be an 78 // Removes notifications matching the |source_origin| (which could be an
76 // extension ID). Returns true if anything was removed. 79 // extension ID). Returns true if anything was removed.
77 virtual bool CancelAllBySourceOrigin(const GURL& source_origin) = 0; 80 virtual bool CancelAllBySourceOrigin(const GURL& source_origin) = 0;
78 81
79 // Removes notifications matching |profile_id|. Returns true if any were 82 // Removes notifications matching |profile_id|. Returns true if any were
80 // removed. 83 // removed.
81 virtual bool CancelAllByProfile(ProfileID profile_id) = 0; 84 virtual bool CancelAllByProfile(ProfileID profile_id) = 0;
82 85
83 // Cancels all pending notifications and closes anything currently showing. 86 // Cancels all pending notifications and closes anything currently showing.
84 // Used when the app is terminating. 87 // Used when the app is terminating.
85 virtual void CancelAll() = 0; 88 virtual void CancelAll() = 0;
86 89
87 protected: 90 protected:
88 NotificationUIManager() {} 91 NotificationUIManager() {}
89 92
90 private: 93 private:
91 DISALLOW_COPY_AND_ASSIGN(NotificationUIManager); 94 DISALLOW_COPY_AND_ASSIGN(NotificationUIManager);
92 }; 95 };
93 96
94 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_UI_MANAGER_H_ 97 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_UI_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698