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

Unified Diff: chrome/browser/notifications/persistent_notification_delegate.cc

Issue 2921263002: Remove many delegates, let's see what breaks
Patch Set: compile 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
Index: chrome/browser/notifications/persistent_notification_delegate.cc
diff --git a/chrome/browser/notifications/persistent_notification_delegate.cc b/chrome/browser/notifications/persistent_notification_delegate.cc
deleted file mode 100644
index b38f3c1b24ca69ae7755de187c4053fcf7ac498b..0000000000000000000000000000000000000000
--- a/chrome/browser/notifications/persistent_notification_delegate.cc
+++ /dev/null
@@ -1,54 +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 "chrome/browser/notifications/persistent_notification_delegate.h"
-
-#include "base/strings/nullable_string16.h"
-#include "chrome/browser/notifications/platform_notification_service_impl.h"
-#include "url/gurl.h"
-
-PersistentNotificationDelegate::PersistentNotificationDelegate(
- content::BrowserContext* browser_context,
- const std::string& notification_id,
- const GURL& origin,
- int notification_settings_index)
- : WebNotificationDelegate(browser_context, notification_id, origin),
- notification_settings_index_(notification_settings_index) {}
-
-PersistentNotificationDelegate::~PersistentNotificationDelegate() {}
-
-void PersistentNotificationDelegate::Display() {}
-
-void PersistentNotificationDelegate::Close(bool by_user) {
- PlatformNotificationServiceImpl::GetInstance()->OnPersistentNotificationClose(
- browser_context(), id(), origin(), by_user);
-}
-
-void PersistentNotificationDelegate::Click() {
- PlatformNotificationServiceImpl::GetInstance()->OnPersistentNotificationClick(
- browser_context(), id(), origin(), -1 /* action_index */,
- base::NullableString16() /* reply */);
-}
-
-void PersistentNotificationDelegate::ButtonClick(int button_index) {
- DCHECK_GE(button_index, 0);
- if (button_index == notification_settings_index_) {
- NotificationCommon::OpenNotificationSettings(browser_context());
- return;
- }
-
- PlatformNotificationServiceImpl::GetInstance()->OnPersistentNotificationClick(
- browser_context(), id(), origin(), button_index,
- base::NullableString16() /* reply */);
-}
-
-void PersistentNotificationDelegate::ButtonClickWithReply(
- int button_index,
- const base::string16& reply) {
- DCHECK_GE(button_index, 0);
- DCHECK_NE(button_index, notification_settings_index_);
- PlatformNotificationServiceImpl::GetInstance()->OnPersistentNotificationClick(
- browser_context(), id(), origin(), button_index,
- base::NullableString16(reply, false /* is_null */));
-}

Powered by Google App Engine
This is Rietveld 408576698