Source/JavaScriptCore/ChangeLog

 12011-11-28 Jon Lee <jonlee@apple.com>
 2
 3 Create skeleton framework for notifications support in WK2
 4 https://bugs.webkit.org/show_bug.cgi?id=73253
 5 <rdar://problem/10356943>
 6
 7 * Configurations/FeatureDefines.xcconfig: Split out ENABLE_NOTIFICATIONS based on platform.
 8
192011-11-28 Filip Pizlo <fpizlo@apple.com>
210
311 GetById should not always speculate cell

Source/WebCore/ChangeLog

 12011-11-28 Jon Lee <jonlee@apple.com>
 2
 3 Create skeleton framework for notifications support in WK2
 4 https://bugs.webkit.org/show_bug.cgi?id=73253
 5 <rdar://problem/10356943>
 6
 7 Reviewed by NOBODY (OOPS!).
 8
 9 Some refactoring was done to make notifications follow a similar pattern to our other clients, like
 10 geolocation and context menu.
 11
 12 * Configurations/FeatureDefines.xcconfig: Split out ENABLE_NOTIFICATIONS based on platform.
 13 * WebCore.xcodeproj/project.pbxproj: Adding new NotificationController class, and exposing
 14 Notification and NotificationController as private headers.
 15 * Target.pri: Ditto.
 16 * WebCore.gypi: Ditto.
 17
 18 * notifications/NotificationContents.h: Converted class to struct. Members need to be accessible
 19 in order to do WK2 argument encoding.
 20 (WebCore::NotificationContents::NotificationContents):
 21
 22 * notifications/Notification.cpp: Update style of entire file.
 23 (WebCore::Notification::Notification): Added default constructor (for WK2), and minor refactoring
 24 with NotificationContents.
 25 * notifications/Notification.h: Added set methods for WK2 serialization. Also, update indenting.
 26 (WebCore::Notification::setHTML): Added.
 27 (WebCore::Notification::setURL): Added.
 28 (WebCore::Notification::contents): Added const version for WK2.
 29 * notifications/NotificationCenter.h: Update style.
 30
 31 * notifications/NotificationController.cpp: Added.
 32 (WebCore::NotificationController::NotificationController):
 33 (WebCore::NotificationController::~NotificationController):
 34 * notifications/NotificationController.h: Added.
 35 (WebCore::NotificationController::client):
 36 * notifications/NotificationPresenter.h: This acts like a client, and should probably be renamed as such.
 37 Removed ifdef for exposure to WK2.
 38 (WebCore::NotificationPresenter::~NotificationPresenter): Moved as protected instead of public.
 39
 40 * page/DOMWindow.cpp:
 41 (WebCore::DOMWindow::webkitNotifications): We move the request for the notification client from the chrome
 42 to the controller.
 43 * page/Page.cpp:
 44 (WebCore::Page::Page): The page now owns a notification controller.
 45 (WebCore::Page::PageClients::PageClients): Add notification client as a page client.
 46 * page/Page.h:
 47 (WebCore::Page::notificationController): Retrieve the notification controller.
 48
 49 * page/ChromeClient.h: We move the request for the notification client from the chrome to the controller.
 50 Remove notificationPresenter().
 51 * page/Chrome.cpp: Remove notificationPresenter().
 52 * page/Chrome.h: Remove notificationPresenter().
 53 * loader/EmptyClients.h: Remove notificationPresenter().
 54
1552011-11-28 Beth Dakin <bdakin@apple.com>
256
357 Speculative Chromium build-fix.

Source/WebKit/ChangeLog

 12011-11-28 Jon Lee <jonlee@apple.com>
 2
 3 Create skeleton framework for notifications support in WK2
 4 https://bugs.webkit.org/show_bug.cgi?id=73253
 5 <rdar://problem/10356943>
 6
 7 Reviewed by NOBODY (OOPS!).
 8
 9 * WebKit.xcodeproj/project.pbxproj: Add WebNotificationClient class.
 10
1112011-11-26 Jonathan Dong <jonathan.dong@torchmobile.com.cn>
212
313 [CMake] Clean up Web Inspector target in Source/WebKit/blackberry/CMakeListsBlackBerry.txt

Source/WebKit/chromium/ChangeLog

 12011-11-28 Jon Lee <jonlee@apple.com>
 2
 3 Create skeleton framework for notifications support in WK2
 4 https://bugs.webkit.org/show_bug.cgi?id=73253
 5 <rdar://problem/10356943>
 6
 7 Reviewed by NOBODY (OOPS!).
 8
 9 Remove notificationPresenter() from the chrome client, since it is now managed by
 10 the notification controller.
 11
 12 * src/ChromeClientImpl.cpp:
 13 * src/ChromeClientImpl.h:
 14 * src/WebNotification.cpp:
 15 (WebKit::WebNotification::title): Refactoring with NotificationContents conversion to struct.
 16 (WebKit::WebNotification::body): Ditto.
 17 * src/WebViewImpl.cpp:
 18 (WebKit::WebViewImpl::WebViewImpl): Set notification client in web view's page clients.
 19
1202011-11-28 Sheriff Bot <webkit.review.bot@gmail.com>
221
322 Unreviewed, rolling out r101273.

Source/WebKit/mac/ChangeLog

 12011-11-28 Jon Lee <jonlee@apple.com>
 2
 3 Create skeleton framework for notifications support in WK2
 4 https://bugs.webkit.org/show_bug.cgi?id=73253
 5 <rdar://problem/10356943>
 6
 7 Reviewed by NOBODY (OOPS!).
 8
 9 * Configurations/FeatureDefines.xcconfig: Split out ENABLE_NOTIFICATIONS based on platform.
 10
 11 * WebCoreSupport/WebNotificationClient.h: Added.
 12 (WebNotificationClient::webView):
 13 * WebCoreSupport/WebNotificationClient.mm: Added. Implemented as stubs for now.
 14 (WebNotificationClient::WebNotificationClient):
 15 (WebNotificationClient::show):
 16 (WebNotificationClient::cancel):
 17 (WebNotificationClient::notificationObjectDestroyed):
 18 (WebNotificationClient::requestPermission):
 19 (WebNotificationClient::cancelRequestsForPermission):
 20 (WebNotificationClient::checkPermission):
 21 * WebView/WebView.mm: Set PageClient's notification client to an instance of this stubbed class.
 22
1232011-11-28 Adam Roben <aroben@apple.com>
224
325 Properly retain the OS X version string

Source/WebKit/qt/ChangeLog

 12011-11-28 Jon Lee <jonlee@apple.com>
 2
 3 Create skeleton framework for notifications support in WK2
 4 https://bugs.webkit.org/show_bug.cgi?id=73253
 5 <rdar://problem/10356943>
 6
 7 Reviewed by NOBODY (OOPS!).
 8
 9 * Api/qwebpage.cpp: Add notification client to pageClients.
 10 (QWebPagePrivate::QWebPagePrivate):
 11 * WebCoreSupport/ChromeClientQt.cpp: Remove notification client from ChromeClient implementation.
 12 * WebCoreSupport/ChromeClientQt.h:
 13 * WebCoreSupport/NotificationPresenterClientQt.cpp: Refactor with change of NotificationContents to struct
 14 (WebCore::NotificationWrapper::title):
 15 (WebCore::NotificationWrapper::message):
 16 (WebCore::NotificationPresenterClientQt::displayNotification):
 17 (WebCore::NotificationPresenterClientQt::cancel):
 18 (WebCore::NotificationPresenterClientQt::notificationClicked):
 19 (WebCore::NotificationPresenterClientQt::dumpReplacedIdText):
 20 (WebCore::NotificationPresenterClientQt::dumpShowText):
 21
1222011-11-28 Simon Hausmann <simon.hausmann@nokia.com>
223
324 [Qt] Build system fixes against V8.

Source/WebKit2/ChangeLog

 12011-11-28 Jon Lee <jonlee@apple.com>
 2
 3 Create skeleton framework for notifications support in WK2
 4 https://bugs.webkit.org/show_bug.cgi?id=73253
 5 <rdar://problem/10356943>
 6
 7 Reviewed by NOBODY (OOPS!).
 8
 9 * WebKit2.xcodeproj/project.pbxproj: Added classes for notification support.
 10 * win/WebKit2.vcproj: Ditto.
 11 * Configurations/FeatureDefines.xcconfig: Split out ENABLE_NOTIFICATIONS based on platform.
 12 * DerivedSources.make: Add Notifications to VPATH.
 13 * Platform/CoreIPC/MessageID.h: List WebNotificationManagerProxy as a class with messages.
 14 * Scripts/webkit2/messages.py: Mark WebCore::NotificationContents as a struct.
 15
 16 * Shared/API/c/WKBase.h: Map opaque types to NotificationProvider, NotificationManager, and Notification.
 17 * UIProcess/API/C/WKAPICast.h: Map WK types toNotificationProvider, NotificationManager, and Notification.
 18 * Shared/APIObject.h: Add Notification and NotificationManager as APIObjects.
 19 * Shared/WebCoreArgumentCoders.cpp: Added coders for KURL.
 20 (CoreIPC::::encode):
 21 (CoreIPC::::decode):
 22 * Shared/WebCoreArgumentCoders.h:
 23
 24 * UIProcess/WebNotification.cpp: Added.
 25 (WebKit::WebNotification::WebNotification):
 26 (WebKit::WebNotification::~WebNotification):
 27 (WebKit::WebNotification::encode):
 28 (WebKit::WebNotification::decode):
 29 * UIProcess/WebNotification.h: Added.
 30 (WebKit::WebNotification::create):
 31 (WebKit::WebNotification::title):
 32 (WebKit::WebNotification::body):
 33 (WebKit::WebNotification::type):
 34 * UIProcess/API/C/WKNotification.cpp: Added as API.
 35 (WKNotificationGetTypeID):
 36 (WKNotificationCopyTitle):
 37 (WKNotificationCopyBody):
 38 * UIProcess/API/C/WKNotification.h: Added as API.
 39
 40 * WebProcess/Notifications/WebNotificationManager.h: Added. Contains for now show() and cancel().
 41 The rest of the notification client methods will be added later. These two functions send messages
 42 to the manager proxy.
 43 * WebProcess/Notifications/WebNotificationManager.cpp: Added.
 44 (WebKit::WebNotificationManager::WebNotificationManager):
 45 (WebKit::WebNotificationManager::~WebNotificationManager):
 46 (WebKit::WebNotificationManager::show):
 47 (WebKit::WebNotificationManager::cancel):
 48
 49 * UIProcess/WebNotificationManagerProxy.cpp: Added.
 50 (WebKit::WebNotificationManagerProxy::create):
 51 (WebKit::WebNotificationManagerProxy::WebNotificationManagerProxy):
 52 (WebKit::WebNotificationManagerProxy::~WebNotificationManagerProxy):
 53 (WebKit::WebNotificationManagerProxy::invalidate):
 54 (WebKit::WebNotificationManagerProxy::initializeProvider):
 55 (WebKit::WebNotificationManagerProxy::didReceiveMessage):
 56 (WebKit::WebNotificationManagerProxy::show):
 57 (WebKit::WebNotificationManagerProxy::cancel):
 58 * UIProcess/WebNotificationManagerProxy.h: Added.
 59 (WebKit::WebNotificationManagerProxy::clearContext):
 60 (WebKit::WebNotificationManagerProxy::type):
 61 * UIProcess/WebNotificationManagerProxy.messages.in: Added.
 62 * UIProcess/API/C/WKNotificationManager.cpp: Added.
 63 (WKNotificationManagerGetTypeID):
 64 (WKNotificationManagerSetProvider):
 65 * UIProcess/API/C/WKNotificationManager.h: Added.
 66
 67 * UIProcess/WebContext.h: Add the notification manager to the web context.
 68 (WebKit::WebContext::notificationManagerProxy): Access the manager.
 69 * UIProcess/WebContext.cpp:
 70 (WebKit::WebContext::WebContext): Boilerplate for managers.
 71 (WebKit::WebContext::~WebContext): Boilerplate for managers.
 72 (WebKit::WebContext::disconnectProcess): Boilerplate for managers.
 73 (WebKit::WebContext::didReceiveMessage): Forward messages to the notification manager.
 74 * UIProcess/API/C/WKContext.cpp: Expose as API.
 75 (WKContextGetNotificationManager):
 76 * UIProcess/API/C/WKContext.h: Expose as API.
 77
 78 * UIProcess/API/C/WKNotificationProvider.h: Added.
 79 * UIProcess/WebNotificationProvider.h: Added as APIClient.
 80 * UIProcess/WebNotificationProvider.cpp: Added.
 81 (WebKit::WebNotificationProvider::show): Forward call to the client.
 82 (WebKit::WebNotificationProvider::cancel): Forward call to the client.
 83 * UIProcess/WebProcessProxy.cpp:
 84 (WebKit::WebProcessProxy::didReceiveMessage): Forward messages for notification manager to the context.
 85
 86 * WebProcess/WebCoreSupport/WebChromeClient.cpp: Remove notificationPresenter().
 87 * WebProcess/WebCoreSupport/WebChromeClient.h: Remove notificationPresenter().
 88
 89 * WebProcess/WebCoreSupport/WebNotificationClient.h: Added. Forwards client methods to manager.
 90 * WebProcess/WebCoreSupport/WebNotificationClient.cpp: Added. Mostly stub implementation for now.
 91 (WebKit::WebNotificationClient::WebNotificationClient):
 92 (WebKit::WebNotificationClient::~WebNotificationClient):
 93 (WebKit::WebNotificationClient::show):
 94 (WebKit::WebNotificationClient::cancel):
 95 (WebKit::WebNotificationClient::notificationObjectDestroyed):
 96 (WebKit::WebNotificationClient::requestPermission):
 97 (WebKit::WebNotificationClient::cancelRequestsForPermission):
 98 (WebKit::WebNotificationClient::checkPermission):
 99
 100 * WebProcess/WebPage/WebPage.h: Added WebNotificationClient as one of its page clients.
 101 * WebProcess/WebPage/WebPage.cpp:
 102 (WebKit::WebPage::WebPage): Set the notification client to WebNotificationClient.
 103 * WebProcess/WebProcess.h: Added WebNotificationManager.
 104 (WebKit::WebProcess::notificationManager):
 105 * WebProcess/WebProcess.cpp:
 106 (WebKit::WebProcess::WebProcess): Initialize notificaton manager.
 107
11082011-11-28 Brent Fulgham <bfulgham@webkit.org>
2109
3110 [WinCairo] Unreviewed build corrections.

Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig

@@ENABLE_MEDIA_STATISTICS = ;
9494ENABLE_METER_TAG = ENABLE_METER_TAG;
9595ENABLE_MHTML = ;
9696ENABLE_MUTATION_OBSERVERS = ;
97 ENABLE_NOTIFICATIONS = ;
 97
 98ENABLE_NOTIFICATIONS = $(ENABLE_NOTIFICATIONS_$(REAL_PLATFORM_NAME));
 99ENABLE_NOTIFICATIONS_macosx = ;
 100
98101ENABLE_PAGE_VISIBILITY_API = ;
99102ENABLE_PROGRESS_TAG = ENABLE_PROGRESS_TAG;
100103ENABLE_QUOTA = ;

Source/WebCore/Configurations/FeatureDefines.xcconfig

@@ENABLE_MEDIA_STATISTICS = ;
9494ENABLE_METER_TAG = ENABLE_METER_TAG;
9595ENABLE_MHTML = ;
9696ENABLE_MUTATION_OBSERVERS = ;
97 ENABLE_NOTIFICATIONS = ;
 97
 98ENABLE_NOTIFICATIONS = $(ENABLE_NOTIFICATIONS_$(REAL_PLATFORM_NAME));
 99ENABLE_NOTIFICATIONS_macosx = ;
 100
98101ENABLE_PAGE_VISIBILITY_API = ;
99102ENABLE_PROGRESS_TAG = ENABLE_PROGRESS_TAG;
100103ENABLE_QUOTA = ;

Source/WebCore/Target.pri

@@SOURCES += \
944944 loader/ThreadableLoader.cpp \
945945 notifications/Notification.cpp \
946946 notifications/NotificationCenter.cpp \
 947 notifications/NotificationController.cpp \
947948 page/animation/AnimationBase.cpp \
948949 page/animation/AnimationController.cpp \
949950 page/animation/CompositeAnimation.cpp \

@@HEADERS += \
19851986 notifications/NotificationCenter.h \
19861987 notifications/NotificationPresenter.h \
19871988 notifications/NotificationContents.h \
 1989 notifications/NotificationController.h \
19881990 page/animation/AnimationBase.h \
19891991 page/animation/AnimationController.h \
19901992 page/animation/CompositeAnimation.h \

Source/WebCore/WebCore.gypi

583583 'loader/SubstituteResource.h',
584584 'loader/TextResourceDecoder.h',
585585 'loader/ThreadableLoader.h',
 586 'loader/ThreadableLoaderClient.h',
586587 'loader/appcache/ApplicationCache.h',
587588 'loader/appcache/ApplicationCacheStorage.h',
588589 'loader/archive/Archive.h',

605606 'loader/icon/IconDatabaseBase.h',
606607 'loader/icon/IconDatabaseClient.h',
607608 'loader/mac/LoaderNSURLExtras.h',
 609 'notifications/NotificationContents.h',
608610 'notifications/NotificationPresenter.h',
609611 'page/Chrome.h',
610612 'page/ChromeClient.h',

29492951 'notifications/NotificationCenter.cpp',
29502952 'notifications/NotificationCenter.h',
29512953 'notifications/NotificationContents.h',
 2954 'notifications/NotificationController.h',
29522955 'page/BarInfo.cpp',
29532956 'page/BarInfo.h',
29542957 'page/Chrome.cpp',

Source/WebCore/WebCore.xcodeproj/project.pbxproj

214214 0B9056190F2578BE0095FF6A /* DocumentThreadableLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0B9056150F2578BE0095FF6A /* DocumentThreadableLoader.cpp */; };
215215 0B90561A0F2578BF0095FF6A /* DocumentThreadableLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 0B9056160F2578BE0095FF6A /* DocumentThreadableLoader.h */; settings = {ATTRIBUTES = (); }; };
216216 0B90561B0F2578BF0095FF6A /* ThreadableLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 0B9056170F2578BE0095FF6A /* ThreadableLoader.h */; settings = {ATTRIBUTES = (Private, ); }; };
217  0B90561C0F2578BF0095FF6A /* ThreadableLoaderClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 0B9056180F2578BE0095FF6A /* ThreadableLoaderClient.h */; settings = {ATTRIBUTES = (); }; };
 217 0B90561C0F2578BF0095FF6A /* ThreadableLoaderClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 0B9056180F2578BE0095FF6A /* ThreadableLoaderClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
218218 0B90561E0F257E930095FF6A /* ThreadableLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0B90561D0F257E930095FF6A /* ThreadableLoader.cpp */; };
219219 0B9056F80F2685F30095FF6A /* WorkerThreadableLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0B9056F60F2685F30095FF6A /* WorkerThreadableLoader.cpp */; };
220220 0B9056F90F2685F30095FF6A /* WorkerThreadableLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 0B9056F70F2685F30095FF6A /* WorkerThreadableLoader.h */; settings = {ATTRIBUTES = (); }; };

802802 31288E730E3005D6003619AE /* WebKitCSSKeyframeRule.h in Headers */ = {isa = PBXBuildFile; fileRef = 31288E6F0E3005D6003619AE /* WebKitCSSKeyframeRule.h */; };
803803 31288E740E3005D6003619AE /* WebKitCSSKeyframesRule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31288E700E3005D6003619AE /* WebKitCSSKeyframesRule.cpp */; };
804804 31288E750E3005D6003619AE /* WebKitCSSKeyframesRule.h in Headers */ = {isa = PBXBuildFile; fileRef = 31288E710E3005D6003619AE /* WebKitCSSKeyframesRule.h */; };
 805 3128CA68147331520074C72A /* NotificationController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3128CA67147331520074C72A /* NotificationController.cpp */; };
 806 3128CA6B147331630074C72A /* NotificationController.h in Headers */ = {isa = PBXBuildFile; fileRef = 3128CA6A147331630074C72A /* NotificationController.h */; };
 807 312C0C41146DC6CC0016C911 /* Notification.h in Headers */ = {isa = PBXBuildFile; fileRef = 333F704F0FB49CA2008E12A6 /* Notification.h */; settings = {ATTRIBUTES = (Private, ); }; };
805808 31313F651443B35F006E2A90 /* FilterEffectRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31313F631443B35E006E2A90 /* FilterEffectRenderer.cpp */; };
806809 31313F661443B35F006E2A90 /* FilterEffectRenderer.h in Headers */ = {isa = PBXBuildFile; fileRef = 31313F641443B35E006E2A90 /* FilterEffectRenderer.h */; };
807810 3138A9E51474434600B0ED12 /* StyleShader.h in Headers */ = {isa = PBXBuildFile; fileRef = 3138A9E41474434600B0ED12 /* StyleShader.h */; };

885888 33503CC71017A1B1003B47E1 /* Notification.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 33503CC61017A1B1003B47E1 /* Notification.cpp */; };
886889 3390CA550FFC157B00921962 /* NotificationCenter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3390CA510FFC157B00921962 /* NotificationCenter.cpp */; };
887890 3390CA560FFC157B00921962 /* NotificationCenter.h in Headers */ = {isa = PBXBuildFile; fileRef = 3390CA520FFC157B00921962 /* NotificationCenter.h */; };
888  3390CA580FFC157B00921962 /* NotificationContents.h in Headers */ = {isa = PBXBuildFile; fileRef = 3390CA540FFC157B00921962 /* NotificationContents.h */; };
 891 3390CA580FFC157B00921962 /* NotificationContents.h in Headers */ = {isa = PBXBuildFile; fileRef = 3390CA540FFC157B00921962 /* NotificationContents.h */; settings = {ATTRIBUTES = (Private, ); }; };
889892 339B5B63131DAA3200F48D02 /* CookiesStrategy.h in Headers */ = {isa = PBXBuildFile; fileRef = 339B5B62131DAA3200F48D02 /* CookiesStrategy.h */; settings = {ATTRIBUTES = (Private, ); }; };
890893 33C0CCD4112C5E6200CE057D /* SecureTextInput.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 33C0CCD2112C5E6200CE057D /* SecureTextInput.cpp */; };
891894 33C0CCD5112C5E6200CE057D /* SecureTextInput.h in Headers */ = {isa = PBXBuildFile; fileRef = 33C0CCD3112C5E6200CE057D /* SecureTextInput.h */; };

79247927 31288E6F0E3005D6003619AE /* WebKitCSSKeyframeRule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKitCSSKeyframeRule.h; sourceTree = "<group>"; };
79257928 31288E700E3005D6003619AE /* WebKitCSSKeyframesRule.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebKitCSSKeyframesRule.cpp; sourceTree = "<group>"; };
79267929 31288E710E3005D6003619AE /* WebKitCSSKeyframesRule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKitCSSKeyframesRule.h; sourceTree = "<group>"; };
 7930 3128CA67147331520074C72A /* NotificationController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NotificationController.cpp; path = notifications/NotificationController.cpp; sourceTree = "<group>"; };
 7931 3128CA6A147331630074C72A /* NotificationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NotificationController.h; path = notifications/NotificationController.h; sourceTree = "<group>"; };
79277932 31313F631443B35E006E2A90 /* FilterEffectRenderer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FilterEffectRenderer.cpp; sourceTree = "<group>"; };
79287933 31313F641443B35E006E2A90 /* FilterEffectRenderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FilterEffectRenderer.h; sourceTree = "<group>"; };
79297934 3138A9E41474434600B0ED12 /* StyleShader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StyleShader.h; path = style/StyleShader.h; sourceTree = "<group>"; };

1475514760 3390CA530FFC157B00921962 /* NotificationCenter.idl */,
1475614761 3390CA540FFC157B00921962 /* NotificationContents.h */,
1475714762 33503C9910179A74003B47E1 /* NotificationPresenter.h */,
 14763 3128CA67147331520074C72A /* NotificationController.cpp */,
 14764 3128CA6A147331630074C72A /* NotificationController.h */,
1475814765 );
1475914766 name = notifications;
1476014767 sourceTree = "<group>";

2472224729 033A6A83147E08A600509B36 /* JSHTMLPropertiesCollection.h in Headers */,
2472324730 7AA51B6E1483B61600AD2752 /* InspectorBaseAgent.h in Headers */,
2472424731 A10DC76B14747BAB005E2471 /* StyleGridData.h in Headers */,
 24732 312C0C41146DC6CC0016C911 /* Notification.h in Headers */,
 24733 3128CA6B147331630074C72A /* NotificationController.h in Headers */,
2472524734 );
2472624735 runOnlyForDeploymentPostprocessing = 0;
2472724736 };

2759527604 033A6A81147E088600509B36 /* JSHTMLPropertiesCollection.cpp in Sources */,
2759627605 7AA51B6F1483B61600AD2752 /* InspectorBaseAgent.cpp in Sources */,
2759727606 A10DC76A14747BAB005E2471 /* StyleGridData.cpp in Sources */,
 27607 3128CA68147331520074C72A /* NotificationController.cpp in Sources */,
2759827608 );
2759927609 runOnlyForDeploymentPostprocessing = 0;
2760027610 };

Source/WebCore/loader/EmptyClients.h

@@public:
187187 virtual void reachedMaxAppCacheSize(int64_t) { }
188188 virtual void reachedApplicationCacheOriginQuota(SecurityOrigin*, int64_t) { }
189189
190 #if ENABLE(NOTIFICATIONS)
191  virtual NotificationPresenter* notificationPresenter() const { return 0; }
192 #endif
193 
194190#if ENABLE(DIRECTORY_UPLOAD)
195191 virtual void enumerateChosenDirectory(FileChooser*) { }
196192#endif

Source/WebCore/notifications/Notification.cpp

11/*
22 * Copyright (C) 2009 Google Inc. All rights reserved.
3  * Copyright (C) 2009 Apple Inc. All rights reserved.
 3 * Copyright (C) 2009, 2011 Apple Inc. All rights reserved.
44 *
55 * Redistribution and use in source and binary forms, with or without
66 * modification, are permitted provided that the following conditions are

4747
4848namespace WebCore {
4949
 50Notification::Notification()
 51 : ActiveDOMObject(0, this)
 52{
 53}
 54
5055Notification::Notification(const KURL& url, ScriptExecutionContext* context, ExceptionCode& ec, PassRefPtr<NotificationCenter> provider)
5156 : ActiveDOMObject(context, this)
5257 , m_isHTML(true)

@@Notification::Notification(const NotificationContents& contents, ScriptExecution
8085 return;
8186 }
8287
83  if (!contents.icon().isEmpty() && !contents.icon().isValid()) {
 88 if (!contents.icon.isEmpty() && !contents.icon.isValid()) {
8489 ec = SYNTAX_ERR;
8590 return;
8691 }

Source/WebCore/notifications/Notification.h

11/*
22 * Copyright (C) 2009 Google Inc. All rights reserved.
3  * Copyright (C) 2009 Apple Inc. All rights reserved.
 3 * Copyright (C) 2009, 2011 Apple Inc. All rights reserved.
44 *
55 * Redistribution and use in source and binary forms, with or without
66 * modification, are permitted provided that the following conditions are

4949#if ENABLE(NOTIFICATIONS)
5050namespace WebCore {
5151
52  class NotificationCenter;
53  class ResourceError;
54  class ResourceResponse;
55  class ScriptExecutionContext;
56  class ThreadableLoader;
 52class NotificationCenter;
 53class ResourceError;
 54class ResourceResponse;
 55class ScriptExecutionContext;
 56class ThreadableLoader;
5757
58  typedef int ExceptionCode;
 58typedef int ExceptionCode;
5959
60  class Notification : public RefCounted<Notification>, public ActiveDOMObject, public ThreadableLoaderClient, public EventTarget {
61  WTF_MAKE_FAST_ALLOCATED;
62  public:
63  static PassRefPtr<Notification> create(const KURL& url, ScriptExecutionContext* context, ExceptionCode& ec, PassRefPtr<NotificationCenter> provider);
64  static PassRefPtr<Notification> create(const NotificationContents& contents, ScriptExecutionContext* context, ExceptionCode& ec, PassRefPtr<NotificationCenter> provider);
65 
66  virtual ~Notification();
 60class Notification : public RefCounted<Notification>, public ActiveDOMObject, public ThreadableLoaderClient, public EventTarget {
 61 WTF_MAKE_FAST_ALLOCATED;
 62public:
 63 Notification();
 64 static PassRefPtr<Notification> create(const KURL&, ScriptExecutionContext*, ExceptionCode&, PassRefPtr<NotificationCenter> provider);
 65 static PassRefPtr<Notification> create(const NotificationContents&, ScriptExecutionContext*, ExceptionCode&, PassRefPtr<NotificationCenter> provider);
 66
 67 virtual ~Notification();
 68
 69 void show();
 70 void cancel();
6771
68  void show();
69  void cancel();
 72 bool isHTML() const { return m_isHTML; }
 73 void setHTML(bool isHTML) { m_isHTML = isHTML; }
 74
 75 KURL url() const { return m_notificationURL; }
 76 void setURL(KURL url) { m_notificationURL = url; }
 77
 78 KURL iconURL() { return m_contents.icon; }
7079
71  bool isHTML() { return m_isHTML; }
72  KURL url() { return m_notificationURL; }
73  KURL iconURL() { return m_contents.icon(); }
74  NotificationContents& contents() { return m_contents; }
 80 const NotificationContents& contents() const { return m_contents; }
 81 NotificationContents& contents() { return m_contents; }
7582
76  String dir() const { return m_direction; }
77  void setDir(const String& dir) { m_direction = dir; }
78  String replaceId() const { return m_replaceId; }
79  void setReplaceId(const String& replaceId) { m_replaceId = replaceId; }
 83 String dir() const { return m_direction; }
 84 void setDir(const String& dir) { m_direction = dir; }
 85
 86 String replaceId() const { return m_replaceId; }
 87 void setReplaceId(const String& replaceId) { m_replaceId = replaceId; }
8088
81  TextDirection direction() const { return dir() == "rtl" ? RTL : LTR; }
 89 TextDirection direction() const { return dir() == "rtl" ? RTL : LTR; }
8290
83  DEFINE_ATTRIBUTE_EVENT_LISTENER(display);
84  DEFINE_ATTRIBUTE_EVENT_LISTENER(error);
85  DEFINE_ATTRIBUTE_EVENT_LISTENER(close);
86  DEFINE_ATTRIBUTE_EVENT_LISTENER(click);
 91 DEFINE_ATTRIBUTE_EVENT_LISTENER(display);
 92 DEFINE_ATTRIBUTE_EVENT_LISTENER(error);
 93 DEFINE_ATTRIBUTE_EVENT_LISTENER(close);
 94 DEFINE_ATTRIBUTE_EVENT_LISTENER(click);
8795
88  using RefCounted<Notification>::ref;
89  using RefCounted<Notification>::deref;
 96 using RefCounted<Notification>::ref;
 97 using RefCounted<Notification>::deref;
9098
91  // EventTarget interface
92  virtual const AtomicString& interfaceName() const;
93  virtual ScriptExecutionContext* scriptExecutionContext() const { return ActiveDOMObject::scriptExecutionContext(); }
 99 // EventTarget interface
 100 virtual const AtomicString& interfaceName() const;
 101 virtual ScriptExecutionContext* scriptExecutionContext() const { return ActiveDOMObject::scriptExecutionContext(); }
94102
95  // ActiveDOMObject interface
96  virtual void contextDestroyed();
 103 // ActiveDOMObject interface
 104 virtual void contextDestroyed();
97105
98  void stopLoading();
 106 void stopLoading();
99107
100  SharedBuffer* iconData() { return m_iconData.get(); }
101  void releaseIconData() { m_iconData = 0; }
 108 SharedBuffer* iconData() { return m_iconData.get(); }
 109 void releaseIconData() { m_iconData = 0; }
102110
103  // Deprecated. Use functions from NotificationCenter.
104  void detachPresenter() { }
 111 // Deprecated. Use functions from NotificationCenter.
 112 void detachPresenter() { }
105113
106  virtual void didReceiveResponse(unsigned long, const ResourceResponse&);
107  virtual void didReceiveData(const char* data, int dataLength);
108  virtual void didFinishLoading(unsigned long identifier, double finishTime);
109  virtual void didFail(const ResourceError&);
110  virtual void didFailRedirectCheck();
 114 virtual void didReceiveResponse(unsigned long, const ResourceResponse&);
 115 virtual void didReceiveData(const char* data, int dataLength);
 116 virtual void didFinishLoading(unsigned long identifier, double finishTime);
 117 virtual void didFail(const ResourceError&);
 118 virtual void didFailRedirectCheck();
111119
112  private:
113  Notification(const KURL&, ScriptExecutionContext*, ExceptionCode&, PassRefPtr<NotificationCenter>);
114  Notification(const NotificationContents&, ScriptExecutionContext*, ExceptionCode&, PassRefPtr<NotificationCenter>);
 120private:
 121 Notification(const KURL&, ScriptExecutionContext*, ExceptionCode&, PassRefPtr<NotificationCenter>);
 122 Notification(const NotificationContents&, ScriptExecutionContext*, ExceptionCode&, PassRefPtr<NotificationCenter>);
115123
116  // EventTarget interface
117  virtual void refEventTarget() { ref(); }
118  virtual void derefEventTarget() { deref(); }
119  virtual EventTargetData* eventTargetData();
120  virtual EventTargetData* ensureEventTargetData();
 124 // EventTarget interface
 125 virtual void refEventTarget() { ref(); }
 126 virtual void derefEventTarget() { deref(); }
 127 virtual EventTargetData* eventTargetData();
 128 virtual EventTargetData* ensureEventTargetData();
121129
122  void startLoading();
123  void finishLoading();
 130 void startLoading();
 131 void finishLoading();
124132
125  bool m_isHTML;
126  KURL m_notificationURL;
127  NotificationContents m_contents;
 133 bool m_isHTML;
 134 KURL m_notificationURL;
 135 NotificationContents m_contents;
128136
129  String m_direction;
130  String m_replaceId;
 137 String m_direction;
 138 String m_replaceId;
131139
132  enum NotificationState {
133  Idle = 0,
134  Loading = 1,
135  Showing = 2,
136  Cancelled = 3
137  };
 140 enum NotificationState {
 141 Idle = 0,
 142 Loading = 1,
 143 Showing = 2,
 144 Cancelled = 3
 145 };
138146
139  NotificationState m_state;
 147 NotificationState m_state;
140148
141  RefPtr<NotificationCenter> m_notificationCenter;
142 
143  EventTargetData m_eventTargetData;
 149 RefPtr<NotificationCenter> m_notificationCenter;
 150
 151 EventTargetData m_eventTargetData;
144152
145  RefPtr<ThreadableLoader> m_loader;
146  RefPtr<SharedBuffer> m_iconData;
147  };
 153 RefPtr<ThreadableLoader> m_loader;
 154 RefPtr<SharedBuffer> m_iconData;
 155};
148156
149157} // namespace WebCore
150158

Source/WebCore/notifications/NotificationCenter.h

11/*
22 * Copyright (C) 2009 Google Inc. All rights reserved.
 3 * Copyright (C) 2011 Apple Inc. All rights reserved.
34 *
45 * Redistribution and use in source and binary forms, with or without
56 * modification, are permitted provided that the following conditions are

4344#if ENABLE(NOTIFICATIONS)
4445
4546namespace WebCore {
46 
47  class NotificationPresenter;
48  class VoidCallback;
49 
50  class NotificationCenter : public RefCounted<NotificationCenter>, public ActiveDOMObject {
51  public:
52  static PassRefPtr<NotificationCenter> create(ScriptExecutionContext* context, NotificationPresenter* presenter) { return adoptRef(new NotificationCenter(context, presenter)); }
53 
54  PassRefPtr<Notification> createHTMLNotification(const String& URI, ExceptionCode& ec)
55  {
56  if (!presenter()) {
57  ec = INVALID_STATE_ERR;
58  return 0;
59  }
60  if (URI.isEmpty()) {
61  ec = SYNTAX_ERR;
62  return 0;
63  }
64  return Notification::create(scriptExecutionContext()->completeURL(URI), scriptExecutionContext(), ec, this);
 47
 48class NotificationPresenter;
 49class VoidCallback;
 50
 51class NotificationCenter : public RefCounted<NotificationCenter>, public ActiveDOMObject {
 52public:
 53 static PassRefPtr<NotificationCenter> create(ScriptExecutionContext* context, NotificationPresenter* presenter) { return adoptRef(new NotificationCenter(context, presenter)); }
 54
 55 PassRefPtr<Notification> createHTMLNotification(const String& URI, ExceptionCode& ec)
 56 {
 57 if (!presenter()) {
 58 ec = INVALID_STATE_ERR;
 59 return 0;
 60 }
 61 if (URI.isEmpty()) {
 62 ec = SYNTAX_ERR;
 63 return 0;
6564 }
 65 return Notification::create(scriptExecutionContext()->completeURL(URI), scriptExecutionContext(), ec, this);
 66 }
6667
67  PassRefPtr<Notification> createNotification(const String& iconURI, const String& title, const String& body, ExceptionCode& ec)
68  {
69  if (!presenter()) {
70  ec = INVALID_STATE_ERR;
71  return 0;
72  }
73  NotificationContents contents(iconURI.isEmpty() ? KURL() : scriptExecutionContext()->completeURL(iconURI), title, body);
74  return Notification::create(contents, scriptExecutionContext(), ec, this);
 68 PassRefPtr<Notification> createNotification(const String& iconURI, const String& title, const String& body, ExceptionCode& ec)
 69 {
 70 if (!presenter()) {
 71 ec = INVALID_STATE_ERR;
 72 return 0;
7573 }
 74 NotificationContents contents(iconURI.isEmpty() ? KURL() : scriptExecutionContext()->completeURL(iconURI), title, body);
 75 return Notification::create(contents, scriptExecutionContext(), ec, this);
 76 }
7677
77  NotificationPresenter* presenter() const { return m_notificationPresenter; }
 78 NotificationPresenter* presenter() const { return m_notificationPresenter; }
7879
79  int checkPermission();
80  void requestPermission(PassRefPtr<VoidCallback> callback);
 80 int checkPermission();
 81 void requestPermission(PassRefPtr<VoidCallback>);
8182
82  void disconnectFrame();
 83 void disconnectFrame();
8384
84  private:
85  NotificationCenter(ScriptExecutionContext*, NotificationPresenter*);
 85private:
 86 NotificationCenter(ScriptExecutionContext*, NotificationPresenter*);
8687
87  NotificationPresenter* m_notificationPresenter;
88  };
 88 NotificationPresenter* m_notificationPresenter;
 89};
8990
9091} // namespace WebCore
9192

Source/WebCore/notifications/NotificationContents.h

11/*
22 * Copyright (C) 2009 Google Inc. All rights reserved.
 3 * Copyright (C) 2011 Apple Inc. All rights reserved.
34 *
45 * Redistribution and use in source and binary forms, with or without
56 * modification, are permitted provided that the following conditions are

3334
3435#if ENABLE(NOTIFICATIONS)
3536
 37#include "KURL.h"
 38#include <wtf/text/WTFString.h>
 39
3640namespace WebCore {
3741
38  class NotificationContents {
39  public:
40  NotificationContents() {}
41  NotificationContents(const KURL& iconUrl, const String& title, const String& body)
42  : m_icon(iconUrl)
43  , m_title(title)
44  , m_body(body) {}
45 
46  KURL icon() const { return m_icon; }
47  String title() const { return m_title; }
48  String body() const { return m_body; }
49 
50  private:
51  KURL m_icon;
52  String m_title;
53  String m_body;
54  };
 42struct NotificationContents {
 43public:
 44 NotificationContents() { }
 45 NotificationContents(const KURL& iconUrl, const String& notificationTitle, const String& notificationBody)
 46 : icon(iconUrl)
 47 , title(notificationTitle)
 48 , body(notificationBody)
 49 { }
 50
 51 KURL icon;
 52 String title;
 53 String body;
 54};
5555
5656} // namespace WebCore
5757

Source/WebCore/notifications/NotificationController.cpp

 1/*
 2 * Copyright (C) 2011 Apple Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 * 1. Redistributions of source code must retain the above copyright
 8 * notice, this list of conditions and the following disclaimer.
 9 * 2. Redistributions in binary form must reproduce the above copyright
 10 * notice, this list of conditions and the following disclaimer in the
 11 * documentation and/or other materials provided with the distribution.
 12 *
 13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
 14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
 17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#include "config.h"
 27#include "NotificationController.h"
 28
 29#if ENABLE(NOTIFICATIONS)
 30
 31#include "NotificationPresenter.h"
 32
 33namespace WebCore {
 34
 35NotificationController::NotificationController(Page* page, NotificationPresenter* client)
 36 : m_page(page)
 37 , m_client(client)
 38{
 39}
 40
 41NotificationController::~NotificationController()
 42{
 43}
 44
 45} // namespace WebCore
 46
 47#endif // ENABLE(NOTIFICATIONS)

Source/WebCore/notifications/NotificationController.h

 1/*
 2* Copyright (C) 2011 Apple Inc. All rights reserved.
 3*
 4* Redistribution and use in source and binary forms, with or without
 5* modification, are permitted provided that the following conditions
 6* are met:
 7* 1. Redistributions of source code must retain the above copyright
 8* notice, this list of conditions and the following disclaimer.
 9* 2. Redistributions in binary form must reproduce the above copyright
 10* notice, this list of conditions and the following disclaimer in the
 11* documentation and/or other materials provided with the distribution.
 12*
 13* THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
 14* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 15* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 16* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
 17* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 18* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 19* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 20* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
 21* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 22* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 23* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 24*/
 25
 26#ifndef NotificationController_h
 27#define NotificationController_h
 28
 29#if ENABLE(NOTIFICATIONS)
 30
 31#include <wtf/Noncopyable.h>
 32
 33namespace WebCore {
 34
 35class NotificationPresenter;
 36class Page;
 37
 38class NotificationController {
 39 WTF_MAKE_NONCOPYABLE(NotificationController);
 40public:
 41 NotificationController(Page*, NotificationPresenter*);
 42 ~NotificationController();
 43
 44 NotificationPresenter* client() { return m_client; }
 45
 46private:
 47 Page* m_page;
 48 NotificationPresenter* m_client;
 49};
 50
 51} // namespace WebCore
 52
 53#endif // ENABLE(NOTIFICATIONS)
 54
 55#endif // NotificationController_h

Source/WebCore/notifications/NotificationPresenter.h

11/*
22 * Copyright (C) 2009 Google Inc. All rights reserved.
 3 * Copyright (C) 2011 Apple Inc. All rights reserved.
34 *
45 * Redistribution and use in source and binary forms, with or without
56 * modification, are permitted provided that the following conditions are

3435#include <wtf/PassRefPtr.h>
3536#include "VoidCallback.h"
3637
37 #if ENABLE(NOTIFICATIONS)
38 
3938namespace WebCore {
4039
41  class Document;
42  class Notification;
43  class KURL;
44  class ScriptExecutionContext;
 40class Document;
 41class Notification;
 42class KURL;
 43class ScriptExecutionContext;
4544
46  class NotificationPresenter {
 45class NotificationPresenter {
4746
48  public:
49  enum Permission {
50  PermissionAllowed, // User has allowed notifications
51  PermissionNotAllowed, // User has not yet allowed
52  PermissionDenied // User has explicitly denied permission
53  };
 47public:
 48 enum Permission {
 49 PermissionAllowed, // User has allowed notifications
 50 PermissionNotAllowed, // User has not yet allowed
 51 PermissionDenied // User has explicitly denied permission
 52 };
5453
55  virtual ~NotificationPresenter() {}
 54 // Requests that a notification be shown.
 55 virtual bool show(Notification*) = 0;
5656
57  // Requests that a notification be shown.
58  virtual bool show(Notification*) = 0;
 57 // Requests that a notification that has already been shown be canceled.
 58 virtual void cancel(Notification*) = 0;
5959
60  // Requests that a notification that has already been shown be canceled.
61  virtual void cancel(Notification*) = 0;
 60 // Informs the presenter that a Notification object has been destroyed
 61 // (such as by a page transition). The presenter may continue showing
 62 // the notification, but must not attempt to call the event handlers.
 63 virtual void notificationObjectDestroyed(Notification*) = 0;
6264
63  // Informs the presenter that a Notification object has been destroyed
64  // (such as by a page transition). The presenter may continue showing
65  // the notification, but must not attempt to call the event handlers.
66  virtual void notificationObjectDestroyed(Notification*) = 0;
 65 // Requests user permission to show desktop notifications from a particular
 66 // script context. The callback parameter should be run when the user has
 67 // made a decision.
 68 virtual void requestPermission(ScriptExecutionContext*, PassRefPtr<VoidCallback>) = 0;
6769
68  // Requests user permission to show desktop notifications from a particular
69  // script context. The callback parameter should be run when the user has
70  // made a decision.
71  virtual void requestPermission(ScriptExecutionContext*, PassRefPtr<VoidCallback>) = 0;
 70 // Cancel all outstanding requests for the ScriptExecutionContext
 71 virtual void cancelRequestsForPermission(ScriptExecutionContext*) = 0;
7272
73  // Cancel all outstanding requests for the ScriptExecutionContext
74  virtual void cancelRequestsForPermission(ScriptExecutionContext*) = 0;
 73 // Checks the current level of permission.
 74 virtual Permission checkPermission(ScriptExecutionContext*) = 0;
7575
76  // Checks the current level of permission.
77  virtual Permission checkPermission(ScriptExecutionContext*) = 0;
78  };
 76protected:
 77 virtual ~NotificationPresenter() { }
 78};
7979
8080} // namespace WebCore
8181
82 #endif // ENABLE(NOTIFICATIONS)
83 
8482#endif // NotificationPresenter_h

Source/WebCore/page/Chrome.cpp

@@void Chrome::scheduleAnimation()
508508}
509509#endif
510510
511 #if ENABLE(NOTIFICATIONS)
512 NotificationPresenter* Chrome::notificationPresenter() const
513 {
514  return m_client->notificationPresenter();
515 }
516 #endif
517 
518511// --------
519512
520513#if ENABLE(DASHBOARD_SUPPORT)

Source/WebCore/page/Chrome.h

@@namespace WebCore {
5151 class Page;
5252 class PopupMenu;
5353 class PopupMenuClient;
54 #if ENABLE(NOTIFICATIONS)
55  class NotificationPresenter;
56 #endif
5754 class SearchPopupMenu;
5855
5956 struct FrameLoadRequest;

@@namespace WebCore {
175172 void focusNSView(NSView*);
176173#endif
177174
178 #if ENABLE(NOTIFICATIONS)
179  NotificationPresenter* notificationPresenter() const;
180 #endif
181 
182175 bool selectItemWritingDirectionIsNatural();
183176 bool selectItemAlignmentFollowsMenuWritingDirection();
184177 PassRefPtr<PopupMenu> createPopupMenu(PopupMenuClient*) const;

Source/WebCore/page/ChromeClient.h

@@namespace WebCore {
7575 class ColorChooser;
7676#endif
7777
78 #if ENABLE(NOTIFICATIONS)
79  class NotificationPresenter;
80 #endif
81 
8278 class ChromeClient {
8379 public:
8480 virtual void chromeDestroyed() = 0;

@@namespace WebCore {
204200 virtual void dashboardRegionsChanged();
205201#endif
206202
207 #if ENABLE(NOTIFICATIONS)
208  virtual NotificationPresenter* notificationPresenter() const = 0;
209 #endif
210 
211203 virtual void populateVisitedLinks();
212204
213205 virtual FloatRect customHighlightRect(Node*, const AtomicString& type, const FloatRect& lineRect);

Source/WebCore/page/DOMWindow.cpp

7474#include "MessageEvent.h"
7575#include "Navigator.h"
7676#include "NotificationCenter.h"
 77#include "NotificationController.h"
7778#include "Page.h"
7879#include "PageGroup.h"
7980#include "PageTransitionEvent.h"

@@NotificationCenter* DOMWindow::webkitNotifications() const
750751 if (!page)
751752 return 0;
752753
753  NotificationPresenter* provider = page->chrome()->notificationPresenter();
 754 NotificationPresenter* provider = page->notificationController()->client();
754755 if (provider)
755756 m_notifications = NotificationCenter::create(document, provider);
756757

Source/WebCore/page/Page.cpp

5353#include "MediaCanStartListener.h"
5454#include "Navigator.h"
5555#include "NetworkStateNotifier.h"
 56#include "NotificationController.h"
 57#include "NotificationPresenter.h"
5658#include "PageGroup.h"
5759#include "PluginData.h"
5860#include "PluginView.h"

@@Page::Page(PageClients& pageClients)
137139 , m_deviceMotionController(RuntimeEnabledFeatures::deviceMotionEnabled() ? adoptPtr(new DeviceMotionController(pageClients.deviceMotionClient)) : nullptr)
138140 , m_deviceOrientationController(RuntimeEnabledFeatures::deviceOrientationEnabled() ? adoptPtr(new DeviceOrientationController(this, pageClients.deviceOrientationClient)) : nullptr)
139141#endif
 142#if ENABLE(NOTIFICATIONS)
 143 , m_notificationController(adoptPtr(new NotificationController(this, pageClients.notificationClient)))
 144#endif
140145#if ENABLE(INPUT_SPEECH)
141146 , m_speechInputClient(pageClients.speechInputClient)
142147#endif

@@Page::PageClients::PageClients()
10631068 , deviceMotionClient(0)
10641069 , deviceOrientationClient(0)
10651070 , speechInputClient(0)
 1071 , notificationClient(0)
10661072 , userMediaClient(0)
10671073{
10681074}

Source/WebCore/page/Page.h

@@namespace WebCore {
7272 class InspectorController;
7373 class MediaCanStartListener;
7474 class Node;
 75 class NotificationController;
 76 class NotificationPresenter;
7577 class PageGroup;
7678 class PluginData;
7779 class ProgressTracker;

@@namespace WebCore {
117119 DeviceOrientationClient* deviceOrientationClient;
118120 RefPtr<BackForwardList> backForwardClient;
119121 SpeechInputClient* speechInputClient;
 122 NotificationPresenter* notificationClient;
120123 UserMediaClient* userMediaClient;
121124 };
122125

@@namespace WebCore {
183186 DeviceMotionController* deviceMotionController() const { return m_deviceMotionController.get(); }
184187 DeviceOrientationController* deviceOrientationController() const { return m_deviceOrientationController.get(); }
185188#endif
 189#if ENABLE(NOTIFICATIONS)
 190 NotificationController* notificationController() const { return m_notificationController.get(); }
 191#endif
186192#if ENABLE(INPUT_SPEECH)
187193 SpeechInput* speechInput();
188194#endif

@@namespace WebCore {
365371 OwnPtr<DeviceMotionController> m_deviceMotionController;
366372 OwnPtr<DeviceOrientationController> m_deviceOrientationController;
367373#endif
 374#if ENABLE(NOTIFICATIONS)
 375 OwnPtr<NotificationController> m_notificationController;
 376#endif
368377#if ENABLE(INPUT_SPEECH)
369378 SpeechInputClient* m_speechInputClient;
370379 OwnPtr<SpeechInput> m_speechInput;

Source/WebKit/WebKit.xcodeproj/project.pbxproj

7474 226E9E6B09D0AA8200F3A2BC /* WebNetscapeDeprecatedFunctions.c in Sources */ = {isa = PBXBuildFile; fileRef = 226E9E6909D0AA8200F3A2BC /* WebNetscapeDeprecatedFunctions.c */; settings = {COMPILER_FLAGS = "-Wno-deprecated-declarations"; }; };
7575 22F219CC08D236730030E078 /* WebBackForwardListPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 22F219CB08D236730030E078 /* WebBackForwardListPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
7676 29AEF960134C76FB00FE5096 /* OutlookQuirksUserScript.js in Resources */ = {isa = PBXBuildFile; fileRef = 29AEF95D134C755400FE5096 /* OutlookQuirksUserScript.js */; };
 77 31C11A6E1476552E0049A4CC /* WebNotificationClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 31C11A6C1476552E0049A4CC /* WebNotificationClient.h */; };
 78 31C11A6F1476552E0049A4CC /* WebNotificationClient.mm in Sources */ = {isa = PBXBuildFile; fileRef = 31C11A6D1476552E0049A4CC /* WebNotificationClient.mm */; };
7779 37B6FB4E1063530C000FDB3B /* WebPDFDocumentExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = 37B6FB4C1063530C000FDB3B /* WebPDFDocumentExtras.h */; };
7880 37B6FB4F1063530C000FDB3B /* WebPDFDocumentExtras.mm in Sources */ = {isa = PBXBuildFile; fileRef = 37B6FB4D1063530C000FDB3B /* WebPDFDocumentExtras.mm */; };
7981 37D1DCA81065928C0068F7EF /* WebJSPDFDoc.h in Headers */ = {isa = PBXBuildFile; fileRef = 37D1DCA61065928C0068F7EF /* WebJSPDFDoc.h */; };

454456 2D36FD5E03F78F9E00A80166 /* WebFormDelegatePrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebFormDelegatePrivate.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
455457 2D81DAB203EB0B2D00A80166 /* WebFormDelegate.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebFormDelegate.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
456458 2D81DAB303EB0B2D00A80166 /* WebFormDelegate.m */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebFormDelegate.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
 459 31C11A6C1476552E0049A4CC /* WebNotificationClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebNotificationClient.h; sourceTree = "<group>"; };
 460 31C11A6D1476552E0049A4CC /* WebNotificationClient.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebNotificationClient.mm; sourceTree = "<group>"; };
457461 35081D9202B6D4D80ACA2ACA /* WebHTMLRepresentation.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 4; indentWidth = 4; path = WebHTMLRepresentation.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
458462 35081D9302B6D4D80ACA2ACA /* WebHTMLRepresentation.mm */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebHTMLRepresentation.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
459463 35081D9402B6D4D80ACA2ACA /* WebHTMLView.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebHTMLView.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };

13111315 9345D4EB0365C5B2008635CE /* WebJavaScriptTextInputPanel.m */,
13121316 84723BE3056D719E0044BFEA /* WebKeyGenerator.h */,
13131317 84723BE4056D719E0044BFEA /* WebKeyGenerator.mm */,
 1318 31C11A6C1476552E0049A4CC /* WebNotificationClient.h */,
 1319 31C11A6D1476552E0049A4CC /* WebNotificationClient.mm */,
13141320 A58A5797143E727000125F50 /* WebOpenPanelResultListener.h */,
13151321 A58A5798143E727000125F50 /* WebOpenPanelResultListener.mm */,
13161322 1AA879B411CBE9BF003C664F /* WebPlatformStrategies.h */,

16251631 B82958D3132707D0000D0E79 /* CorrectionPanel.h in Headers */,
16261632 A5687BDA135B791A0074CBCB /* WebNodeHighlighter.h in Headers */,
16271633 A58A5799143E727000125F50 /* WebOpenPanelResultListener.h in Headers */,
 1634 31C11A6E1476552E0049A4CC /* WebNotificationClient.h in Headers */,
16281635 );
16291636 runOnlyForDeploymentPostprocessing = 0;
16301637 };

20102017 B82958D4132707D0000D0E79 /* CorrectionPanel.mm in Sources */,
20112018 A5687BDB135B791A0074CBCB /* WebNodeHighlighter.mm in Sources */,
20122019 A58A579A143E727000125F50 /* WebOpenPanelResultListener.mm in Sources */,
 2020 31C11A6F1476552E0049A4CC /* WebNotificationClient.mm in Sources */,
20132021 );
20142022 runOnlyForDeploymentPostprocessing = 0;
20152023 };

Source/WebKit/chromium/src/ChromeClientImpl.cpp

5454#include "IntRect.h"
5555#include "NavigationAction.h"
5656#include "Node.h"
57 #include "NotificationPresenterImpl.h"
5857#include "Page.h"
5958#include "PlatformSupport.h"
6059#include "PopupContainer.h"

@@void ChromeClientImpl::postAccessibilityNotification(AccessibilityObject* obj, A
785784 m_webView->client()->postAccessibilityNotification(WebAccessibilityObject(obj), toWebAccessibilityNotification(notification));
786785}
787786
788 #if ENABLE(NOTIFICATIONS)
789 NotificationPresenter* ChromeClientImpl::notificationPresenter() const
790 {
791  return m_webView->notificationPresenterImpl();
792 }
793 #endif
794 
795787bool ChromeClientImpl::paintCustomOverhangArea(GraphicsContext* context, const IntRect& horizontalOverhangArea, const IntRect& verticalOverhangArea, const IntRect& dirtyRect)
796788{
797789 Frame* frame = m_webView->mainFrameImpl()->frame();

Source/WebKit/chromium/src/ChromeClientImpl.h

@@public:
130130 WebCore::Frame*, const WTF::String& databaseName);
131131 virtual void reachedMaxAppCacheSize(int64_t spaceNeeded);
132132 virtual void reachedApplicationCacheOriginQuota(WebCore::SecurityOrigin*, int64_t totalSpaceNeeded);
133 #if ENABLE(NOTIFICATIONS)
134  virtual WebCore::NotificationPresenter* notificationPresenter() const;
135 #endif
136133 virtual bool paintCustomOverhangArea(WebCore::GraphicsContext*, const WebCore::IntRect&, const WebCore::IntRect&, const WebCore::IntRect&);
137134 virtual void requestGeolocationPermissionForFrame(WebCore::Frame*, WebCore::Geolocation*);
138135 virtual void cancelGeolocationPermissionRequestForFrame(WebCore::Frame*, WebCore::Geolocation*);

Source/WebKit/chromium/src/WebNotification.cpp

@@WebURL WebNotification::iconURL() const
8888WebString WebNotification::title() const
8989{
9090 ASSERT(!isHTML());
91  return m_private->contents().title();
 91 return m_private->contents().title;
9292}
9393
9494WebString WebNotification::body() const
9595{
9696 ASSERT(!isHTML());
97  return m_private->contents().body();
 97 return m_private->contents().body;
9898}
9999
100100WebTextDirection WebNotification::direction() const

Source/WebKit/chromium/src/WebViewImpl.cpp

@@WebViewImpl::WebViewImpl(WebViewClient* client)
394394#endif
395395 pageClients.deviceOrientationClient = m_deviceOrientationClientProxy.get();
396396 pageClients.geolocationClient = m_geolocationClientProxy.get();
 397#if ENABLE(NOTIFICATIONS)
 398 pageClients.notificationClient = &m_notificationPresenter;
 399#endif
397400 pageClients.backForwardClient = BackForwardListChromium::create(this);
398401#if ENABLE(MEDIA_STREAM)
399402 pageClients.userMediaClient = &m_userMediaClientImpl;

Source/WebKit/mac/Configurations/FeatureDefines.xcconfig

@@ENABLE_MEDIA_STATISTICS = ;
9494ENABLE_METER_TAG = ENABLE_METER_TAG;
9595ENABLE_MHTML = ;
9696ENABLE_MUTATION_OBSERVERS = ;
97 ENABLE_NOTIFICATIONS = ;
 97
 98ENABLE_NOTIFICATIONS = $(ENABLE_NOTIFICATIONS_$(REAL_PLATFORM_NAME));
 99ENABLE_NOTIFICATIONS_macosx = ;
 100
98101ENABLE_PAGE_VISIBILITY_API = ;
99102ENABLE_PROGRESS_TAG = ENABLE_PROGRESS_TAG;
100103ENABLE_QUOTA = ;

Source/WebKit/mac/WebCoreSupport/WebNotificationClient.h

 1/*
 2 * Copyright (C) 2011 Apple Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 * 1. Redistributions of source code must retain the above copyright
 8 * notice, this list of conditions and the following disclaimer.
 9 * 2. Redistributions in binary form must reproduce the above copyright
 10 * notice, this list of conditions and the following disclaimer in the
 11 * documentation and/or other materials provided with the distribution.
 12 *
 13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
 14 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 15 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
 17 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 18 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 19 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 20 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 21 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 23 * THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#import <WebCore/NotificationPresenter.h>
 27
 28namespace WebCore {
 29class ScriptExecutionContext;
 30class VoidCallback;
 31}
 32
 33@class WebView;
 34
 35class WebNotificationClient : public WebCore::NotificationPresenter {
 36public:
 37 WebNotificationClient(WebView *);
 38 WebView *webView() { return m_webView; }
 39
 40private:
 41 virtual bool show(WebCore::Notification*) OVERRIDE;
 42 virtual void cancel(WebCore::Notification*) OVERRIDE;
 43 virtual void notificationObjectDestroyed(WebCore::Notification*) OVERRIDE;
 44 virtual void requestPermission(WebCore::ScriptExecutionContext*, PassRefPtr<WebCore::VoidCallback>) OVERRIDE;
 45 virtual void cancelRequestsForPermission(WebCore::ScriptExecutionContext*) OVERRIDE;
 46 virtual WebCore::NotificationPresenter::Permission checkPermission(WebCore::ScriptExecutionContext*) OVERRIDE;
 47
 48 WebView *m_webView;
 49};

Source/WebKit/mac/WebCoreSupport/WebNotificationClient.mm

 1/*
 2 * Copyright (C) 2011 Apple Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 * 1. Redistributions of source code must retain the above copyright
 8 * notice, this list of conditions and the following disclaimer.
 9 * 2. Redistributions in binary form must reproduce the above copyright
 10 * notice, this list of conditions and the following disclaimer in the
 11 * documentation and/or other materials provided with the distribution.
 12 *
 13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
 14 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 15 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
 17 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 18 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 19 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 20 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 21 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 23 * THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#import "WebNotificationClient.h"
 27
 28#import <WebCore/NotImplemented.h>
 29#import <WebCore/Notification.h>
 30
 31using namespace WebCore;
 32
 33WebNotificationClient::WebNotificationClient(WebView *webView)
 34 : m_webView(webView)
 35{
 36}
 37
 38bool WebNotificationClient::show(Notification*)
 39{
 40 notImplemented();
 41 return false;
 42}
 43
 44void WebNotificationClient::cancel(Notification*)
 45{
 46 notImplemented();
 47}
 48
 49void WebNotificationClient::notificationObjectDestroyed(WebCore::Notification*)
 50{
 51 notImplemented();
 52}
 53
 54void WebNotificationClient::requestPermission(WebCore::ScriptExecutionContext*, PassRefPtr<WebCore::VoidCallback>)
 55{
 56 notImplemented();
 57}
 58
 59void WebNotificationClient::cancelRequestsForPermission(WebCore::ScriptExecutionContext*)
 60{
 61 notImplemented();
 62}
 63
 64NotificationPresenter::Permission WebNotificationClient::checkPermission(WebCore::ScriptExecutionContext*)
 65{
 66 notImplemented();
 67 return NotificationPresenter::PermissionDenied;
 68}

Source/WebKit/mac/WebView/WebView.mm

8787#import "WebNSURLRequestExtras.h"
8888#import "WebNSViewExtras.h"
8989#import "WebNodeHighlight.h"
 90#import "WebNotificationClient.h"
9091#import "WebPDFView.h"
9192#import "WebPanelAuthenticationHandler.h"
9293#import "WebPlatformStrategies.h"

@@static NSString *leakOutlookQuirksUserScriptContents()
739740#if ENABLE(CLIENT_BASED_GEOLOCATION)
740741 pageClients.geolocationClient = new WebGeolocationClient(self);
741742#endif
 743#if ENABLE(NOTIFICATIONS)
 744 pageClients.notificationClient = new WebNotificationClient(self);
 745#endif
742746#if ENABLE(DEVICE_ORIENTATION)
743747 pageClients.deviceOrientationClient = new WebDeviceOrientationClient(self);
744748#endif

Source/WebKit/qt/Api/qwebpage.cpp

@@QWebPagePrivate::QWebPagePrivate(QWebPage *qq)
346346 else
347347 pageClients.geolocationClient = new GeolocationClientQt(q);
348348#endif
 349#if ENABLE(NOTIFICATIONS)
 350 pageClients.notificationClient = NotificationPresenterClientQt::notificationPresenter();
 351#endif
349352 page = new Page(pageClients);
350353
351354 // By default each page is put into their own unique page group, which affects popup windows

Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp

4949#include "NavigationAction.h"
5050#include "NetworkingContext.h"
5151#include "NotImplemented.h"
52 #include "NotificationPresenterClientQt.h"
5352#include "Page.h"
5453#include "PageClientQt.h"
5554#include "PopupMenuQt.h"

@@void ChromeClientQt::reachedApplicationCacheOriginQuota(SecurityOrigin* origin,
557556 emit m_webPage->applicationCacheQuotaExceeded(securityOrigin, defaultOriginQuota, static_cast<quint64>(totalSpaceNeeded));
558557}
559558
560 #if ENABLE(NOTIFICATIONS)
561 NotificationPresenter* ChromeClientQt::notificationPresenter() const
562 {
563  return NotificationPresenterClientQt::notificationPresenter();
564 }
565 #endif
566 
567559void ChromeClientQt::runOpenPanel(Frame* frame, PassRefPtr<FileChooser> prpFileChooser)
568560{
569561 RefPtr<FileChooser> fileChooser = prpFileChooser;

Source/WebKit/qt/WebCoreSupport/ChromeClientQt.h

@@public:
142142 virtual void showContextMenu() { }
143143#endif
144144
145 #if ENABLE(NOTIFICATIONS)
146  virtual NotificationPresenter* notificationPresenter() const;
147 #endif
148 
149145#if USE(ACCELERATED_COMPOSITING)
150146 // This is a hook for WebCore to tell us what we need to do with the GraphicsLayers.
151147 virtual void attachRootGraphicsLayer(Frame*, GraphicsLayer*);

Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp

@@const QString NotificationWrapper::title() const
9191#if ENABLE(NOTIFICATIONS)
9292 Notification* notification = NotificationPresenterClientQt::notificationPresenter()->notificationForWrapper(this);
9393 if (notification)
94  return notification->contents().title();
 94 return notification->contents().title;
9595#endif
9696 return QString();
9797}

@@const QString NotificationWrapper::message() const
101101#if ENABLE(NOTIFICATIONS)
102102 Notification* notification = NotificationPresenterClientQt::notificationPresenter()->notificationForWrapper(this);
103103 if (notification)
104  return notification->contents().body();
 104 return notification->contents().body;
105105#endif
106106 return QString();
107107}

@@void NotificationPresenterClientQt::displayNotification(Notification* notificati
197197 if (notification->isHTML())
198198 message = notification->url().string();
199199 else {
200  title = notification->contents().title();
201  message = notification->contents().body();
 200 title = notification->contents().title;
 201 message = notification->contents().body;
202202 }
203203
204204 if (m_platformPlugin.plugin() && m_platformPlugin.plugin()->supportsExtension(QWebKitPlatformPlugin::Notifications))

@@void NotificationPresenterClientQt::displayNotification(Notification* notificati
233233#ifndef QT_NO_SYSTEMTRAYICON
234234 wrapper->connect(wrapper->m_notificationIcon.get(), SIGNAL(messageClicked()), wrapper, SLOT(notificationClicked()));
235235 wrapper->m_notificationIcon->show();
236  wrapper->m_notificationIcon->showMessage(notification->contents().title(), notification->contents().body());
 236 wrapper->m_notificationIcon->showMessage(notification->contents().title, notification->contents().body);
237237#endif
238238}
239239

@@void NotificationPresenterClientQt::cancel(Notification* notification)
243243 if (notification->isHTML())
244244 printf("DESKTOP NOTIFICATION CLOSED: %s\n", QString(notification->url().string()).toUtf8().constData());
245245 else
246  printf("DESKTOP NOTIFICATION CLOSED: %s\n", QString(notification->contents().title()).toUtf8().constData());
 246 printf("DESKTOP NOTIFICATION CLOSED: %s\n", QString(notification->contents().title).toUtf8().constData());
247247 }
248248
249249 NotificationsQueue::Iterator iter = m_notifications.find(notification);

@@void NotificationPresenterClientQt::notificationClicked(const QString& title)
283283 if (notification->isHTML())
284284 notificationTitle = notification->url().string();
285285 else
286  notificationTitle = notification->contents().title();
 286 notificationTitle = notification->contents().title;
287287 if (notificationTitle == title)
288288 break;
289289 iter++;

@@void NotificationPresenterClientQt::detachNotification(Notification* notificatio
419419void NotificationPresenterClientQt::dumpReplacedIdText(Notification* notification)
420420{
421421 if (notification)
422  printf("REPLACING NOTIFICATION %s\n", notification->isHTML() ? QString(notification->url().string()).toUtf8().constData() : QString(notification->contents().title()).toUtf8().constData());
 422 printf("REPLACING NOTIFICATION %s\n", notification->isHTML() ? QString(notification->url().string()).toUtf8().constData() : QString(notification->contents().title).toUtf8().constData());
423423}
424424
425425void NotificationPresenterClientQt::dumpShowText(Notification* notification)

@@void NotificationPresenterClientQt::dumpShowText(Notification* notification)
429429 else {
430430 printf("DESKTOP NOTIFICATION:%s icon %s, title %s, text %s\n",
431431 notification->dir() == "rtl" ? "(RTL)" : "",
432  QString(notification->contents().icon().string()).toUtf8().constData(), QString(notification->contents().title()).toUtf8().constData(),
433  QString(notification->contents().body()).toUtf8().constData());
 432 QString(notification->contents().icon.string()).toUtf8().constData(), QString(notification->contents().title).toUtf8().constData(),
 433 QString(notification->contents().body).toUtf8().constData());
434434 }
435435}
436436

Source/WebKit2/Configurations/FeatureDefines.xcconfig

@@ENABLE_MEDIA_STATISTICS = ;
9494ENABLE_METER_TAG = ENABLE_METER_TAG;
9595ENABLE_MHTML = ;
9696ENABLE_MUTATION_OBSERVERS = ;
97 ENABLE_NOTIFICATIONS = ;
 97
 98ENABLE_NOTIFICATIONS = $(ENABLE_NOTIFICATIONS_$(REAL_PLATFORM_NAME));
 99ENABLE_NOTIFICATIONS_macosx = ;
 100
98101ENABLE_PAGE_VISIBILITY_API = ;
99102ENABLE_PROGRESS_TAG = ENABLE_PROGRESS_TAG;
100103ENABLE_QUOTA = ;

Source/WebKit2/DerivedSources.make

@@VPATH = \
3232 $(WebKit2)/WebProcess/IconDatabase \
3333 $(WebKit2)/WebProcess/KeyValueStorage \
3434 $(WebKit2)/WebProcess/MediaCache \
 35 $(WebKit2)/WebProcess/Notifications \
3536 $(WebKit2)/WebProcess/Plugins \
3637 $(WebKit2)/WebProcess/ResourceCache \
3738 $(WebKit2)/WebProcess/WebCoreSupport \

@@MESSAGE_RECEIVERS = \
7273 WebKeyValueStorageManagerProxy \
7374 WebMediaCacheManager \
7475 WebMediaCacheManagerProxy \
 76 WebNotificationManagerProxy \
7577 WebPage \
7678 WebPageProxy \
7779 WebProcess \

Source/WebKit2/DerivedSources.pri

@@VPATH = \
4141 WebProcess/IconDatabase \
4242 WebProcess/KeyValueStorage \
4343 WebProcess/MediaCache \
 44 WebProcess/Notifications \
4445 WebProcess/Plugins \
4546 WebProcess/ResourceCache \
4647 WebProcess/WebCoreSupport \

@@MESSAGE_RECEIVERS = \
7778 WebKeyValueStorageManagerProxy.messages.in \
7879 WebMediaCacheManager.messages.in \
7980 WebMediaCacheManagerProxy.messages.in \
 81 WebNotificationManagerProxy.messages.in \
8082 WebFullScreenManager.messages.in \
8183 WebFullScreenManagerProxy.messages.in \
8284 WebPage/DrawingArea.messages.in \

Source/WebKit2/Platform/CoreIPC/MessageID.h

@@enum MessageClass {
6767 MessageClassWebInspectorProxy,
6868 MessageClassWebKeyValueStorageManagerProxy,
6969 MessageClassWebMediaCacheManagerProxy,
 70 MessageClassWebNotificationManagerProxy,
7071 MessageClassWebPageProxy,
7172 MessageClassWebProcessProxy,
7273 MessageClassWebResourceCacheManagerProxy,

Source/WebKit2/Scripts/webkit2/messages.py

@@def struct_or_class(namespace, type):
179179 'WebCore::Length',
180180 'WebCore::MatrixTransformOperation',
181181 'WebCore::Matrix3DTransformOperation',
 182 'WebCore::NotificationContents',
182183 'WebCore::PerspectiveTransformOperation',
183184 'WebCore::PluginInfo',
184185 'WebCore::PrintInfo',

Source/WebKit2/Shared/API/c/WKBase.h

@@typedef const struct OpaqueWKInspector* WKInspectorRef;
9595typedef const struct OpaqueWKKeyValueStorageManager* WKKeyValueStorageManagerRef;
9696typedef const struct OpaqueWKMediaCacheManager* WKMediaCacheManagerRef;
9797typedef const struct OpaqueWKNavigationData* WKNavigationDataRef;
 98typedef const struct OpaqueWKNotification* WKNotificationRef;
 99typedef const struct OpaqueWKNotificationManager* WKNotificationManagerRef;
 100typedef const struct OpaqueWKNotificationProvider* WKNotificationProviderRef;
98101typedef const struct OpaqueWKOpenPanelParameters* WKOpenPanelParametersRef;
99102typedef const struct OpaqueWKOpenPanelResultListener* WKOpenPanelResultListenerRef;
100103typedef const struct OpaqueWKPage* WKPageRef;

Source/WebKit2/Shared/APIObject.h

@@public:
8989 TypeKeyValueStorageManager,
9090 TypeMediaCacheManager,
9191 TypeNavigationData,
 92 TypeNotification,
 93 TypeNotificationManager,
9294 TypeOpenPanelParameters,
9395 TypeOpenPanelResultListener,
9496 TypePage,

Source/WebKit2/Shared/UserMessageCoders.h

3737#include "WebData.h"
3838#include "WebGeometry.h"
3939#include "WebImage.h"
 40#include "WebNotification.h"
4041#include "WebNumber.h"
4142#include "WebSerializedScriptValue.h"
4243#include "WebString.h"

@@namespace WebKit {
5556// - WebData -> WebData
5657// - WebDouble -> WebDouble
5758// - WebImage -> WebImage
 59// - WebNotification -> WebNotification
5860// - WebUInt64 -> WebUInt64
5961// - WebURL -> WebURL
6062

@@protected:
201203// - WebData -> WebData
202204// - WebDouble -> WebDouble
203205// - WebImage -> WebImage
 206// - WebNotification -> WebNotification
204207// - WebUInt64 -> WebUInt64
205208// - WebURL -> WebURL
206209

Source/WebKit2/Shared/WebCoreArgumentCoders.cpp

3737#include <WebCore/GraphicsContext.h>
3838#include <WebCore/GraphicsLayer.h>
3939#include <WebCore/Image.h>
 40#include <WebCore/KURL.h>
4041#include <WebCore/PluginData.h>
4142#include <WebCore/ProtectionSpace.h>
4243#include <WebCore/TextCheckerClient.h>

@@bool ArgumentCoder<DragSession>::decode(ArgumentDecoder* decoder, DragSession& r
624625 return true;
625626}
626627
 628void ArgumentCoder<KURL>::encode(ArgumentEncoder* encoder, const KURL& result)
 629{
 630 encoder->encode(result.string());
 631}
 632
 633bool ArgumentCoder<KURL>::decode(ArgumentDecoder* decoder, KURL& result)
 634{
 635 String urlAsString;
 636 if (!decoder->decode(urlAsString))
 637 return false;
 638 result = KURL(WebCore::ParsedURLString, urlAsString);
 639 return true;
 640}
 641
627642#if PLATFORM(QT)
628643
629644void ArgumentCoder<FloatPoint3D>::encode(ArgumentEncoder* encoder, const FloatPoint3D& floatPoint3D)

Source/WebKit2/Shared/WebCoreArgumentCoders.h

@@namespace WebCore {
4343 class IntRect;
4444 class IntSize;
4545 class KeyframeValueList;
 46 class KURL;
 47 class Notification;
4648 class ProtectionSpace;
4749 class ResourceError;
4850 class ResourceRequest;

@@template<> struct ArgumentCoder<WebCore::DragSession> {
221223 static bool decode(ArgumentDecoder*, WebCore::DragSession&);
222224};
223225
 226template<> struct ArgumentCoder<WebCore::KURL> {
 227 static void encode(ArgumentEncoder*, const WebCore::KURL&);
 228 static bool decode(ArgumentDecoder*, WebCore::KURL&);
 229};
 230
224231#if PLATFORM(QT)
225232template<> struct ArgumentCoder<WebCore::FloatPoint3D> {
226233 static void encode(ArgumentEncoder*, const WebCore::FloatPoint3D&);

Source/WebKit2/Target.pri

@@WEBKIT2_GENERATED_HEADERS = \
5050 $$WEBKIT2_GENERATED_SOURCES_DIR/WebKeyValueStorageManagerProxyMessages.h \
5151 $$WEBKIT2_GENERATED_SOURCES_DIR/WebMediaCacheManagerMessages.h \
5252 $$WEBKIT2_GENERATED_SOURCES_DIR/WebMediaCacheManagerProxyMessages.h \
 53 $$WEBKIT2_GENERATED_SOURCES_DIR/WebNotificationManagerProxyMessages.h \
5354 $$WEBKIT2_GENERATED_SOURCES_DIR/WebPageMessages.h \
5455 $$WEBKIT2_GENERATED_SOURCES_DIR/WebPageProxyMessages.h \
5556 $$WEBKIT2_GENERATED_SOURCES_DIR/WebProcessConnectionMessages.h \

@@WEBKIT2_GENERATED_SOURCES = \
9091 $$WEBKIT2_GENERATED_SOURCES_DIR/WebKeyValueStorageManagerProxyMessageReceiver.cpp \
9192 $$WEBKIT2_GENERATED_SOURCES_DIR/WebMediaCacheManagerMessageReceiver.cpp \
9293 $$WEBKIT2_GENERATED_SOURCES_DIR/WebMediaCacheManagerProxyMessageReceiver.cpp \
 94 $$WEBKIT2_GENERATED_SOURCES_DIR/WebNotificationManagerProxyMessageReceiver.cpp \
9395 $$WEBKIT2_GENERATED_SOURCES_DIR/WebPageMessageReceiver.cpp \
9496 $$WEBKIT2_GENERATED_SOURCES_DIR/WebPageProxyMessageReceiver.cpp \
9597 $$WEBKIT2_GENERATED_SOURCES_DIR/WebProcessConnectionMessageReceiver.cpp \

@@HEADERS += \
232234 UIProcess/API/C/WKOpenPanelParameters.h \
233235 UIProcess/API/C/WKOpenPanelResultListener.h \
234236 UIProcess/API/C/WKNavigationData.h \
 237 UIProcess/API/C/WKNotification.h \
 238 UIProcess/API/C/WKNotificationManager.h \
 239 UIProcess/API/C/WKNotificationProvider.h \
235240 UIProcess/API/C/WKPage.h \
236241 UIProcess/API/C/WKPageGroup.h \
237242 UIProcess/API/C/WKPagePrivate.h \

@@HEADERS += \
304309 UIProcess/WebLoaderClient.h \
305310 UIProcess/WebMediaCacheManagerProxy.h \
306311 UIProcess/WebNavigationData.h \
 312 UIProcess/WebNotification.h \
 313 UIProcess/WebNotificationManagerProxy.h \
 314 UIProcess/WebNotificationProvider.h \
307315 UIProcess/WebOpenPanelResultListenerProxy.h \
308316 UIProcess/WebPageContextMenuClient.h \
309317 UIProcess/WebPageGroup.h \

@@HEADERS += \
372380 WebProcess/InjectedBundle/InjectedBundleUserMessageCoders.h \
373381 WebProcess/KeyValueStorage/WebKeyValueStorageManager.h \
374382 WebProcess/MediaCache/WebMediaCacheManager.h \
 383 WebProcess/Notifications/WebNotificationManager.h \
375384 WebProcess/ResourceCache/WebResourceCacheManager.h \
376385 WebProcess/Plugins/Netscape/JSNPMethod.h \
377386 WebProcess/Plugins/Netscape/JSNPObject.h \

@@HEADERS += \
398407 WebProcess/WebCoreSupport/WebGraphicsLayer.h \
399408 WebProcess/WebCoreSupport/WebInspectorClient.h \
400409 WebProcess/WebCoreSupport/WebInspectorFrontendClient.h \
 410 WebProcess/WebCoreSupport/WebNotificationClient.h \
401411 WebProcess/WebCoreSupport/WebPlatformStrategies.h \
402412 WebProcess/WebCoreSupport/WebPopupMenu.h \
403413 WebProcess/WebCoreSupport/WebSearchPopupMenu.h \

@@SOURCES += \
539549 UIProcess/API/C/WKHitTestResult.cpp \
540550 UIProcess/API/C/WKIconDatabase.cpp \
541551 UIProcess/API/C/WKInspector.cpp \
 552 UIProcess/API/C/WKNotification.cpp \
 553 UIProcess/API/C/WKNotificationManager.cpp \
542554 UIProcess/API/C/WKOpenPanelParameters.cpp \
543555 UIProcess/API/C/WKOpenPanelResultListener.cpp \
544556 UIProcess/API/C/WKNavigationData.cpp \

@@SOURCES += \
608620 UIProcess/WebLoaderClient.cpp \
609621 UIProcess/WebMediaCacheManagerProxy.cpp \
610622 UIProcess/WebNavigationData.cpp \
 623 UIProcess/WebNotification.cpp \
 624 UIProcess/WebNotificationManagerProxy.cpp \
 625 UIProcess/WebNotificationProvider.cpp \
611626 UIProcess/WebOpenPanelResultListenerProxy.cpp \
612627 UIProcess/WebPageContextMenuClient.cpp \
613628 UIProcess/WebPageGroup.cpp \

@@SOURCES += \
692707 WebProcess/InjectedBundle/qt/InjectedBundleQt.cpp \
693708 WebProcess/KeyValueStorage/WebKeyValueStorageManager.cpp \
694709 WebProcess/MediaCache/WebMediaCacheManager.cpp \
 710 WebProcess/Notifications/WebNotificationManager.cpp \
695711 WebProcess/ResourceCache/WebResourceCacheManager.cpp \
696712 WebProcess/Plugins/Netscape/JSNPMethod.cpp \
697713 WebProcess/Plugins/Netscape/JSNPObject.cpp \

@@SOURCES += \
719735 WebProcess/WebCoreSupport/WebGraphicsLayer.cpp \
720736 WebProcess/WebCoreSupport/WebInspectorClient.cpp \
721737 WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp \
 738 WebProcess/WebCoreSupport/WebNotificationClient.cpp \
722739 WebProcess/WebCoreSupport/WebPlatformStrategies.cpp \
723740 WebProcess/WebCoreSupport/WebPopupMenu.cpp \
724741 WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp \

Source/WebKit2/UIProcess/API/C/WKAPICast.h

@@class WebInspectorProxy;
7272class WebKeyValueStorageManagerProxy;
7373class WebMediaCacheManagerProxy;
7474class WebNavigationData;
 75class WebNotification;
 76class WebNotificationProvider;
 77class WebNotificationManagerProxy;
7578class WebOpenPanelParameters;
7679class WebOpenPanelResultListenerProxy;
7780class WebPageGroup;

@@WK_ADD_API_MAPPING(WKIconDatabaseRef, WebIconDatabase)
104107WK_ADD_API_MAPPING(WKKeyValueStorageManagerRef, WebKeyValueStorageManagerProxy)
105108WK_ADD_API_MAPPING(WKMediaCacheManagerRef, WebMediaCacheManagerProxy)
106109WK_ADD_API_MAPPING(WKNavigationDataRef, WebNavigationData)
 110WK_ADD_API_MAPPING(WKNotificationManagerRef, WebNotificationManagerProxy)
 111WK_ADD_API_MAPPING(WKNotificationProviderRef, WebNotificationProvider)
 112WK_ADD_API_MAPPING(WKNotificationRef, WebNotification)
107113WK_ADD_API_MAPPING(WKOpenPanelParametersRef, WebOpenPanelParameters)
108114WK_ADD_API_MAPPING(WKOpenPanelResultListenerRef, WebOpenPanelResultListenerProxy)
109115WK_ADD_API_MAPPING(WKPageGroupRef, WebPageGroup)

Source/WebKit2/UIProcess/API/C/WKContext.cpp

@@WKMediaCacheManagerRef WKContextGetMediaCacheManager(WKContextRef contextRef)
195195 return toAPI(toImpl(contextRef)->mediaCacheManagerProxy());
196196}
197197
 198WKNotificationManagerRef WKContextGetNotificationManager(WKContextRef contextRef)
 199{
 200 return toAPI(toImpl(contextRef)->notificationManagerProxy());
 201}
 202
198203WKPluginSiteDataManagerRef WKContextGetPluginSiteDataManager(WKContextRef contextRef)
199204{
200205 return toAPI(toImpl(contextRef)->pluginSiteDataManager());

Source/WebKit2/UIProcess/API/C/WKContext.h

@@WK_EXPORT WKGeolocationManagerRef WKContextGetGeolocationManager(WKContextRef co
148148WK_EXPORT WKIconDatabaseRef WKContextGetIconDatabase(WKContextRef context);
149149WK_EXPORT WKKeyValueStorageManagerRef WKContextGetKeyValueStorageManager(WKContextRef context);
150150WK_EXPORT WKMediaCacheManagerRef WKContextGetMediaCacheManager(WKContextRef context);
 151WK_EXPORT WKNotificationManagerRef WKContextGetNotificationManager(WKContextRef context);
151152WK_EXPORT WKPluginSiteDataManagerRef WKContextGetPluginSiteDataManager(WKContextRef context);
152153WK_EXPORT WKResourceCacheManagerRef WKContextGetResourceCacheManager(WKContextRef context);
153154

Source/WebKit2/UIProcess/API/C/WKNotification.cpp

 1/*
 2 * Copyright (C) 2011 Apple Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 * 1. Redistributions of source code must retain the above copyright
 8 * notice, this list of conditions and the following disclaimer.
 9 * 2. Redistributions in binary form must reproduce the above copyright
 10 * notice, this list of conditions and the following disclaimer in the
 11 * documentation and/or other materials provided with the distribution.
 12 *
 13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
 14 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 15 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
 17 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 18 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 19 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 20 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 21 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 23 * THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#include "config.h"
 27#include "WKNotification.h"
 28
 29#include "WKAPICast.h"
 30#include "WebNotification.h"
 31
 32using namespace WebKit;
 33
 34WKTypeID WKNotificationGetTypeID()
 35{
 36 return toAPI(WebNotification::APIType);
 37}
 38
 39WKStringRef WKNotificationCopyTitle(WKNotificationRef notification)
 40{
 41 return toCopiedAPI(toImpl(notification)->title());
 42}
 43
 44WKStringRef WKNotificationCopyBody(WKNotificationRef notification)
 45{
 46 return toCopiedAPI(toImpl(notification)->body());
 47}
 48

Source/WebKit2/UIProcess/API/C/WKNotification.h

 1/*
 2 * Copyright (C) 2011 Apple Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 * 1. Redistributions of source code must retain the above copyright
 8 * notice, this list of conditions and the following disclaimer.
 9 * 2. Redistributions in binary form must reproduce the above copyright
 10 * notice, this list of conditions and the following disclaimer in the
 11 * documentation and/or other materials provided with the distribution.
 12 *
 13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
 14 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 15 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
 17 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 18 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 19 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 20 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 21 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 23 * THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#ifndef WKNotification_h
 27#define WKNotification_h
 28
 29#include <WebKit2/WKBase.h>
 30
 31#ifdef __cplusplus
 32extern "C" {
 33#endif
 34
 35WK_EXPORT WKTypeID WKNotificationGetTypeID();
 36
 37WK_EXPORT WKStringRef WKNotificationCopyTitle(WKNotificationRef notification);
 38WK_EXPORT WKStringRef WKNotificationCopyBody(WKNotificationRef notification);
 39
 40#ifdef __cplusplus
 41}
 42#endif
 43
 44#endif // WKNotification_h

Source/WebKit2/UIProcess/API/C/WKNotificationManager.cpp

 1/*
 2 * Copyright (C) 2011 Apple Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 * 1. Redistributions of source code must retain the above copyright
 8 * notice, this list of conditions and the following disclaimer.
 9 * 2. Redistributions in binary form must reproduce the above copyright
 10 * notice, this list of conditions and the following disclaimer in the
 11 * documentation and/or other materials provided with the distribution.
 12 *
 13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
 14 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 15 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
 17 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 18 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 19 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 20 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 21 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 23 * THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#include "config.h"
 27#include "WKNotificationManager.h"
 28
 29#include "WKAPICast.h"
 30#include "WebNotificationManagerProxy.h"
 31
 32using namespace WebKit;
 33
 34WKTypeID WKNotificationManagerGetTypeID()
 35{
 36 return toAPI(WebNotificationManagerProxy::APIType);
 37}
 38void WKNotificationManagerSetProvider(WKNotificationManagerRef managerRef, const WKNotificationProvider* wkProvider)
 39{
 40 toImpl(managerRef)->initializeProvider(wkProvider);
 41}

Source/WebKit2/UIProcess/API/C/WKNotificationManager.h

 1/*
 2 * Copyright (C) 2011 Apple Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 * 1. Redistributions of source code must retain the above copyright
 8 * notice, this list of conditions and the following disclaimer.
 9 * 2. Redistributions in binary form must reproduce the above copyright
 10 * notice, this list of conditions and the following disclaimer in the
 11 * documentation and/or other materials provided with the distribution.
 12 *
 13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
 14 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 15 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
 17 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 18 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 19 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 20 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 21 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 23 * THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#ifndef WKNotificationManager_h
 27#define WKNotificationManager_h
 28
 29#include "WKNotificationProvider.h"
 30#include <WebKit2/WKBase.h>
 31
 32#ifdef __cplusplus
 33extern "C" {
 34#endif
 35
 36WK_EXPORT WKTypeID WKNotificationManagerGetTypeID();
 37WK_EXPORT void WKNotificationManagerSetProvider(WKNotificationManagerRef managerRef, const WKNotificationProvider* wkProvider);
 38
 39#ifdef __cplusplus
 40}
 41#endif
 42
 43#endif // WKNotificationManager_h

Source/WebKit2/UIProcess/API/C/WKNotificationProvider.h

 1/*
 2 * Copyright (C) 2011 Apple Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 * 1. Redistributions of source code must retain the above copyright
 8 * notice, this list of conditions and the following disclaimer.
 9 * 2. Redistributions in binary form must reproduce the above copyright
 10 * notice, this list of conditions and the following disclaimer in the
 11 * documentation and/or other materials provided with the distribution.
 12 *
 13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
 14 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 15 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
 17 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 18 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 19 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 20 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 21 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 23 * THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#ifndef WKNotificationProvider_h
 27#define WKNotificationProvider_h
 28
 29#include <WebKit2/WKBase.h>
 30
 31#ifdef __cplusplus
 32extern "C" {
 33#endif
 34
 35typedef void (*WKNotificationProviderShowCallback)(WKNotificationRef notification, const void* clientInfo);
 36typedef void (*WKNotificationProviderCancelCallback)(WKNotificationRef notification, const void* clientInfo);
 37
 38struct WKNotificationProvider {
 39 int version;
 40 const void* clientInfo;
 41 WKNotificationProviderShowCallback show;
 42 WKNotificationProviderCancelCallback cancel;
 43};
 44typedef struct WKNotificationProvider WKNotificationProvider;
 45
 46enum { kWKNotificationProviderCurrentVersion = 0 };
 47
 48#ifdef __cplusplus
 49}
 50#endif
 51
 52
 53#endif // WKNotificationProvider_h

Source/WebKit2/UIProcess/WebContext.cpp

4646#include "WebIconDatabase.h"
4747#include "WebKeyValueStorageManagerProxy.h"
4848#include "WebMediaCacheManagerProxy.h"
 49#include "WebNotificationManagerProxy.h"
4950#include "WebPluginSiteDataManager.h"
5051#include "WebPageGroup.h"
5152#include "WebMemorySampler.h"

@@WebContext::WebContext(ProcessModel processModel, const String& injectedBundlePa
131132 , m_iconDatabase(WebIconDatabase::create(this))
132133 , m_keyValueStorageManagerProxy(WebKeyValueStorageManagerProxy::create(this))
133134 , m_mediaCacheManagerProxy(WebMediaCacheManagerProxy::create(this))
 135 , m_notificationManagerProxy(WebNotificationManagerProxy::create(this))
134136 , m_pluginSiteDataManager(WebPluginSiteDataManager::create(this))
135137 , m_resourceCacheManagerProxy(WebResourceCacheManagerProxy::create(this))
136138#if PLATFORM(WIN)

@@WebContext::~WebContext()
181183
182184 m_mediaCacheManagerProxy->invalidate();
183185 m_mediaCacheManagerProxy->clearContext();
 186
 187 m_notificationManagerProxy->invalidate();
 188 m_notificationManagerProxy->clearContext();
184189
185190 m_pluginSiteDataManager->invalidate();
186191 m_pluginSiteDataManager->clearContext();

@@void WebContext::disconnectProcess(WebProcessProxy* process)
369374 m_geolocationManagerProxy->invalidate();
370375 m_keyValueStorageManagerProxy->invalidate();
371376 m_mediaCacheManagerProxy->invalidate();
 377 m_notificationManagerProxy->invalidate();
372378 m_resourceCacheManagerProxy->invalidate();
373379
374380 // When out of process plug-ins are enabled, we don't want to invalidate the plug-in site data

@@void WebContext::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::Mes
695701 m_mediaCacheManagerProxy->didReceiveMessage(connection, messageID, arguments);
696702 return;
697703 }
 704
 705 if (messageID.is<CoreIPC::MessageClassWebNotificationManagerProxy>()) {
 706 m_notificationManagerProxy->didReceiveMessage(connection, messageID, arguments);
 707 return;
 708 }
698709
699710 if (messageID.is<CoreIPC::MessageClassWebResourceCacheManagerProxy>()) {
700711 m_resourceCacheManagerProxy->didReceiveWebResourceCacheManagerProxyMessage(connection, messageID, arguments);

Source/WebKit2/UIProcess/WebContext.h

@@class WebGeolocationManagerProxy;
5454class WebIconDatabase;
5555class WebKeyValueStorageManagerProxy;
5656class WebMediaCacheManagerProxy;
 57class WebNotificationManagerProxy;
5758class WebPageGroup;
5859class WebPageProxy;
5960class WebResourceCacheManagerProxy;

@@public:
157158 WebIconDatabase* iconDatabase() const { return m_iconDatabase.get(); }
158159 WebKeyValueStorageManagerProxy* keyValueStorageManagerProxy() const { return m_keyValueStorageManagerProxy.get(); }
159160 WebMediaCacheManagerProxy* mediaCacheManagerProxy() const { return m_mediaCacheManagerProxy.get(); }
 161 WebNotificationManagerProxy* notificationManagerProxy() const { return m_notificationManagerProxy.get(); }
160162 WebPluginSiteDataManager* pluginSiteDataManager() const { return m_pluginSiteDataManager.get(); }
161163 WebResourceCacheManagerProxy* resourceCacheManagerProxy() const { return m_resourceCacheManagerProxy.get(); }
162164

@@private:
282284 RefPtr<WebIconDatabase> m_iconDatabase;
283285 RefPtr<WebKeyValueStorageManagerProxy> m_keyValueStorageManagerProxy;
284286 RefPtr<WebMediaCacheManagerProxy> m_mediaCacheManagerProxy;
 287 RefPtr<WebNotificationManagerProxy> m_notificationManagerProxy;
285288 RefPtr<WebPluginSiteDataManager> m_pluginSiteDataManager;
286289 RefPtr<WebResourceCacheManagerProxy> m_resourceCacheManagerProxy;
287290

Source/WebKit2/UIProcess/WebNotification.cpp

 1/*
 2 * Copyright (C) 2011 Apple Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 * 1. Redistributions of source code must retain the above copyright
 8 * notice, this list of conditions and the following disclaimer.
 9 * 2. Redistributions in binary form must reproduce the above copyright
 10 * notice, this list of conditions and the following disclaimer in the
 11 * documentation and/or other materials provided with the distribution.
 12 *
 13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
 14 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 15 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
 17 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 18 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 19 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 20 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 21 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 23 * THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#include "config.h"
 27#include "WebNotification.h"
 28
 29#include "ArgumentCoders.h"
 30#include "ArgumentDecoder.h"
 31#include "ArgumentEncoder.h"
 32#include "Arguments.h"
 33
 34namespace WebKit {
 35
 36WebNotification::WebNotification()
 37{
 38}
 39
 40WebNotification::WebNotification(const String& title, const String& body)
 41 : m_title(title)
 42 , m_body(body)
 43{
 44}
 45
 46WebNotification::~WebNotification()
 47{
 48}
 49
 50void WebNotification::encode(CoreIPC::ArgumentEncoder* encoder) const
 51{
 52 encoder->encode(CoreIPC::In(m_title, m_body));
 53}
 54
 55bool WebNotification::decode(CoreIPC::ArgumentDecoder* decoder, WebNotification& notification)
 56{
 57 return decoder->decode(CoreIPC::Out(notification.m_title, notification.m_body));
 58}
 59
 60} // namespace WebKit

Source/WebKit2/UIProcess/WebNotification.h

 1/*
 2 * Copyright (C) 2011 Apple Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 * 1. Redistributions of source code must retain the above copyright
 8 * notice, this list of conditions and the following disclaimer.
 9 * 2. Redistributions in binary form must reproduce the above copyright
 10 * notice, this list of conditions and the following disclaimer in the
 11 * documentation and/or other materials provided with the distribution.
 12 *
 13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
 14 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 15 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
 17 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 18 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 19 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 20 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 21 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 23 * THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#ifndef WebNotification_h
 27#define WebNotification_h
 28
 29#include "APIObject.h"
 30#include <wtf/PassRefPtr.h>
 31#include <wtf/text/WTFString.h>
 32
 33namespace CoreIPC {
 34
 35class ArgumentDecoder;
 36class ArgumentEncoder;
 37
 38} // namespace CoreIPC
 39
 40namespace WebKit {
 41
 42class WebNotification : public APIObject {
 43public:
 44 static const Type APIType = TypeNotification;
 45
 46 WebNotification();
 47 static PassRefPtr<WebNotification> create(const String& title, const String& body)
 48 {
 49 return adoptRef(new WebNotification(title, body));
 50 }
 51 virtual ~WebNotification();
 52
 53 const String& title() const { return m_title; }
 54
 55 const String& body() const { return m_body; }
 56
 57 void encode(CoreIPC::ArgumentEncoder*) const;
 58 static bool decode(CoreIPC::ArgumentDecoder*, WebNotification&);
 59
 60private:
 61 WebNotification(const String& title, const String& body);
 62
 63 virtual Type type() const { return APIType; }
 64
 65 String m_title;
 66 String m_body;
 67};
 68
 69} // namespace WebKit
 70
 71#endif // WebNotification_h

Source/WebKit2/UIProcess/WebNotificationManagerProxy.cpp

 1/*
 2 * Copyright (C) 2011 Apple Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 * 1. Redistributions of source code must retain the above copyright
 8 * notice, this list of conditions and the following disclaimer.
 9 * 2. Redistributions in binary form must reproduce the above copyright
 10 * notice, this list of conditions and the following disclaimer in the
 11 * documentation and/or other materials provided with the distribution.
 12 *
 13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
 14 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 15 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
 17 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 18 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 19 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 20 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 21 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 23 * THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#include "config.h"
 27#include "WebNotificationManagerProxy.h"
 28
 29#include "WebContext.h"
 30#include "WebNotification.h"
 31#include <WebCore/NotificationContents.h>
 32
 33using namespace WTF;
 34using namespace WebCore;
 35
 36namespace WebKit {
 37
 38PassRefPtr<WebNotificationManagerProxy> WebNotificationManagerProxy::create(WebContext* context)
 39{
 40 return adoptRef(new WebNotificationManagerProxy(context));
 41}
 42
 43WebNotificationManagerProxy::WebNotificationManagerProxy(WebContext* context)
 44 : m_context(context)
 45{
 46}
 47
 48WebNotificationManagerProxy::~WebNotificationManagerProxy()
 49{
 50}
 51
 52void WebNotificationManagerProxy::invalidate()
 53{
 54}
 55
 56void WebNotificationManagerProxy::initializeProvider(const WKNotificationProvider *provider)
 57{
 58 m_provider.initialize(provider);
 59}
 60
 61void WebNotificationManagerProxy::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments)
 62{
 63 didReceiveWebNotificationManagerProxyMessage(connection, messageID, arguments);
 64}
 65
 66void WebNotificationManagerProxy::show(const String& title, const String& body, uint64_t notificationID)
 67{
 68 RefPtr<WebNotification> notification = WebNotification::create(title, body);
 69 m_provider.show(notification.get());
 70}
 71
 72void WebNotificationManagerProxy::cancel(uint64_t notificationID)
 73{
 74 m_provider.cancel(0);
 75}
 76
 77} // namespace WebKit

Source/WebKit2/UIProcess/WebNotificationManagerProxy.h

 1/*
 2 * Copyright (C) 2011 Apple Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 * 1. Redistributions of source code must retain the above copyright
 8 * notice, this list of conditions and the following disclaimer.
 9 * 2. Redistributions in binary form must reproduce the above copyright
 10 * notice, this list of conditions and the following disclaimer in the
 11 * documentation and/or other materials provided with the distribution.
 12 *
 13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
 14 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 15 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
 17 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 18 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 19 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 20 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 21 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 23 * THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#ifndef WebNotificationManagerProxy_h
 27#define WebNotificationManagerProxy_h
 28
 29#include "APIObject.h"
 30#include "MessageID.h"
 31#include "WebNotificationProvider.h"
 32#include <wtf/PassRefPtr.h>
 33
 34namespace CoreIPC {
 35class ArgumentDecoder;
 36class Connection;
 37}
 38
 39namespace WebKit {
 40
 41class WebContext;
 42
 43class WebNotificationManagerProxy : public APIObject {
 44public:
 45 static const Type APIType = TypeNotificationManager;
 46
 47 static PassRefPtr<WebNotificationManagerProxy> create(WebContext*);
 48 virtual ~WebNotificationManagerProxy();
 49
 50 void invalidate();
 51 void clearContext() { m_context = 0; }
 52
 53 void initializeProvider(const WKNotificationProvider*);
 54
 55 void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
 56
 57private:
 58 explicit WebNotificationManagerProxy(WebContext*);
 59
 60 virtual Type type() const { return APIType; }
 61
 62 void didReceiveWebNotificationManagerProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
 63
 64 // Message handlers
 65 void show(const WTF::String& title, const WTF::String& body, uint64_t notificationID);
 66 void cancel(uint64_t notificationID);
 67
 68 WebContext* m_context;
 69 WebNotificationProvider m_provider;
 70};
 71
 72} // namespace WebKit
 73
 74#endif // WebNotificationManagerProxy_h

Source/WebKit2/UIProcess/WebNotificationManagerProxy.messages.in

 1# Copyright (C) 2011 Apple Inc. All rights reserved.
 2#
 3# Redistribution and use in source and binary forms, with or without
 4# modification, are permitted provided that the following conditions
 5# are met:
 6# 1. Redistributions of source code must retain the above copyright
 7# notice, this list of conditions and the following disclaimer.
 8# 2. Redistributions in binary form must reproduce the above copyright
 9# notice, this list of conditions and the following disclaimer in the
 10# documentation and/or other materials provided with the distribution.
 11#
 12# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
 13# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 14# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 15# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
 16# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 17# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
 18# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
 19# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 20# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 21# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 22
 23messages -> WebNotificationManagerProxy {
 24 Show(WTF::String title, WTF::String body, uint64_t notificationID);
 25 Cancel(uint64_t notificationID);
 26}

Source/WebKit2/UIProcess/WebNotificationProvider.cpp

 1/*
 2 * Copyright (C) 2011 Apple Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 * 1. Redistributions of source code must retain the above copyright
 8 * notice, this list of conditions and the following disclaimer.
 9 * 2. Redistributions in binary form must reproduce the above copyright
 10 * notice, this list of conditions and the following disclaimer in the
 11 * documentation and/or other materials provided with the distribution.
 12 *
 13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
 14 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 15 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
 17 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 18 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 19 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 20 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 21 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 23 * THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#include "config.h"
 27#include "WebNotificationProvider.h"
 28
 29#include "WKAPICast.h"
 30#include "WebNotification.h"
 31
 32namespace WebKit {
 33
 34void WebNotificationProvider::show(WebNotification* notification)
 35{
 36 if (!m_client.show)
 37 return;
 38
 39 m_client.show(toAPI(notification), m_client.clientInfo);
 40}
 41
 42void WebNotificationProvider::cancel(WebNotification* notification)
 43{
 44 if (!m_client.cancel)
 45 return;
 46
 47 m_client.cancel(toAPI(notification), m_client.clientInfo);
 48}
 49
 50} // namespace WebKit

Source/WebKit2/UIProcess/WebNotificationProvider.h

 1/*
 2 * Copyright (C) 2011 Apple Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 * 1. Redistributions of source code must retain the above copyright
 8 * notice, this list of conditions and the following disclaimer.
 9 * 2. Redistributions in binary form must reproduce the above copyright
 10 * notice, this list of conditions and the following disclaimer in the
 11 * documentation and/or other materials provided with the distribution.
 12 *
 13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
 14 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 15 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
 17 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 18 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 19 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 20 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 21 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 23 * THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#ifndef WebNotificationProvider_h
 27#define WebNotificationProvider_h
 28
 29#include "APIClient.h"
 30#include "WKNotificationProvider.h"
 31#include <wtf/Forward.h>
 32
 33namespace WebKit {
 34
 35class WebNotification;
 36
 37class WebNotificationProvider : public APIClient<WKNotificationProvider, kWKNotificationProviderCurrentVersion> {
 38public:
 39 void show(WebNotification*);
 40 void cancel(WebNotification*);
 41};
 42
 43} // namespace WebKit
 44
 45#endif // WebNotificationProvider_h

Source/WebKit2/UIProcess/WebProcessProxy.cpp

@@void WebProcessProxy::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC
302302 || messageID.is<CoreIPC::MessageClassWebIconDatabase>()
303303 || messageID.is<CoreIPC::MessageClassWebKeyValueStorageManagerProxy>()
304304 || messageID.is<CoreIPC::MessageClassWebMediaCacheManagerProxy>()
 305 || messageID.is<CoreIPC::MessageClassWebNotificationManagerProxy>()
305306 || messageID.is<CoreIPC::MessageClassWebResourceCacheManagerProxy>()) {
306307 m_context->didReceiveMessage(connection, messageID, arguments);
307308 return;

Source/WebKit2/WebKit2.xcodeproj/project.pbxproj

246246 1CA8B954127C891500576C2B /* WebInspectorMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1C8E2DAD1278C5B200BC7BD0 /* WebInspectorMac.mm */; };
247247 29CD55AA128E294F00133C85 /* WKAccessibilityWebPageObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 29CD55A8128E294F00133C85 /* WKAccessibilityWebPageObject.h */; };
248248 29CD55AB128E294F00133C85 /* WKAccessibilityWebPageObject.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29CD55A9128E294F00133C85 /* WKAccessibilityWebPageObject.mm */; };
 249 3109996F146C741D0029DEB9 /* WebNotificationManagerProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 3109996A146C73920029DEB9 /* WebNotificationManagerProxy.h */; };
 250 31099970146C74200029DEB9 /* WebNotificationManagerProxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3109996B146C73B10029DEB9 /* WebNotificationManagerProxy.cpp */; };
 251 31099973146C75A20029DEB9 /* WebNotificationClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31099971146C759B0029DEB9 /* WebNotificationClient.cpp */; };
 252 3109997A146C8B140029DEB9 /* WebNotificationManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31099978146C8B140029DEB9 /* WebNotificationManager.cpp */; };
 253 3109997B146C8B140029DEB9 /* WebNotificationManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 31099979146C8B140029DEB9 /* WebNotificationManager.h */; };
 254 310999C7146C9E3D0029DEB9 /* WebNotificationClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 31099968146C71F50029DEB9 /* WebNotificationClient.h */; };
 255 312C0C47146DDBBD0016C911 /* WebNotificationProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 312C0C46146DDBBC0016C911 /* WebNotificationProvider.cpp */; };
 256 312C0C4A146DDC8A0016C911 /* WKNotificationProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 312C0C49146DDC8A0016C911 /* WKNotificationProvider.h */; settings = {ATTRIBUTES = (Private, ); }; };
 257 318BE1671473433700A8FBB2 /* WebNotificationManagerProxyMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 318BE1651473433700A8FBB2 /* WebNotificationManagerProxyMessageReceiver.cpp */; };
 258 318BE1681473433700A8FBB2 /* WebNotificationManagerProxyMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 318BE1661473433700A8FBB2 /* WebNotificationManagerProxyMessages.h */; };
 259 318BE17114743DB100A8FBB2 /* WKNotificationManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 318BE17014743DB100A8FBB2 /* WKNotificationManager.h */; settings = {ATTRIBUTES = (Private, ); }; };
 260 318BE17514743DD700A8FBB2 /* WKNotificationManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 318BE17414743DD600A8FBB2 /* WKNotificationManager.cpp */; };
 261 318BE17714743E6000A8FBB2 /* WKNotification.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 318BE17614743E6000A8FBB2 /* WKNotification.cpp */; };
 262 318BE17914743E6F00A8FBB2 /* WKNotification.h in Headers */ = {isa = PBXBuildFile; fileRef = 318BE17814743E6A00A8FBB2 /* WKNotification.h */; settings = {ATTRIBUTES = (Private, ); }; };
 263 31C11AB3148452E90049A4CC /* WebNotification.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31C11AB1148452E90049A4CC /* WebNotification.cpp */; };
 264 31C11AB4148452E90049A4CC /* WebNotification.h in Headers */ = {isa = PBXBuildFile; fileRef = 31C11AB2148452E90049A4CC /* WebNotification.h */; };
249265 31EA25D2134F78C0005B1452 /* NativeWebMouseEventMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 31EA25D0134F78B2005B1452 /* NativeWebMouseEventMac.mm */; };
250266 330934471315B9220097A7BC /* WebCookieManagerMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 330934431315B9220097A7BC /* WebCookieManagerMessageReceiver.cpp */; };
251267 330934481315B9220097A7BC /* WebCookieManagerMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 330934441315B9220097A7BC /* WebCookieManagerMessages.h */; };

12001216 1CA8B944127C882A00576C2B /* WebInspectorProxyMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebInspectorProxyMessages.h; sourceTree = "<group>"; };
12011217 29CD55A8128E294F00133C85 /* WKAccessibilityWebPageObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKAccessibilityWebPageObject.h; sourceTree = "<group>"; };
12021218 29CD55A9128E294F00133C85 /* WKAccessibilityWebPageObject.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKAccessibilityWebPageObject.mm; sourceTree = "<group>"; };
 1219 31099968146C71F50029DEB9 /* WebNotificationClient.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebNotificationClient.h; sourceTree = "<group>"; };
 1220 3109996A146C73920029DEB9 /* WebNotificationManagerProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebNotificationManagerProxy.h; sourceTree = "<group>"; };
 1221 3109996B146C73B10029DEB9 /* WebNotificationManagerProxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebNotificationManagerProxy.cpp; sourceTree = "<group>"; };
 1222 3109996D146C73C40029DEB9 /* WebNotificationManagerProxy.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebNotificationManagerProxy.messages.in; sourceTree = "<group>"; };
 1223 31099971146C759B0029DEB9 /* WebNotificationClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebNotificationClient.cpp; sourceTree = "<group>"; };
 1224 31099978146C8B140029DEB9 /* WebNotificationManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebNotificationManager.cpp; path = Notifications/WebNotificationManager.cpp; sourceTree = "<group>"; };
 1225 31099979146C8B140029DEB9 /* WebNotificationManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebNotificationManager.h; path = Notifications/WebNotificationManager.h; sourceTree = "<group>"; };
 1226 312C0C46146DDBBC0016C911 /* WebNotificationProvider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebNotificationProvider.cpp; sourceTree = "<group>"; };
 1227 312C0C48146DDBD30016C911 /* WebNotificationProvider.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebNotificationProvider.h; sourceTree = "<group>"; };
 1228 312C0C49146DDC8A0016C911 /* WKNotificationProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKNotificationProvider.h; sourceTree = "<group>"; };
 1229 318BE1651473433700A8FBB2 /* WebNotificationManagerProxyMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebNotificationManagerProxyMessageReceiver.cpp; sourceTree = "<group>"; };
 1230 318BE1661473433700A8FBB2 /* WebNotificationManagerProxyMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebNotificationManagerProxyMessages.h; sourceTree = "<group>"; };
 1231 318BE17014743DB100A8FBB2 /* WKNotificationManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKNotificationManager.h; sourceTree = "<group>"; };
 1232 318BE17414743DD600A8FBB2 /* WKNotificationManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKNotificationManager.cpp; sourceTree = "<group>"; };
 1233 318BE17614743E6000A8FBB2 /* WKNotification.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKNotification.cpp; sourceTree = "<group>"; };
 1234 318BE17814743E6A00A8FBB2 /* WKNotification.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WKNotification.h; sourceTree = "<group>"; };
 1235 31C11AB1148452E90049A4CC /* WebNotification.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebNotification.cpp; sourceTree = "<group>"; };
 1236 31C11AB2148452E90049A4CC /* WebNotification.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebNotification.h; sourceTree = "<group>"; };
12031237 31EA25D0134F78B2005B1452 /* NativeWebMouseEventMac.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = NativeWebMouseEventMac.mm; sourceTree = "<group>"; };
12041238 31EA25D3134F78D6005B1452 /* NativeWebMouseEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NativeWebMouseEvent.h; sourceTree = "<group>"; };
12051239 32DBCF5E0370ADEE00C91783 /* WebKit2Prefix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKit2Prefix.h; sourceTree = "<group>"; };

24262460 path = mac;
24272461 sourceTree = "<group>";
24282462 };
 2463 31099974146C8AA80029DEB9 /* Notifications (User) */ = {
 2464 isa = PBXGroup;
 2465 children = (
 2466 31099978146C8B140029DEB9 /* WebNotificationManager.cpp */,
 2467 31099979146C8B140029DEB9 /* WebNotificationManager.h */,
 2468 );
 2469 name = "Notifications (User)";
 2470 sourceTree = "<group>";
 2471 };
24292472 32C88DFF0371C24200C91783 /* Other Sources */ = {
24302473 isa = PBXGroup;
24312474 children = (

25932636 51A9E0FB1315CC0E009E7031 /* KeyValueStorage */,
25942637 1A6FA01C11E1526300DB1371 /* mac */,
25952638 33D3A3BD1339609800709BE4 /* MediaCache */,
 2639 31099974146C8AA80029DEB9 /* Notifications (User) */,
25962640 1A6FB7AA11E64B4900DB1371 /* Plugins */,
25972641 3336762B130C9978006C9DE2 /* ResourceCache */,
25982642 BC032D5D10F437220058C15A /* WebCoreSupport */,

26322676 BC032D6D10F4378D0058C15A /* WebInspectorClient.h */,
26332677 1C8E256B1270DE3800BC7BD0 /* WebInspectorFrontendClient.cpp */,
26342678 1C8E256A1270DE3800BC7BD0 /* WebInspectorFrontendClient.h */,
 2679 31099971146C759B0029DEB9 /* WebNotificationClient.cpp */,
 2680 31099968146C71F50029DEB9 /* WebNotificationClient.h */,
26352681 1A3E736011CC2659007BD539 /* WebPlatformStrategies.cpp */,
26362682 1A3E735F11CC2659007BD539 /* WebPlatformStrategies.h */,
26372683 D3B9484211FF4B6500032B39 /* WebPopupMenu.cpp */,

27822828 33D3A3B91339606200709BE4 /* WebMediaCacheManagerProxy.messages.in */,
27832829 BCF69FA11176D01400471A52 /* WebNavigationData.cpp */,
27842830 BCF69FA01176D01400471A52 /* WebNavigationData.h */,
 2831 31C11AB1148452E90049A4CC /* WebNotification.cpp */,
 2832 31C11AB2148452E90049A4CC /* WebNotification.h */,
 2833 3109996B146C73B10029DEB9 /* WebNotificationManagerProxy.cpp */,
 2834 3109996A146C73920029DEB9 /* WebNotificationManagerProxy.h */,
 2835 3109996D146C73C40029DEB9 /* WebNotificationManagerProxy.messages.in */,
 2836 312C0C46146DDBBC0016C911 /* WebNotificationProvider.cpp */,
 2837 312C0C48146DDBD30016C911 /* WebNotificationProvider.h */,
27852838 BC1DFEA312B31F87005DF730 /* WebOpenPanelResultListenerProxy.cpp */,
27862839 BC1DFEA212B31F87005DF730 /* WebOpenPanelResultListenerProxy.h */,
27872840 5153569A1291B1D2000749DC /* WebPageContextMenuClient.cpp */,

28762929 C09AE5E8125257C20025825D /* WKNativeEvent.h */,
28772930 BCF69FA81176D1CB00471A52 /* WKNavigationData.cpp */,
28782931 BCF69FA71176D1CB00471A52 /* WKNavigationData.h */,
 2932 318BE17614743E6000A8FBB2 /* WKNotification.cpp */,
 2933 318BE17814743E6A00A8FBB2 /* WKNotification.h */,
 2934 318BE17414743DD600A8FBB2 /* WKNotificationManager.cpp */,
 2935 318BE17014743DB100A8FBB2 /* WKNotificationManager.h */,
 2936 312C0C49146DDC8A0016C911 /* WKNotificationProvider.h */,
28792937 BC857FE512B843D800EDEB2E /* WKOpenPanelParameters.cpp */,
28802938 BC857FE412B843D800EDEB2E /* WKOpenPanelParameters.h */,
28812939 BC1DFE8E12B31CA8005DF730 /* WKOpenPanelResultListener.cpp */,

34453503 33D3A3C51339617900709BE4 /* WebMediaCacheManagerMessages.h */,
34463504 33D3A3C61339617900709BE4 /* WebMediaCacheManagerProxyMessageReceiver.cpp */,
34473505 33D3A3C71339617900709BE4 /* WebMediaCacheManagerProxyMessages.h */,
 3506 318BE1651473433700A8FBB2 /* WebNotificationManagerProxyMessageReceiver.cpp */,
 3507 318BE1661473433700A8FBB2 /* WebNotificationManagerProxyMessages.h */,
34483508 C0CE729E1247E71D00BC0EC4 /* WebPageMessageReceiver.cpp */,
34493509 C0CE729F1247E71D00BC0EC4 /* WebPageMessages.h */,
34503510 BCBD3912125BB1A800D2C29F /* WebPageProxyMessageReceiver.cpp */,

39664026 BC4A6292147312BE006C681A /* WebConnectionClient.h in Headers */,
39674027 BC4A6297147313A0006C681A /* WKConnectionRef.h in Headers */,
39684028 3788A05C14743C90006319E5 /* WKBrowsingContextControllerPrivate.h in Headers */,
 4029 3109996F146C741D0029DEB9 /* WebNotificationManagerProxy.h in Headers */,
 4030 3109997B146C8B140029DEB9 /* WebNotificationManager.h in Headers */,
 4031 310999C7146C9E3D0029DEB9 /* WebNotificationClient.h in Headers */,
 4032 312C0C4A146DDC8A0016C911 /* WKNotificationProvider.h in Headers */,
 4033 318BE1681473433700A8FBB2 /* WebNotificationManagerProxyMessages.h in Headers */,
 4034 318BE17114743DB100A8FBB2 /* WKNotificationManager.h in Headers */,
 4035 318BE17914743E6F00A8FBB2 /* WKNotification.h in Headers */,
 4036 31C11AB4148452E90049A4CC /* WebNotification.h in Headers */,
39694037 );
39704038 runOnlyForDeploymentPostprocessing = 0;
39714039 };

46664734 BC4A628F147312BE006C681A /* WebConnection.cpp in Sources */,
46674735 BC4A6291147312BE006C681A /* WebConnectionClient.cpp in Sources */,
46684736 BC4A6296147313A0006C681A /* WKConnectionRef.cpp in Sources */,
 4737 31099970146C74200029DEB9 /* WebNotificationManagerProxy.cpp in Sources */,
 4738 31099973146C75A20029DEB9 /* WebNotificationClient.cpp in Sources */,
 4739 3109997A146C8B140029DEB9 /* WebNotificationManager.cpp in Sources */,
 4740 312C0C47146DDBBD0016C911 /* WebNotificationProvider.cpp in Sources */,
 4741 318BE1671473433700A8FBB2 /* WebNotificationManagerProxyMessageReceiver.cpp in Sources */,
 4742 318BE17514743DD700A8FBB2 /* WKNotificationManager.cpp in Sources */,
 4743 318BE17714743E6000A8FBB2 /* WKNotification.cpp in Sources */,
 4744 31C11AB3148452E90049A4CC /* WebNotification.cpp in Sources */,
46694745 );
46704746 runOnlyForDeploymentPostprocessing = 0;
46714747 };

Source/WebKit2/WebProcess/Notifications/WebNotificationManager.cpp

 1/*
 2 * Copyright (C) 2011 Apple Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 * 1. Redistributions of source code must retain the above copyright
 8 * notice, this list of conditions and the following disclaimer.
 9 * 2. Redistributions in binary form must reproduce the above copyright
 10 * notice, this list of conditions and the following disclaimer in the
 11 * documentation and/or other materials provided with the distribution.
 12 *
 13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
 14 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 15 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
 17 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 18 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 19 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 20 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 21 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 23 * THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#include "config.h"
 27#include "WebNotificationManager.h"
 28
 29#include "WebPage.h"
 30#include "WebProcess.h"
 31
 32#if ENABLE(NOTIFICATIONS)
 33#include "WebNotificationManagerProxyMessages.h"
 34#include <WebCore/Notification.h>
 35#endif
 36
 37using namespace WebCore;
 38
 39namespace WebKit {
 40
 41WebNotificationManager::WebNotificationManager(WebProcess* process)
 42 : m_process(process)
 43{
 44}
 45
 46WebNotificationManager::~WebNotificationManager()
 47{
 48}
 49
 50bool WebNotificationManager::show(Notification* notification, WebPage* page)
 51{
 52#if ENABLE(NOTIFICATIONS)
 53 m_process->connection()->send(Messages::WebNotificationManagerProxy::Show(notification->contents().title, notification->contents().body, 0), page->pageID());
 54#endif
 55 return true;
 56}
 57
 58void WebNotificationManager::cancel(Notification* notification, WebPage* page)
 59{
 60#if ENABLE(NOTIFICATIONS)
 61 m_process->connection()->send(Messages::WebNotificationManagerProxy::Cancel(0), page->pageID());
 62#endif
 63}
 64
 65} // namespace WebKit

Source/WebKit2/WebProcess/Notifications/WebNotificationManager.h

 1/*
 2 * Copyright (C) 2011 Apple Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 * 1. Redistributions of source code must retain the above copyright
 8 * notice, this list of conditions and the following disclaimer.
 9 * 2. Redistributions in binary form must reproduce the above copyright
 10 * notice, this list of conditions and the following disclaimer in the
 11 * documentation and/or other materials provided with the distribution.
 12 *
 13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
 14 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 15 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
 17 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 18 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 19 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 20 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 21 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 23 * THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#ifndef WebNotificationManager_h
 27#define WebNotificationManager_h
 28
 29#include <wtf/Noncopyable.h>
 30
 31namespace WebCore {
 32class Notification;
 33} // namespace WebCore
 34
 35namespace WebKit {
 36
 37class WebPage;
 38class WebProcess;
 39
 40class WebNotificationManager {
 41 WTF_MAKE_NONCOPYABLE(WebNotificationManager);
 42public:
 43 explicit WebNotificationManager(WebProcess*);
 44 ~WebNotificationManager();
 45
 46 bool show(WebCore::Notification*, WebPage*);
 47 void cancel(WebCore::Notification*, WebPage*);
 48
 49private:
 50 WebProcess* m_process;
 51};
 52
 53} // namespace WebKit
 54
 55#endif

Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp

@@void WebChromeClient::scheduleCompositingLayerSync()
693693
694694#endif
695695
696 #if ENABLE(NOTIFICATIONS)
697 WebCore::NotificationPresenter* WebChromeClient::notificationPresenter() const
698 {
699  return 0;
700 }
701 #endif
702 
703696#if ENABLE(TOUCH_EVENTS)
704697void WebChromeClient::needTouchEvents(bool needTouchEvents)
705698{

Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h

@@private:
183183 virtual void scheduleCompositingLayerSync() OVERRIDE;
184184#endif
185185
186 #if ENABLE(NOTIFICATIONS)
187  virtual WebCore::NotificationPresenter* notificationPresenter() const OVERRIDE;
188 #endif
189 
190186#if ENABLE(TOUCH_EVENTS)
191187 virtual void needTouchEvents(bool) OVERRIDE;
192188#endif

Source/WebKit2/WebProcess/WebCoreSupport/WebNotificationClient.cpp

 1/*
 2 * Copyright (C) 2011 Apple Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 * 1. Redistributions of source code must retain the above copyright
 8 * notice, this list of conditions and the following disclaimer.
 9 * 2. Redistributions in binary form must reproduce the above copyright
 10 * notice, this list of conditions and the following disclaimer in the
 11 * documentation and/or other materials provided with the distribution.
 12 *
 13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
 14 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 15 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
 17 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 18 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 19 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 20 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 21 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 23 * THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#include "config.h"
 27#include "WebNotificationClient.h"
 28
 29#if ENABLE(NOTIFICATIONS)
 30
 31#include "WebNotificationManager.h"
 32#include "WebProcess.h"
 33#include <WebCore/NotImplemented.h>
 34
 35using namespace WebCore;
 36
 37namespace WebKit {
 38
 39WebNotificationClient::WebNotificationClient(WebPage* page)
 40 : m_page(page)
 41{
 42}
 43
 44WebNotificationClient::~WebNotificationClient()
 45{
 46}
 47
 48bool WebNotificationClient::show(Notification* notification)
 49{
 50#if ENABLE(NOTIFICATIONS)
 51 return WebProcess::shared().notificationManager().show(notification, m_page);
 52#else
 53 notImplemented();
 54 return false;
 55#endif
 56}
 57
 58void WebNotificationClient::cancel(Notification* notification)
 59{
 60#if ENABLE(NOTIFICATIONS)
 61 WebProcess::shared().notificationManager().cancel(notification, m_page);
 62#else
 63 notImplemented();
 64#endif
 65}
 66
 67void WebNotificationClient::notificationObjectDestroyed(Notification*)
 68{
 69 notImplemented();
 70}
 71
 72void WebNotificationClient::requestPermission(ScriptExecutionContext*, PassRefPtr<VoidCallback>)
 73{
 74 notImplemented();
 75}
 76
 77void WebNotificationClient::cancelRequestsForPermission(ScriptExecutionContext*)
 78{
 79 notImplemented();
 80}
 81
 82NotificationPresenter::Permission WebNotificationClient::checkPermission(ScriptExecutionContext*)
 83{
 84 notImplemented();
 85 return NotificationPresenter::PermissionDenied;
 86}
 87
 88} // namespace WebKit
 89
 90#endif // ENABLE(NOTIFICATIONS)

Source/WebKit2/WebProcess/WebCoreSupport/WebNotificationClient.h

 1/*
 2 * Copyright (C) 2011 Apple Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 * 1. Redistributions of source code must retain the above copyright
 8 * notice, this list of conditions and the following disclaimer.
 9 * 2. Redistributions in binary form must reproduce the above copyright
 10 * notice, this list of conditions and the following disclaimer in the
 11 * documentation and/or other materials provided with the distribution.
 12 *
 13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
 14 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 15 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
 17 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 18 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 19 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 20 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 21 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 23 * THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#ifndef WebNotificationClient_h
 27#define WebNotificationClient_h
 28
 29#if ENABLE(NOTIFICATIONS)
 30
 31#include <WebCore/NotificationPresenter.h>
 32
 33namespace WebCore {
 34class ScriptExecutionContext;
 35class VoidCallback;
 36} // namespace WebCore
 37
 38namespace WebKit {
 39
 40class WebPage;
 41
 42class WebNotificationClient : public WebCore::NotificationPresenter {
 43public:
 44 WebNotificationClient(WebPage*);
 45 virtual ~WebNotificationClient();
 46
 47private:
 48 virtual bool show(WebCore::Notification*) OVERRIDE;
 49 virtual void cancel(WebCore::Notification*) OVERRIDE;
 50 virtual void notificationObjectDestroyed(WebCore::Notification*) OVERRIDE;
 51 virtual void requestPermission(WebCore::ScriptExecutionContext*, PassRefPtr<WebCore::VoidCallback>) OVERRIDE;
 52 virtual void cancelRequestsForPermission(WebCore::ScriptExecutionContext*) OVERRIDE;
 53 virtual NotificationPresenter::Permission checkPermission(WebCore::ScriptExecutionContext*) OVERRIDE;
 54
 55 WebPage* m_page;
 56};
 57
 58} // namespace WebKit
 59
 60#endif // ENABLE(NOTIFICATIONS)
 61
 62#endif // WebNotificationClient_h

Source/WebKit2/WebProcess/WebPage/WebPage.cpp

6161#include "WebImage.h"
6262#include "WebInspector.h"
6363#include "WebInspectorClient.h"
 64#include "WebNotificationClient.h"
6465#include "WebOpenPanelResultListener.h"
6566#include "WebPageCreationParameters.h"
6667#include "WebPageGroupProxy.h"

@@WebPage::WebPage(uint64_t pageID, const WebPageCreationParameters& parameters)
216217#if ENABLE(INSPECTOR)
217218 pageClients.inspectorClient = new WebInspectorClient(this);
218219#endif
 220#if ENABLE(NOTIFICATIONS)
 221 pageClients.notificationClient = new WebNotificationClient(this);
 222#endif
 223
219224 m_page = adoptPtr(new Page(pageClients));
220225
221226 // Qt does not yet call setIsInWindow. Until it does, just leave

Source/WebKit2/WebProcess/WebPage/WebPage.h

@@class WebImage;
114114class WebInspector;
115115class WebKeyboardEvent;
116116class WebMouseEvent;
 117class WebNotificationClient;
117118class WebOpenPanelResultListener;
118119class WebPageGroupProxy;
119120class WebPopupMenu;

Source/WebKit2/WebProcess/WebProcess.cpp

@@WebProcess::WebProcess()
140140#endif
141141 , m_textCheckerState()
142142 , m_geolocationManager(this)
 143#if ENABLE(NOTIFICATIONS)
 144 , m_notificationManager(this)
 145#endif
143146 , m_iconDatabaseProxy(this)
144147#if ENABLE(PLUGIN_PROCESS)
145148 , m_disablePluginProcessMessageTimeout(false)

Source/WebKit2/WebProcess/WebProcess.h

4646class QNetworkAccessManager;
4747#endif
4848
 49#if ENABLE(NOTIFICATIONS)
 50#include "WebNotificationManager.h"
 51#endif
 52
4953#if ENABLE(PLUGIN_PROCESS)
5054#include "PluginProcessConnectionManager.h"
5155#endif

@@public:
119123
120124 // Geolocation
121125 WebGeolocationManager& geolocationManager() { return m_geolocationManager; }
 126
 127#if ENABLE(NOTIFICATIONS)
 128 WebNotificationManager& notificationManager() { return m_notificationManager; }
 129#endif
122130
123131 void clearResourceCaches(ResourceCachesToClear = AllResourceCaches);
124132

@@private:
241249
242250 TextCheckerState m_textCheckerState;
243251 WebGeolocationManager m_geolocationManager;
 252#if ENABLE(NOTIFICATIONS)
 253 WebNotificationManager m_notificationManager;
 254#endif
244255 WebIconDatabaseProxy m_iconDatabaseProxy;
245256
246257 String m_localStorageDirectory;

Source/WebKit2/win/WebKit2.vcproj

699699 >
700700 </File>
701701 <File
702  RelativePath="..\Shared\WebImage.cpp"
 702 RelativePath="..\Shared\WebHitTestResult.cpp"
703703 >
704704 </File>
705705 <File
706  RelativePath="..\Shared\WebImage.h"
 706 RelativePath="..\Shared\WebHitTestResult.h"
707707 >
708708 </File>
709709 <File
710  RelativePath="..\Shared\WebHitTestResult.cpp"
 710 RelativePath="..\Shared\WebImage.cpp"
711711 >
712712 </File>
713713 <File
714  RelativePath="..\Shared\WebHitTestResult.h"
 714 RelativePath="..\Shared\WebImage.h"
715715 >
716716 </File>
717717 <File

854854 >
855855 </File>
856856 <File
857  RelativePath="..\Shared\API\c\WKConnectionRef.cpp"
 857 RelativePath="..\Shared\API\c\win\WKCertificateInfoWin.cpp"
858858 >
859859 </File>
860860 <File
861  RelativePath="..\Shared\API\c\WKConnectionRef.h"
 861 RelativePath="..\Shared\API\c\win\WKCertificateInfoWin.h"
862862 >
863863 </File>
864864 <File
865  RelativePath="..\Shared\API\c\win\WKCertificateInfoWin.cpp"
 865 RelativePath="..\Shared\API\c\WKConnectionRef.cpp"
866866 >
867867 </File>
868868 <File
869  RelativePath="..\Shared\API\c\win\WKCertificateInfoWin.h"
 869 RelativePath="..\Shared\API\c\WKConnectionRef.h"
870870 >
871871 </File>
872872 <File

914914 >
915915 </File>
916916 <File
917  RelativePath="..\Shared\API\c\WKGeometry.h"
 917 RelativePath="..\Shared\API\c\WKGeometry.cpp"
918918 >
919919 </File>
920920 <File
921  RelativePath="..\Shared\API\c\WKGeometry.cpp"
 921 RelativePath="..\Shared\API\c\WKGeometry.h"
922922 >
923923 </File>
924924 <File

18621862 >
18631863 </File>
18641864 <File
 1865 RelativePath="..\WebProcess\WebCoreSupport\WebNotificationClient.cpp"
 1866 >
 1867 </File>
 1868 <File
 1869 RelativePath="..\WebProcess\WebCoreSupport\WebNotificationClient.h"
 1870 >
 1871 </File>
 1872 <File
18651873 RelativePath="..\WebProcess\WebCoreSupport\WebPlatformStrategies.cpp"
18661874 >
18671875 </File>

26822690 </File>
26832691 </Filter>
26842692 </Filter>
 2693 <Filter
 2694 Name="Notifications (User)"
 2695 >
 2696 <File
 2697 RelativePath="..\WebProcess\Notifications\WebNotificationManager.cpp"
 2698 >
 2699 </File>
 2700 <File
 2701 RelativePath="..\WebProcess\Notifications\WebNotificationManager.h"
 2702 >
 2703 </File>
 2704 </Filter>
26852705 </Filter>
26862706 <Filter
26872707 Name="UIProcess"

30393059 >
30403060 </File>
30413061 <File
 3062 RelativePath="..\UIProcess\WebNotification.cpp"
 3063 >
 3064 </File>
 3065 <File
 3066 RelativePath="..\UIProcess\WebNotification.h"
 3067 >
 3068 </File>
 3069 <File
 3070 RelativePath="..\UIProcess\WebNotificationManagerProxy.cpp"
 3071 >
 3072 </File>
 3073 <File
 3074 RelativePath="..\UIProcess\WebNotificationManagerProxy.h"
 3075 >
 3076 </File>
 3077 <File
 3078 RelativePath="..\UIProcess\WebNotificationManagerProxy.messages.in"
 3079 >
 3080 </File>
 3081 <File
 3082 RelativePath="..\UIProcess\WebNotificationProvider.cpp"
 3083 >
 3084 </File>
 3085 <File
 3086 RelativePath="..\UIProcess\WebNotificationProvider.h"
 3087 >
 3088 </File>
 3089 <File
30423090 RelativePath="..\UIProcess\WebOpenPanelResultListenerProxy.cpp"
30433091 >
30443092 </File>

33053353 >
33063354 </File>
33073355 <File
3308  RelativePath="..\UIProcess\API\C\WKHitTestResult.cpp"
 3356 RelativePath="..\UIProcess\API\C\WKGrammarDetail.cpp"
33093357 >
33103358 </File>
33113359 <File
3312  RelativePath="..\UIProcess\API\C\WKHitTestResult.h"
 3360 RelativePath="..\UIProcess\API\C\WKGrammarDetail.h"
33133361 >
33143362 </File>
33153363 <File
3316  RelativePath="..\UIProcess\API\C\WKGrammarDetail.cpp"
 3364 RelativePath="..\UIProcess\API\C\WKHitTestResult.cpp"
33173365 >
33183366 </File>
33193367 <File
3320  RelativePath="..\UIProcess\API\C\WKGrammarDetail.h"
 3368 RelativePath="..\UIProcess\API\C\WKHitTestResult.h"
33213369 >
33223370 </File>
33233371 <File

33653413 >
33663414 </File>
33673415 <File
 3416 RelativePath="..\UIProcess\API\C\WKNotification.cpp"
 3417 >
 3418 </File>
 3419 <File
 3420 RelativePath="..\UIProcess\API\C\WKNotification.h"
 3421 >
 3422 </File>
 3423 <File
 3424 RelativePath="..\UIProcess\API\C\WKNotificationManager.cpp"
 3425 >
 3426 </File>
 3427 <File
 3428 RelativePath="..\UIProcess\API\C\WKNotificationManager.h"
 3429 >
 3430 </File>
 3431 <File
 3432 RelativePath="..\UIProcess\API\C\WKNotificationProvider.h"
 3433 >
 3434 </File>
 3435 <File
33683436 RelativePath="..\UIProcess\API\C\WKOpenPanelParameters.cpp"
33693437 >
33703438 </File>

42114279 >
42124280 </File>
42134281 <File
 4282 RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\WebNotificationManagerProxyMessageReceiver.cpp"
 4283 >
 4284 </File>
 4285 <File
 4286 RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\WebNotificationManagerProxyMessages.h"
 4287 >
 4288 </File>
 4289 <File
42144290 RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\WebPageMessageReceiver.cpp"
42154291 >
42164292 </File>