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

Unified Diff: chrome/browser/extensions/api/notifications/extension_notification_handler.cc

Issue 2703213004: Migrate extension notifications to the new NotificationDisplayService (Closed)
Patch Set: Finish functionality Created 3 years, 10 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/extensions/api/notifications/extension_notification_handler.cc
diff --git a/chrome/browser/extensions/api/notifications/extension_notification_handler.cc b/chrome/browser/extensions/api/notifications/extension_notification_handler.cc
new file mode 100644
index 0000000000000000000000000000000000000000..84cf00ea30ec12a95f003b0eb61a7fdb35f4bfec
--- /dev/null
+++ b/chrome/browser/extensions/api/notifications/extension_notification_handler.cc
@@ -0,0 +1,35 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/extensions/api/notifications/extension_notification_handler.h"
+
+#include "base/logging.h"
+
+ExtensionNotificationHandler::ExtensionNotificationHandler() = default;
+
+ExtensionNotificationHandler::~ExtensionNotificationHandler() = default;
+
+void ExtensionNotificationHandler::OnClose(Profile* profile,
+ const std::string& origin,
+ const std::string& notification_id,
+ bool by_user) {
+ // TODO(peter): Call EraseDataForNotificationId from here once this event
Miguel Garcia 2017/02/21 10:56:43 Why would you not call it though? native NDSes wil
Peter Beverloo 2017/02/21 17:23:50 Because we'd end up clearing the data multiple tim
+ // can be relied upon. (It's only been implemented for native NDSes.)
+}
+
+void ExtensionNotificationHandler::OnClick(
Miguel Garcia 2017/02/21 10:56:43 So you are not propagating click/close events back
Peter Beverloo 2017/02/21 17:23:50 No. Same answer - we can't rely on this functional
+ Profile* profile,
+ const std::string& origin,
+ const std::string& notification_id,
+ int action_index,
+ const base::NullableString16& reply) {}
+
+void ExtensionNotificationHandler::OpenSettings(Profile* profile) {
+ // Extension notifications don't display a settings button.
+ NOTREACHED();
+}
+
+void ExtensionNotificationHandler::RegisterNotification(
+ const std::string& notification_id,
+ NotificationDelegate* delegate) {}

Powered by Google App Engine
This is Rietveld 408576698