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 69% |
copy from chrome/browser/notifications/notification_delegate.h |
copy to ui/message_center/notification_delegate.h |
index 1c579d562b511d7501c5488523bc6bcc1ccbd76e..d2da2dd0b8e6eee73312ff79eed6b8c98fc56614 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. |
@@ -30,29 +33,17 @@ class NotificationDelegate |
// user explicitly (as opposed to timeout/script), |by_user| should be true. |
virtual void Close(bool by_user) = 0; |
- // To be called when a desktop notification is clicked. |
- virtual void Click() = 0; |
- |
// Returns true if the delegate can handle click event. |
virtual bool HasClickedListener(); |
+ // To be called when a desktop notification is clicked. |
+ virtual void Click() = 0; |
+ |
// To be called when the user clicks a button in a notification. TODO(miket): |
// consider providing default implementations of the pure virtuals of this |
// 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() {} |
@@ -60,4 +51,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_ |