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

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

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
Index: chrome/browser/notifications/notification_object_proxy.h
diff --git a/chrome/browser/notifications/notification_object_proxy.h b/chrome/browser/notifications/notification_object_proxy.h
deleted file mode 100644
index 02eab40acd590eb7f412c553ec188ddecc9adef1..0000000000000000000000000000000000000000
--- a/chrome/browser/notifications/notification_object_proxy.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright (c) 2012 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.
-
-#ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_OBJECT_PROXY_H_
-#define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_OBJECT_PROXY_H_
-
-#include <memory>
-#include <string>
-
-#include "base/macros.h"
-#include "chrome/browser/notifications/web_notification_delegate.h"
-
-class GURL;
-
-namespace content {
-class BrowserContext;
-class DesktopNotificationDelegate;
-}
-
-// A NotificationObjectProxy stands in for the JavaScript Notification object
-// which corresponds to a notification toast on the desktop. It can be signaled
-// when various events occur regarding the desktop notification, and the
-// attached JS listeners will be invoked in the renderer or worker process.
-class NotificationObjectProxy : public WebNotificationDelegate {
- public:
- // Creates a Proxy object with the necessary callback information. The Proxy
- // will take ownership of |delegate|.
- NotificationObjectProxy(
- content::BrowserContext* browser_context,
- const std::string& notification_id,
- const GURL& origin,
- std::unique_ptr<content::DesktopNotificationDelegate> delegate);
-
- // NotificationDelegate implementation.
- void Display() override;
- void Close(bool by_user) override;
- void Click() override;
- void ButtonClick(int button_index) override;
-
- protected:
- ~NotificationObjectProxy() override;
-
- private:
- std::unique_ptr<content::DesktopNotificationDelegate> delegate_;
- bool displayed_;
-
- DISALLOW_COPY_AND_ASSIGN(NotificationObjectProxy);
-};
-
-#endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_OBJECT_PROXY_H_

Powered by Google App Engine
This is Rietveld 408576698