• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/WebKit-7537.78.2/qt/WebCoreSupport/

Lines Matching defs:notification

95     Notification* notification = NotificationPresenterClientQt::notificationPresenter()->notificationForWrapper(this);
96 if (notification)
97 return notification->title();
105 Notification* notification = NotificationPresenterClientQt::notificationPresenter()->notificationForWrapper(this);
106 if (notification)
107 return notification->body();
115 Notification* notification = NotificationPresenterClientQt::notificationPresenter()->notificationForWrapper(this);
116 if (notification)
117 return notification->iconURL();
126 Notification* notification = NotificationPresenterClientQt::notificationPresenter()->notificationForWrapper(this);
127 if (notification) {
128 if (notification->scriptExecutionContext())
129 url = static_cast<Document*>(notification->scriptExecutionContext())->page()->mainFrame()->document()->url();
172 bool NotificationPresenterClientQt::show(Notification* notification)
175 if (notification->scriptExecutionContext()->isWorkerContext())
177 notification->setPendingActivity(notification);
178 if (!notification->tag().isEmpty())
179 removeReplacedNotificationFromQueue(notification);
181 dumpShowText(notification);
182 displayNotification(notification);
186 void NotificationPresenterClientQt::displayNotification(Notification* notification)
189 m_notifications.insert(notification, wrapper);
190 QString title = notification->title();
191 QString message = notification->body();
205 // Make sure the notification was not cancelled during handling the display event
206 if (m_notifications.find(notification) == m_notifications.end())
219 QMetaObject::invokeMethod(m_systemTrayIcon.data(), "showMessage", Q_ARG(QString, notification->title()), Q_ARG(QString, notification->body()));
223 void NotificationPresenterClientQt::cancel(Notification* notification)
225 if (dumpNotification && notification->scriptExecutionContext())
226 printf("DESKTOP NOTIFICATION CLOSED: %s\n", QString(notification->title()).toUtf8().constData());
228 NotificationsQueue::Iterator iter = m_notifications.find(notification);
230 sendEvent(notification, eventNames().closeEvent);
231 detachNotification(notification);
237 Notification* notification = notificationForWrapper(wrapper);
238 if (notification)
239 cancel(notification);
244 Notification* notification = notificationForWrapper(wrapper);
245 if (notification) {
248 sendEvent(notification, eventNames().clickEvent);
258 Notification* notification = 0;
260 notification = iter.key();
261 QString notificationTitle = notification->title();
266 if (notification)
267 sendEvent(notification, eventNames().clickEvent);
281 void NotificationPresenterClientQt::notificationObjectDestroyed(Notification* notification)
284 NotificationsQueue::Iterator iter = m_notifications.find(notification);
286 delete m_notifications.take(notification);
418 Notification* notification = notificationForWrapper(wrapper);
419 if (notification)
420 sendEvent(notification, "show");
423 void NotificationPresenterClientQt::sendEvent(Notification* notification, const AtomicString& eventName)
425 if (notification->scriptExecutionContext())
426 notification->dispatchEvent(Event::create(eventName, false, true));
434 void NotificationPresenterClientQt::removeReplacedNotificationFromQueue(Notification* notification)
442 if (existingNotification->tag() == notification->tag()) {
457 void NotificationPresenterClientQt::detachNotification(Notification* notification)
459 delete m_notifications.take(notification);
460 notification->detachPresenter();
461 notification->unsetPendingActivity(notification);
464 void NotificationPresenterClientQt::dumpReplacedIdText(Notification* notification)
466 if (notification)
467 printf("REPLACING NOTIFICATION %s\n", QString(notification->title()).toUtf8().constData());
470 void NotificationPresenterClientQt::dumpShowText(Notification* notification)
473 notification->dir() == "rtl" ? "(RTL)" : "",
474 QString(notification->iconURL().string()).toUtf8().constData(), QString(notification->title()).toUtf8().constData(),
475 QString(notification->body()).toUtf8().constData());