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

Unified Diff: chrome/browser/notifications/native_notification_display_service.h

Issue 2917923004: Move handler processing to NotificationDisplayService
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/notifications/native_notification_display_service.h
diff --git a/chrome/browser/notifications/native_notification_display_service.h b/chrome/browser/notifications/native_notification_display_service.h
index 0ba2220f8739cc0bcae3dca93e64f1ae3f83ba30..a4eccc9426aa962bc143fbd626e4c061563f5aba 100644
--- a/chrome/browser/notifications/native_notification_display_service.h
+++ b/chrome/browser/notifications/native_notification_display_service.h
@@ -17,13 +17,8 @@
#include "chrome/browser/notifications/notification_common.h"
#include "chrome/browser/notifications/notification_display_service.h"
-namespace base {
-class NullableString16;
-}
-
class MessageCenterDisplayService;
class Notification;
-class NotificationHandler;
class NotificationPlatformBridge;
class Profile;
@@ -44,22 +39,7 @@ class NativeNotificationDisplayService : public NotificationDisplayService {
const std::string& notification_id) override;
void GetDisplayed(const DisplayedNotificationsCallback& callback) override;
- // Used by the notification bridge to propagate back events (click, close...).
- void ProcessNotificationOperation(NotificationCommon::Operation operation,
- NotificationCommon::Type notification_type,
- const std::string& origin,
- const std::string& notification_id,
- int action_index,
- const base::NullableString16& reply);
-
- // Registers an implementation object to handle notification operations
- // for |notification_type|.
- void AddNotificationHandler(NotificationCommon::Type notification_type,
- std::unique_ptr<NotificationHandler> handler);
private:
- NotificationHandler* GetNotificationHandler(
- NotificationCommon::Type notification_type);
-
// Called by |notification_bridge_| when it is finished
// initializing. |success| indicates it is ready to be used.
void OnNotificationPlatformBridgeReady(bool success);
@@ -78,9 +58,6 @@ class NativeNotificationDisplayService : public NotificationDisplayService {
// for |notification_bridge_|.
std::queue<base::OnceClosure> actions_;
- std::map<NotificationCommon::Type, std::unique_ptr<NotificationHandler>>
- notification_handlers_;
-
base::WeakPtrFactory<NativeNotificationDisplayService> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(NativeNotificationDisplayService);

Powered by Google App Engine
This is Rietveld 408576698