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

Unified Diff: content/browser/notification_message_filter.cc

Issue 681783004: Implement the PageNotificationDelegate for the new Web Notification path. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: s/Ids/ids/ Created 6 years, 2 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/notification_message_filter.h ('k') | content/browser/notifications/OWNERS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/notification_message_filter.cc
diff --git a/content/browser/notification_message_filter.cc b/content/browser/notification_message_filter.cc
deleted file mode 100644
index da666397c9adc34ba9e5fb93374f0272d2c33238..0000000000000000000000000000000000000000
--- a/content/browser/notification_message_filter.cc
+++ /dev/null
@@ -1,65 +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/notification_message_filter.h"
-
-#include "content/common/platform_notification_messages.h"
-#include "content/public/browser/content_browser_client.h"
-#include "content/public/common/content_client.h"
-
-namespace content {
-
-NotificationMessageFilter::NotificationMessageFilter(
- int process_id,
- ResourceContext* resource_context)
- : BrowserMessageFilter(PlatformNotificationMsgStart),
- process_id_(process_id),
- resource_context_(resource_context) {}
-
-NotificationMessageFilter::~NotificationMessageFilter() {}
-
-bool NotificationMessageFilter::OnMessageReceived(const IPC::Message& message) {
- bool handled = true;
- IPC_BEGIN_MESSAGE_MAP(NotificationMessageFilter, message)
- IPC_MESSAGE_HANDLER(PlatformNotificationHostMsg_CheckPermission,
- OnCheckNotificationPermission)
- IPC_MESSAGE_HANDLER(PlatformNotificationHostMsg_Show,
- OnShowPlatformNotification)
- IPC_MESSAGE_HANDLER(PlatformNotificationHostMsg_Close,
- OnClosePlatformNotification)
- IPC_MESSAGE_UNHANDLED(handled = false)
- IPC_END_MESSAGE_MAP()
-
- return handled;
-}
-
-void NotificationMessageFilter::OverrideThreadForMessage(
- const IPC::Message& message, content::BrowserThread::ID* thread) {
- if (message.type() == PlatformNotificationHostMsg_Show::ID ||
- message.type() == PlatformNotificationHostMsg_Close::ID)
- *thread = BrowserThread::UI;
-}
-
-void NotificationMessageFilter::OnCheckNotificationPermission(
- const GURL& origin, blink::WebNotificationPermission* permission) {
- *permission =
- GetContentClient()->browser()->CheckDesktopNotificationPermission(
- origin,
- resource_context_,
- process_id_);
-}
-
-void NotificationMessageFilter::OnShowPlatformNotification(
- int notification_id, const ShowDesktopNotificationHostMsgParams& params) {
- // TODO(peter): Implement the DesktopNotificationDelegate.
- NOTIMPLEMENTED();
-}
-
-void NotificationMessageFilter::OnClosePlatformNotification(
- int notification_id) {
- // TODO(peter): Implement the ability to close notifications.
- NOTIMPLEMENTED();
-}
-
-} // namespace content
« no previous file with comments | « content/browser/notification_message_filter.h ('k') | content/browser/notifications/OWNERS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698