Move NotificationContents into Notification
authorjonlee@apple.com <jonlee@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 15 Mar 2012 23:07:37 +0000 (23:07 +0000)
committerjonlee@apple.com <jonlee@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 15 Mar 2012 23:07:37 +0000 (23:07 +0000)
commitbe0665dab56563faeec4b6c53b86451a8db4d4b8
tree732733921a2a7f22c3c2823e56aa782a6e8298ed
parentdd8f0aca9dd5a677f4a158a531ca55504289d82a
Move NotificationContents into Notification
https://bugs.webkit.org/show_bug.cgi?id=80487
<rdar://problem/10965519>

Reviewed by Jian Li.

Source/WebCore:

* notifications/Notification.cpp: Alter signature of constructor to take the fields directly instead of
a NotificationContents instance.
(WebCore::Notification::Notification): Derive KURL from string representation of icon.
(WebCore::Notification::create):
* notifications/Notification.h:
(Notification): Remove contents() accessor and replace with get for title and body. iconURL()
already existed, but use local variable instead of going through NotificationContents.
(WebCore::Notification::iconURL):
(WebCore::Notification::title):
(WebCore::Notification::body):
* notifications/NotificationCenter.h:
(WebCore::NotificationCenter::createNotification): Refactor to use new constructor.
* notifications/NotificationContents.h: Removed.

Remove NotificationContents.h from project files
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:

Source/WebKit/chromium:

Refactor to use accessor methods on Notification.
* src/WebNotification.cpp:
(WebKit::WebNotification::title):
(WebKit::WebNotification::body):

Source/WebKit/mac:

* WebView/WebNotification.mm: Refactor to use accessor methods on Notification.
(-[WebNotification title]):
(-[WebNotification body]):

Source/WebKit/qt:

Refactor to use accessor methods on Notification.
* WebCoreSupport/NotificationPresenterClientQt.cpp:
(WebCore::NotificationWrapper::title):
(WebCore::NotificationWrapper::message):
(WebCore::NotificationPresenterClientQt::displayNotification):
(WebCore::NotificationPresenterClientQt::cancel):
(WebCore::NotificationPresenterClientQt::notificationClicked):
(WebCore::NotificationPresenterClientQt::dumpReplacedIdText):
(WebCore::NotificationPresenterClientQt::dumpShowText):

Source/WebKit2:

* UIProcess/Notifications/WebNotificationManagerProxy.cpp: Remove extraneous include.
* WebProcess/Notifications/WebNotificationManager.cpp:
(WebKit::WebNotificationManager::show): Refactor to use accessor methods on Notification.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@110903 268f45cc-cd09-0410-ab3c-d52691b4dbfc
19 files changed:
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/Target.pri
Source/WebCore/WebCore.gypi
Source/WebCore/WebCore.vcproj/WebCore.vcproj
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/notifications/Notification.cpp
Source/WebCore/notifications/Notification.h
Source/WebCore/notifications/NotificationCenter.h
Source/WebCore/notifications/NotificationContents.h [deleted file]
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/WebNotification.cpp
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebNotification.mm
Source/WebKit/qt/ChangeLog
Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.cpp
Source/WebKit2/WebProcess/Notifications/WebNotificationManager.cpp