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

Unified Diff: webkit/api/src/WebNotification.cpp

Issue 194079: renderer process notifications support (Closed)
Patch Set: last change for code review Created 11 years, 3 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: webkit/api/src/WebNotification.cpp
diff --git a/webkit/api/src/WebNotification.cpp b/webkit/api/src/WebNotification.cpp
index 46baab736e525745e7ea4a6ddf770ce0be0cb94e..2b2e3bba849d019ed1e332c8d94628d38d941de2 100644
--- a/webkit/api/src/WebNotification.cpp
+++ b/webkit/api/src/WebNotification.cpp
@@ -58,6 +58,11 @@ void WebNotification::assign(const WebNotification& other)
assign(p);
}
+bool WebNotification::lessThan(const WebNotification& other) const
+{
+ return reinterpret_cast<uintptr_t>(m_private) < reinterpret_cast<uintptr_t>(other.m_private);
+}
+
bool WebNotification::isHTML() const
{
return m_private->isHTML();
@@ -89,19 +94,22 @@ WebString WebNotification::body() const
void WebNotification::dispatchDisplayEvent()
{
- m_private->dispatchDisplayEvent();
+ RefPtr<Event> event = Event::create("display", false, true);
+ m_private->dispatchEvent(event.release());
}
void WebNotification::dispatchErrorEvent(const WebKit::WebString& /* errorMessage */)
{
// FIXME: errorMessage not supported by WebCore yet
- m_private->dispatchErrorEvent();
+ RefPtr<Event> event = Event::create(eventNames().errorEvent, false, true);
+ m_private->dispatchEvent(event.release());
}
void WebNotification::dispatchCloseEvent(bool /* byUser */)
{
// FIXME: byUser flag not supported by WebCore yet
- m_private->dispatchCloseEvent();
+ RefPtr<Event> event = Event::create(eventNames().closeEvent, false, true);
+ m_private->dispatchEvent(event.release());
}
WebNotification::WebNotification(const WTF::PassRefPtr<Notification>& notification)

Powered by Google App Engine
This is Rietveld 408576698