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

Unified Diff: content/browser/notifications/page_notification_delegate.cc

Issue 2906883003: Deprecate per notification type delegates. (Closed)
Patch Set: review Created 3 years, 6 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
« no previous file with comments | « content/browser/notifications/page_notification_delegate.h ('k') | content/public/browser/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/notifications/page_notification_delegate.cc
diff --git a/content/browser/notifications/page_notification_delegate.cc b/content/browser/notifications/page_notification_delegate.cc
deleted file mode 100644
index 478582917cdc0c915002319794a262bf6d4251f9..0000000000000000000000000000000000000000
--- a/content/browser/notifications/page_notification_delegate.cc
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright 2014 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 "content/browser/notifications/page_notification_delegate.h"
-
-#include "content/browser/notifications/notification_message_filter.h"
-#include "content/browser/renderer_host/render_process_host_impl.h"
-#include "content/common/platform_notification_messages.h"
-#include "content/public/browser/render_process_host.h"
-
-namespace content {
-
-PageNotificationDelegate::PageNotificationDelegate(
- int render_process_id,
- int non_persistent_notification_id,
- const std::string& notification_id)
- : render_process_id_(render_process_id),
- non_persistent_notification_id_(non_persistent_notification_id),
- notification_id_(notification_id) {}
-
-PageNotificationDelegate::~PageNotificationDelegate() {}
-
-void PageNotificationDelegate::NotificationDisplayed() {
- RenderProcessHost* sender = RenderProcessHost::FromID(render_process_id_);
- if (!sender)
- return;
-
- sender->Send(
- new PlatformNotificationMsg_DidShow(non_persistent_notification_id_));
-}
-
-void PageNotificationDelegate::NotificationClosed() {
- RenderProcessHost* sender = RenderProcessHost::FromID(render_process_id_);
- if (!sender)
- return;
-
- sender->Send(
- new PlatformNotificationMsg_DidClose(non_persistent_notification_id_));
-
- static_cast<RenderProcessHostImpl*>(sender)
- ->notification_message_filter()
- ->DidCloseNotification(notification_id_);
-}
-
-void PageNotificationDelegate::NotificationClick() {
- RenderProcessHost* sender = RenderProcessHost::FromID(render_process_id_);
- if (!sender)
- return;
-
- sender->Send(
- new PlatformNotificationMsg_DidClick(non_persistent_notification_id_));
-}
-
-} // namespace content
« no previous file with comments | « content/browser/notifications/page_notification_delegate.h ('k') | content/public/browser/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698