This source file includes following definitions.
- reset
- assign
- equals
- lessThan
- title
- direction
- lang
- body
- tag
- iconURL
- dispatchShowEvent
- dispatchErrorEvent
- dispatchCloseEvent
- dispatchClickEvent
#include "config.h"
#include "WebNotification.h"
#include "core/events/Event.h"
#include "modules/notifications/Notification.h"
#include "public/platform/WebURL.h"
#include "wtf/PassRefPtr.h"
using WebCore::Notification;
namespace blink {
void WebNotification::reset()
{
m_private.reset();
}
void WebNotification::assign(const WebNotification& other)
{
m_private = other.m_private;
}
bool WebNotification::equals(const WebNotification& other) const
{
return m_private.get() == other.m_private.get();
}
bool WebNotification::lessThan(const WebNotification& other) const
{
return m_private.get() < other.m_private.get();
}
WebString WebNotification::title() const
{
return m_private->title();
}
WebTextDirection WebNotification::direction() const
{
return (m_private->direction() == WebCore::RTL) ?
WebTextDirectionRightToLeft :
WebTextDirectionLeftToRight;
}
WebString WebNotification::lang() const
{
return m_private->lang();
}
WebString WebNotification::body() const
{
return m_private->body();
}
WebString WebNotification::tag() const
{
return m_private->tag();
}
WebURL WebNotification::iconURL() const
{
return m_private->iconURL();
}
void WebNotification::dispatchShowEvent()
{
m_private->dispatchShowEvent();
}
void WebNotification::dispatchErrorEvent(const WebString& )
{
m_private->dispatchErrorEvent();
}
void WebNotification::dispatchCloseEvent(bool )
{
m_private->dispatchCloseEvent();
}
void WebNotification::dispatchClickEvent()
{
m_private->dispatchClickEvent();
}
WebNotification::WebNotification(const WTF::PassRefPtr<WebCore::Notification>& notification)
: m_private(notification)
{
}
WebNotification& WebNotification::operator=(const WTF::PassRefPtr<Notification>& notification)
{
m_private = notification;
return *this;
}
WebNotification::operator WTF::PassRefPtr<Notification>() const
{
return m_private.get();
}
}