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

Unified Diff: ui/message_center/notification_delegate.h

Issue 15582004: Move NotificationDelegate into message_center. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Win browsertests. Created 7 years, 7 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: ui/message_center/notification_delegate.h
diff --git a/chrome/browser/notifications/notification_delegate.h b/ui/message_center/notification_delegate.h
similarity index 68%
copy from chrome/browser/notifications/notification_delegate.h
copy to ui/message_center/notification_delegate.h
index babd23b3922aee7f60efbfe8b55e5856ac3b9dcc..a01e46df5a4055c604f15577dae154a73fe150ad 100644
--- a/chrome/browser/notifications/notification_delegate.h
+++ b/ui/message_center/notification_delegate.h
@@ -2,21 +2,24 @@
// 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_DELEGATE_H_
-#define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_DELEGATE_H_
+#ifndef UI_MESSAGE_CENTER_NOTIFICATION_DELEGATE_H_
+#define UI_MESSAGE_CENTER_NOTIFICATION_DELEGATE_H_
#include <string>
#include "base/memory/ref_counted.h"
+#include "ui/message_center/message_center_export.h"
namespace content {
class RenderViewHost;
}
+namespace message_center {
+
// Delegate for a notification. This class has two roles: to implement callback
// methods for notification, and to provide an identity of the associated
// notification.
-class NotificationDelegate
+class MESSAGE_CENTER_EXPORT NotificationDelegate
: public base::RefCountedThreadSafe<NotificationDelegate> {
public:
// To be called when the desktop notification is actually shown.
@@ -38,18 +41,6 @@ class NotificationDelegate
// interface, to avoid pinging so many OWNERs each time we enhance it.
virtual void ButtonClick(int button_index);
- // Returns unique id of the notification.
- virtual std::string id() const = 0;
-
- // Returns the id of renderer process which creates the notification, or -1.
- virtual int process_id() const;
-
- // Returns the RenderViewHost that generated the notification, or NULL.
- virtual content::RenderViewHost* GetRenderViewHost() const = 0;
-
- // Lets the delegate know that no more rendering will be necessary.
- virtual void ReleaseRenderViewHost();
-
protected:
virtual ~NotificationDelegate() {}
@@ -57,4 +48,6 @@ class NotificationDelegate
friend class base::RefCountedThreadSafe<NotificationDelegate>;
};
-#endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_DELEGATE_H_
+} // namespace message_center
+
+#endif // UI_MESSAGE_CENTER_NOTIFICATION_DELEGATE_H_

Powered by Google App Engine
This is Rietveld 408576698