JavaScriptCore/ChangeLog

 12009-07-06 John Gregg <johnnyg@google.com>
 2
 3 Reviewed by NOBODY (OOPS!).
 4
 5 Desktop Notifications API
 6 https://bugs.webkit.org/show_bug.cgi?id=25463
 7
 8 Adds ENABLE_NOTIFICATION flag.
 9
 10 * Configurations/FeatureDefines.xcconfig:
 11 * wtf/Platform.h:
 12
1132009-07-06 Ada Chan <adachan@apple.com>
214
315 Reviewed by Darin Adler and Mark Rowe.
45576

JavaScriptCore/Configurations/FeatureDefines.xcconfig

@@ENABLE_FILTERS = ;
3737ENABLE_GEOLOCATION = ;
3838ENABLE_ICONDATABASE = ENABLE_ICONDATABASE;
3939ENABLE_JAVASCRIPT_DEBUGGER = ENABLE_JAVASCRIPT_DEBUGGER;
 40ENABLE_NOTIFICATIONS = ;
4041ENABLE_OFFLINE_WEB_APPLICATIONS = ENABLE_OFFLINE_WEB_APPLICATIONS;
4142ENABLE_SVG = ENABLE_SVG;
4243ENABLE_SVG_ANIMATION = ENABLE_SVG_ANIMATION;

@@ENABLE_WORKERS = ENABLE_WORKERS;
5152ENABLE_XPATH = ENABLE_XPATH;
5253ENABLE_XSLT = ENABLE_XSLT;
5354
54 FEATURE_DEFINES = $(ENABLE_3D_RENDERING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_DATABASE) $(ENABLE_DOM_STORAGE) $(ENABLE_FILTERS) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(ENABLE_SVG) $(ENABLE_SVG_ANIMATION) $(ENABLE_SVG_AS_IMAGE) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_FOREIGN_OBJECT) $(ENABLE_SVG_USE) $(ENABLE_VIDEO) $(ENABLE_WML) $(ENABLE_WORKERS) $(ENABLE_XPATH) $(ENABLE_XSLT);
 55FEATURE_DEFINES = $(ENABLE_3D_RENDERING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_DATABASE) $(ENABLE_DOM_STORAGE) $(ENABLE_FILTERS) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(ENABLE_SVG) $(ENABLE_SVG_ANIMATION) $(ENABLE_SVG_AS_IMAGE) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_FOREIGN_OBJECT) $(ENABLE_SVG_USE) $(ENABLE_VIDEO) $(ENABLE_WML) $(ENABLE_WORKERS) $(ENABLE_XPATH) $(ENABLE_XSLT);
45574

JavaScriptCore/wtf/Platform.h

514514#define ENABLE_GEOLOCATION 0
515515#endif
516516
 517#if !defined(ENABLE_NOTIFICATIONS)
 518#define ENABLE_NOTIFICATIONS 0
 519#endif
 520
517521#if !defined(ENABLE_TEXT_CARET)
518522#define ENABLE_TEXT_CARET 1
519523#endif
45574

WebCore/ChangeLog

 12009-07-06 John Gregg <johnnyg@google.com>
 2
 3 Reviewed by NOBODY (OOPS!).
 4
 5 Desktop Notifications API
 6 https://bugs.webkit.org/show_bug.cgi?id=25463
 7
 8 Adds an implementation of desktop notifications, behind the compile-time
 9 flag ENABLE(NOTIFICATIONS). This code simply relays calls on the JavaScript
 10 API through a NotificationProvider interface, which must provide the services
 11 to actually notify the user and manage the desktop. This provider is injected
 12 into WebKit through the ChromeClient for normal page contexts and through the
 13 WorkerThread for worker contexts.
 14
 15 A permissions API is defined on a per-origin basis, which allows a web page
 16 to check if its origin is allowed to show desktop notifications, and to request
 17 permission for its origin.
 18
 19 * Configurations/FeatureDefines.xcconfig:
 20 * DerivedSources.cpp:
 21 * DerivedSources.make:
 22 * GNUmakefile.am:
 23 * WebCore.vcproj/WebCore.vcproj:
 24 * WebCore.vcproj/WebCoreCommon.vsprops:
 25 * WebCore.xcodeproj/project.pbxproj:
 26 * bindings/js/JSDOMWindowCustom.cpp:
 27 (WebCore::JSDOMWindow::notifications):
 28 * bindings/js/JSDesktopNotificationsCustom.cpp: Added.
 29 (WebCore::JSNotificationCenter::createHTMLNotification):
 30 (WebCore::JSNotificationCenter::createNotification):
 31 (WebCore::JSNotificationCenter::checkPermission):
 32 (WebCore::JSNotificationCenter::requestPermission):
 33 * loader/EmptyClients.h:
 34 (WebCore::EmptyChromeClient::notificationProvider):
 35 * notifications: Added.
 36 * notifications/Notification.cpp: Added.
 37 (WebCore::Notification::Notification):
 38 (WebCore::Notification::~Notification):
 39 (WebCore::Notification::show):
 40 (WebCore::Notification::cancel):
 41 (WebCore::Notification::dispatchDisplayEvent):
 42 (WebCore::Notification::dispatchErrorEvent):
 43 (WebCore::Notification::dispatchCloseEvent):
 44 (WebCore::Notification::addEventListener):
 45 (WebCore::Notification::removeEventListener):
 46 (WebCore::Notification::dispatchEvent):
 47 (WebCore::Notification::display):
 48 (WebCore::Notification::error):
 49 (WebCore::Notification::close):
 50 * notifications/Notification.h: Added.
 51 (WebCore::Notification::create):
 52 (WebCore::Notification::isHTML):
 53 (WebCore::Notification::url):
 54 (WebCore::Notification::contents):
 55 (WebCore::Notification::ondisplay):
 56 (WebCore::Notification::setOndisplay):
 57 (WebCore::Notification::onerror):
 58 (WebCore::Notification::setOnerror):
 59 (WebCore::Notification::onclose):
 60 (WebCore::Notification::setOnclose):
 61 (WebCore::Notification::scriptExecutionContext):
 62 (WebCore::Notification::refEventTarget):
 63 (WebCore::Notification::derefEventTarget):
 64 * notifications/Notification.idl: Added.
 65 * notifications/NotificationCenter.cpp: Added.
 66 (WebCore::NotificationCenter::NotificationCenter):
 67 (WebCore::NotificationCenter::checkPermission):
 68 (WebCore::NotificationCenter::requestPermission):
 69 * notifications/NotificationCenter.h: Added.
 70 (WebCore::NotificationCenter::create):
 71 (WebCore::NotificationCenter::createHTMLNotification):
 72 (WebCore::NotificationCenter::createNotification):
 73 (WebCore::NotificationCenter::context):
 74 (WebCore::NotificationCenter::provider):
 75 * notifications/NotificationCenter.idl: Added.
 76 * notifications/NotificationContents.h: Added.
 77 (WebCore::NotificationContents::NotificationContents):
 78 (WebCore::NotificationContents::icon):
 79 (WebCore::NotificationContents::title):
 80 (WebCore::NotificationContents::body):
 81 * notifications/NotificationProvider.h: Added.
 82 (WebCore::NotificationProvider::):
 83 (WebCore::NotificationProvider::~NotificationProvider):
 84 * page/Chrome.cpp:
 85 (WebCore::Chrome::notificationProvider):
 86 * page/Chrome.h:
 87 * page/ChromeClient.h:
 88 * page/DOMWindow.cpp:
 89 (WebCore::DOMWindow::clear):
 90 (WebCore::DOMWindow::webkitNotifications):
 91 * page/DOMWindow.h:
 92 * page/DOMWindow.idl:
 93 * page/Page.h:
 94 * workers/WorkerContext.cpp:
 95 (WebCore::WorkerContext::~WorkerContext):
 96 (WebCore::WorkerContext::webkitNotifications):
 97 * workers/WorkerContext.h:
 98 * workers/WorkerContext.idl:
 99 * workers/WorkerThread.h:
 100 (WebCore::WorkerThread::getNotificationProvider):
 101 (WebCore::WorkerThread::setNotificationProvider):
 102
11032009-07-06 Eric Carlson <eric.carlson@apple.com>
2104
3105 Reviewed by Simon Fraser.
45576

WebCore/DerivedSources.cpp

162162#include "JSNodeIterator.cpp"
163163#include "JSNodeList.cpp"
164164#include "JSNotation.cpp"
 165#include "JSNotificationCenter.cpp"
 166#include "JSNotification.cpp"
165167#include "JSOverflowEvent.cpp"
166168#include "JSPlugin.cpp"
167169#include "JSPluginArray.cpp"
45574

WebCore/DerivedSources.make

@@VPATH = \
3434 $(WebCore)/html \
3535 $(WebCore)/inspector \
3636 $(WebCore)/loader/appcache \
 37 $(WebCore)/notifications \
3738 $(WebCore)/page \
3839 $(WebCore)/plugins \
3940 $(WebCore)/storage \

@@DOM_CLASSES = \
188189 NodeIterator \
189190 NodeList \
190191 Notation \
 192 Notification \
 193 NotificationCenter \
191194 OverflowEvent \
192195 Plugin \
193196 PluginArray \

@@endif
678681# JavaScript bindings
679682
680683GENERATE_BINDINGS = perl -I $(WebCore)/bindings/scripts $(WebCore)/bindings/scripts/generate-bindings.pl \
681  --include dom --include html --include css --include page --include xml --include svg --outputDir .
 684 --include dom --include html --include css --include page --include notifications --include xml --include svg --outputDir .
682685
683686GENERATE_BINDINGS_SCRIPTS = \
684687 bindings/scripts/CodeGenerator.pm \
45574

WebCore/GNUmakefile.am

@@webcore_cppflags += \
2525 -I$(srcdir)/WebCore/loader/appcache \
2626 -I$(srcdir)/WebCore/loader/archive \
2727 -I$(srcdir)/WebCore/loader/icon \
 28 -I$(srcdir)/WebCore/notifications \
2829 -I$(srcdir)/WebCore/page \
2930 -I$(srcdir)/WebCore/page/animation \
3031 -I$(srcdir)/WebCore/platform \

@@IDL_BINDINGS += \
231232 WebCore/html/VoidCallback.idl \
232233 WebCore/inspector/JavaScriptCallFrame.idl \
233234 WebCore/inspector/InspectorController.idl \
 235 WebCore/notifications/Notification.idl \
 236 WebCore/notifications/NotificationCenter.idl \
234237 WebCore/page/BarInfo.idl \
235238 WebCore/page/Console.idl \
236239 WebCore/page/Coordinates.idl \

@@webcoregtk_sources += \
24282431 WebCore/platform/gtk/GeolocationServiceGtk.h
24292432endif # END ENABLE_GEOLOCATION
24302433
 2434# ----
 2435# Notifications support
 2436# ----
 2437if ENABLE_NOTIFICATIONS
 2438FEATURE_DEFINES_JAVASCRIPT += ENABLE_NOTIFICATIONS=1
 2439
 2440webcore_cppflags += \
 2441 -DENABLE_NOTIFICATIONS=1
 2442
 2443webcore_sources += \
 2444 WebCore/notifications/Notification.cpp \
 2445 WebCore/notifications/Notification.h \
 2446 WebCore/notifications/NotificationCenter.cpp \
 2447 WebCore/notifications/NotificationCenter.h \
 2448 WebCore/notifications/NotificationProvider.h \
 2449 WebCore/notifications/NotificationContents.h
 2450
 2451endif # END ENABLE_NOTIFICATIONS
24312452
24322453# ----
24332454# SVG Support
45574

WebCore/Configurations/FeatureDefines.xcconfig

@@ENABLE_FILTERS = ;
3838ENABLE_GEOLOCATION = ;
3939ENABLE_ICONDATABASE = ENABLE_ICONDATABASE;
4040ENABLE_JAVASCRIPT_DEBUGGER = ENABLE_JAVASCRIPT_DEBUGGER;
 41ENABLE_NOTIFICATIONS = ;
4142ENABLE_OFFLINE_WEB_APPLICATIONS = ENABLE_OFFLINE_WEB_APPLICATIONS;
4243ENABLE_SVG = ENABLE_SVG;
4344ENABLE_SVG_ANIMATION = ENABLE_SVG_ANIMATION;

@@ENABLE_WORKERS = ENABLE_WORKERS;
5253ENABLE_XPATH = ENABLE_XPATH;
5354ENABLE_XSLT = ENABLE_XSLT;
5455
55 FEATURE_DEFINES = $(ENABLE_3D_RENDERING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_DATABASE) $(ENABLE_DATAGRID) $(ENABLE_DOM_STORAGE) $(ENABLE_FILTERS) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(ENABLE_SVG) $(ENABLE_SVG_ANIMATION) $(ENABLE_SVG_AS_IMAGE) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_FOREIGN_OBJECT) $(ENABLE_SVG_USE) $(ENABLE_VIDEO) $(ENABLE_WML) $(ENABLE_WORKERS) $(ENABLE_XPATH) $(ENABLE_XSLT);
 56FEATURE_DEFINES = $(ENABLE_3D_RENDERING) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_DATABASE) $(ENABLE_DATAGRID) $(ENABLE_DOM_STORAGE) $(ENABLE_FILTERS) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(ENABLE_SVG) $(ENABLE_SVG_ANIMATION) $(ENABLE_SVG_AS_IMAGE) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_FOREIGN_OBJECT) $(ENABLE_SVG_USE) $(ENABLE_VIDEO) $(ENABLE_WML) $(ENABLE_WORKERS) $(ENABLE_XPATH) $(ENABLE_XSLT);
 57
45574

WebCore/WebCore.vcproj/WebCore.vcproj

6767 />
6868 <Tool
6969 Name="VCPostBuildEventTool"
70  CommandLine="mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\bindings&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\parser&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\runtime&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\masm&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\pcre&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\profiler&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wrec&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode\icu&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\config.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\obj\WebCore\DerivedSources\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\accessibility\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\accessibility\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\inspector\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\appcache\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\archive\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\archive\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\icon\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\history\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\history\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\html\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\css\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\animation\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\transforms\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\opentype\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\text\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\network\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\network\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\network\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\sql\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\cairo\cairo\src\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\bindings\js\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\page\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\page\animation\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\page\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\bridge\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\plugins\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\plugins\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\rendering\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\rendering\style\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\editing\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\dom\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\xml\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\svg\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\storage\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\workers\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\bindings\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\bindings&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\parser\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\parser&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\runtime\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\runtime&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\masm\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\masm&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\pcre\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\pcre&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\profiler\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\profiler&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wrec\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wrec&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\unicode\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\unicode\icu\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode\icu&quot;&#x0D;&#x0A;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\bin\WebKit.resources\inspector&quot;&#x0D;&#x0A;xcopy /y /d /s /exclude:xcopy.excludes &quot;$(ProjectDir)\..\inspector\front-end\*&quot; &quot;$(WebKitOutputDir)\bin\WebKit.resources\inspector&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\bin\WebKit.resources\en.lproj&quot;&#x0D;&#x0A;xcopy /y /d /s /exclude:xcopy.excludes &quot;$(ProjectDir)\..\English.lproj\localizedStrings.js&quot; &quot;$(WebKitOutputDir)\bin\WebKit.resources\en.lproj&quot;&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
 70 CommandLine="mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\bindings&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\parser&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\runtime&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\masm&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\pcre&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\profiler&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wrec&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode\icu&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\config.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\obj\WebCore\DerivedSources\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\accessibility\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\accessibility\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\inspector\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\appcache\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\archive\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\archive\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\icon\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\history\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\history\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\html\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\notifications\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\css\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\animation\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\transforms\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\opentype\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\text\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\network\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\network\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\network\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\sql\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\cairo\cairo\src\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\bindings\js\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\page\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\page\animation\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\page\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\bridge\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\plugins\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\plugins\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\rendering\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\rendering\style\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\editing\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\dom\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\xml\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\svg\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\storage\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\workers\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\bindings\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\bindings&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\parser\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\parser&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\runtime\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\runtime&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\masm\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\masm&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\pcre\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\pcre&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\profiler\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\profiler&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wrec\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wrec&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\unicode\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\unicode\icu\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode\icu&quot;&#x0D;&#x0A;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\bin\WebKit.resources\inspector&quot;&#x0D;&#x0A;xcopy /y /d /s /exclude:xcopy.excludes &quot;$(ProjectDir)\..\inspector\front-end\*&quot; &quot;$(WebKitOutputDir)\bin\WebKit.resources\inspector&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\bin\WebKit.resources\en.lproj&quot;&#x0D;&#x0A;xcopy /y /d /s /exclude:xcopy.excludes &quot;$(ProjectDir)\..\English.lproj\localizedStrings.js&quot; &quot;$(WebKitOutputDir)\bin\WebKit.resources\en.lproj&quot;&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(WebKitOutputDir)\buildfailed&quot; del &quot;$(WebKitOutputDir)\buildfailed&quot;&#x0D;&#x0A;"
7171 />
7272 </Configuration>
7373 <Configuration

71907190 >
71917191 </File>
71927192 <File
 7193 RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSNotification.cpp"
 7194 >
 7195 <FileConfiguration
 7196 Name="Debug|Win32"
 7197 ExcludedFromBuild="true"
 7198 >
 7199 <Tool
 7200 Name="VCCLCompilerTool"
 7201 />
 7202 </FileConfiguration>
 7203 <FileConfiguration
 7204 Name="Release|Win32"
 7205 ExcludedFromBuild="true"
 7206 >
 7207 <Tool
 7208 Name="VCCLCompilerTool"
 7209 />
 7210 </FileConfiguration>
 7211 <FileConfiguration
 7212 Name="Debug_Internal|Win32"
 7213 ExcludedFromBuild="true"
 7214 >
 7215 <Tool
 7216 Name="VCCLCompilerTool"
 7217 />
 7218 </FileConfiguration>
 7219 <FileConfiguration
 7220 Name="Debug_Cairo|Win32"
 7221 ExcludedFromBuild="true"
 7222 >
 7223 <Tool
 7224 Name="VCCLCompilerTool"
 7225 />
 7226 </FileConfiguration>
 7227 <FileConfiguration
 7228 Name="Release_Cairo|Win32"
 7229 ExcludedFromBuild="true"
 7230 >
 7231 <Tool
 7232 Name="VCCLCompilerTool"
 7233 />
 7234 </FileConfiguration>
 7235 </File>
 7236 <File
 7237 RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSNotification.h"
 7238 >
 7239 </File>
 7240 <File
 7241 RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSNotificationCenter.cpp"
 7242 >
 7243 <FileConfiguration
 7244 Name="Debug|Win32"
 7245 ExcludedFromBuild="true"
 7246 >
 7247 <Tool
 7248 Name="VCCLCompilerTool"
 7249 />
 7250 </FileConfiguration>
 7251 <FileConfiguration
 7252 Name="Release|Win32"
 7253 ExcludedFromBuild="true"
 7254 >
 7255 <Tool
 7256 Name="VCCLCompilerTool"
 7257 />
 7258 </FileConfiguration>
 7259 <FileConfiguration
 7260 Name="Debug_Internal|Win32"
 7261 ExcludedFromBuild="true"
 7262 >
 7263 <Tool
 7264 Name="VCCLCompilerTool"
 7265 />
 7266 </FileConfiguration>
 7267 <FileConfiguration
 7268 Name="Debug_Cairo|Win32"
 7269 ExcludedFromBuild="true"
 7270 >
 7271 <Tool
 7272 Name="VCCLCompilerTool"
 7273 />
 7274 </FileConfiguration>
 7275 <FileConfiguration
 7276 Name="Release_Cairo|Win32"
 7277 ExcludedFromBuild="true"
 7278 >
 7279 <Tool
 7280 Name="VCCLCompilerTool"
 7281 />
 7282 </FileConfiguration>
 7283 </File>
 7284 <File
 7285 RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSNotificationCenter.h"
 7286 >
 7287 </File>
 7288 <File
71937289 RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSOverflowEvent.cpp"
71947290 >
71957291 <FileConfiguration

2383223928 </File>
2383323929 </Filter>
2383423930 <Filter
 23931 Name="notifications"
 23932 >
 23933 <File
 23934 RelativePath="..\notifications\Notification.cpp"
 23935 >
 23936 </File>
 23937 <File
 23938 RelativePath="..\notifications\Notification.h"
 23939 >
 23940 </File>
 23941 <File
 23942 RelativePath="..\notifications\NotificationCenter.cpp"
 23943 >
 23944 </File>
 23945 <File
 23946 RelativePath="..\notifications\NotificationCenter.h"
 23947 >
 23948 </File>
 23949 <File
 23950 RelativePath="..\notifications\NotificationContents.h"
 23951 >
 23952 </File>
 23953 <File
 23954 RelativePath="..\notifications\NotificationProvider.h"
 23955 >
 23956 </File>
 23957 </Filter>
 23958 <Filter
2383523959 Name="editing"
2383623960 >
2383723961 <File

2806628190 >
2806728191 </File>
2806828192 <File
 28193 RelativePath="..\bindings\js\JSDesktopNotificationsCustom.cpp"
 28194 >
 28195 </File>
 28196 <File
2806928197 RelativePath="..\bindings\js\JSDocumentCustom.cpp"
2807028198 >
2807128199 </File>
45574

WebCore/WebCore.vcproj/WebCoreCommon.vsprops

77 >
88 <Tool
99 Name="VCCLCompilerTool"
10  AdditionalIncludeDirectories="&quot;$(ProjectDir)..\&quot;;&quot;$(ProjectDir)..&quot;;&quot;$(ProjectDir)..\accessibility&quot;;&quot;$(ProjectDir)..\accessibility\win&quot;;&quot;$(ProjectDir)..\bridge&quot;;&quot;$(ProjectDir)..\bridge\c&quot;;&quot;$(ProjectDir)..\css&quot;;&quot;$(ProjectDir)..\editing&quot;;&quot;$(ProjectDir)..\rendering&quot;;&quot;$(ProjectDir)..\rendering\style&quot;;&quot;$(ProjectDir)..\bindings\js&quot;;&quot;$(ProjectDir)..\dom&quot;;&quot;$(ProjectDir)..\dom\default&quot;;&quot;$(ProjectDir)..\history&quot;;&quot;$(ProjectDir)..\html&quot;;&quot;$(ProjectDir)..\inspector&quot;;&quot;$(ProjectDir)..\loader&quot;;&quot;$(ProjectDir)..\loader\appcache&quot;;&quot;$(ProjectDir)..\loader\archive&quot;;&quot;$(ProjectDir)..\loader\archive\cf&quot;;&quot;$(ProjectDir)..\loader\icon&quot;;&quot;$(ProjectDir)..\page&quot;;&quot;$(ProjectDir)..\page\animation&quot;;&quot;$(ProjectDir)..\page\win&quot;;&quot;$(ProjectDir)..\platform&quot;;&quot;$(ProjectDir)..\platform\animation&quot;;&quot;$(ProjectDir)..\platform\sql&quot;;&quot;$(ProjectDir)..\platform\win&quot;;&quot;$(ProjectDir)..\platform\network&quot;;&quot;$(ProjectDir)..\platform\network\win&quot;;&quot;$(ProjectDir)..\platform\cf&quot;;&quot;$(ProjectDir)..\platform\graphics&quot;;&quot;$(ProjectDir)..\platform\graphics\opentype&quot;;&quot;$(ProjectDir)..\platform\graphics\transforms&quot;;&quot;$(ProjectDir)..\platform\text&quot;;&quot;$(ProjectDir)..\platform\graphics\win&quot;;&quot;$(ProjectDir)..\xml&quot;;&quot;$(WebKitOutputDir)\obj\WebCore\DerivedSources&quot;;&quot;$(ProjectDir)..\plugins&quot;;&quot;$(ProjectDir)..\plugins\win&quot;;&quot;$(ProjectDir)..\svg\graphics&quot;;&quot;$(ProjectDir)..\svg\graphics\filters&quot;;&quot;$(ProjectDir)..\svg&quot;;&quot;$(ProjectDir)..\wml&quot;;&quot;$(ProjectDir)..\storage&quot;;&quot;$(ProjectDir)..\workers&quot;;&quot;$(WebKitOutputDir)\include&quot;;&quot;$(WebKitOutputDir)\include\JavaScriptCore&quot;;&quot;$(ProjectDir)..\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\icu&quot;;&quot;$(WebKitLibrariesDir)\include\iconv&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitLibrariesDir)\include\sqlite&quot;;&quot;$(WebKitLibrariesDir)\include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;;&quot;$(ProjectDir)..\svg\animation&quot;"
 10 AdditionalIncludeDirectories="&quot;$(ProjectDir)..\&quot;;&quot;$(ProjectDir)..&quot;;&quot;$(ProjectDir)..\accessibility&quot;;&quot;$(ProjectDir)..\accessibility\win&quot;;&quot;$(ProjectDir)..\bridge&quot;;&quot;$(ProjectDir)..\bridge\c&quot;;&quot;$(ProjectDir)..\css&quot;;&quot;$(ProjectDir)..\editing&quot;;&quot;$(ProjectDir)..\notifications&quot;;&quot;$(ProjectDir)..\rendering&quot;;&quot;$(ProjectDir)..\rendering\style&quot;;&quot;$(ProjectDir)..\bindings\js&quot;;&quot;$(ProjectDir)..\dom&quot;;&quot;$(ProjectDir)..\dom\default&quot;;&quot;$(ProjectDir)..\history&quot;;&quot;$(ProjectDir)..\html&quot;;&quot;$(ProjectDir)..\inspector&quot;;&quot;$(ProjectDir)..\loader&quot;;&quot;$(ProjectDir)..\loader\appcache&quot;;&quot;$(ProjectDir)..\loader\archive&quot;;&quot;$(ProjectDir)..\loader\archive\cf&quot;;&quot;$(ProjectDir)..\loader\icon&quot;;&quot;$(ProjectDir)..\page&quot;;&quot;$(ProjectDir)..\page\animation&quot;;&quot;$(ProjectDir)..\page\win&quot;;&quot;$(ProjectDir)..\platform&quot;;&quot;$(ProjectDir)..\platform\animation&quot;;&quot;$(ProjectDir)..\platform\sql&quot;;&quot;$(ProjectDir)..\platform\win&quot;;&quot;$(ProjectDir)..\platform\network&quot;;&quot;$(ProjectDir)..\platform\network\win&quot;;&quot;$(ProjectDir)..\platform\cf&quot;;&quot;$(ProjectDir)..\platform\graphics&quot;;&quot;$(ProjectDir)..\platform\graphics\opentype&quot;;&quot;$(ProjectDir)..\platform\graphics\transforms&quot;;&quot;$(ProjectDir)..\platform\text&quot;;&quot;$(ProjectDir)..\platform\graphics\win&quot;;&quot;$(ProjectDir)..\xml&quot;;&quot;$(WebKitOutputDir)\obj\WebCore\DerivedSources&quot;;&quot;$(ProjectDir)..\plugins&quot;;&quot;$(ProjectDir)..\plugins\win&quot;;&quot;$(ProjectDir)..\svg\graphics&quot;;&quot;$(ProjectDir)..\svg\graphics\filters&quot;;&quot;$(ProjectDir)..\svg&quot;;&quot;$(ProjectDir)..\wml&quot;;&quot;$(ProjectDir)..\storage&quot;;&quot;$(ProjectDir)..\workers&quot;;&quot;$(WebKitOutputDir)\include&quot;;&quot;$(WebKitOutputDir)\include\JavaScriptCore&quot;;&quot;$(ProjectDir)..\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\icu&quot;;&quot;$(WebKitLibrariesDir)\include\iconv&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitLibrariesDir)\include\sqlite&quot;;&quot;$(WebKitLibrariesDir)\include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\CoreFoundation\OSXCompatibilityHeaders\GNUCompatibility&quot;;&quot;$(ProjectDir)..\svg\animation&quot;"
1111 PreprocessorDefinitions="__WIN32__;WEBCORE_CONTEXT_MENUS;ENABLE_DATABASE;ENABLE_DATAGRID;ENABLE_DOM_STORAGE;ENABLE_ICONDATABASE;ENABLE_OFFLINE_WEB_APPLICATIONS;ENABLE_SVG;ENABLE_SVG_ANIMATION;ENABLE_SVG_AS_IMAGE;ENABLE_SVG_FONTS;ENABLE_SVG_FOREIGN_OBJECT;ENABLE_SVG_USE;ENABLE_WORKERS;ENABLE_XPATH;ENABLE_XSLT"
1212 UsePrecompiledHeader="2"
1313 PrecompiledHeaderThrough="WebCorePrefix.h"
45574

WebCore/WebCore.xcodeproj/project.pbxproj

614614 31C0FF4C0E4CEFDD007D6FE5 /* DOMWebKitTransitionEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 31C0FF460E4CEFDD007D6FE5 /* DOMWebKitTransitionEvent.h */; };
615615 31C0FF4D0E4CEFDD007D6FE5 /* DOMWebKitTransitionEvent.mm in Sources */ = {isa = PBXBuildFile; fileRef = 31C0FF470E4CEFDD007D6FE5 /* DOMWebKitTransitionEvent.mm */; };
616616 31C0FF4E0E4CEFDD007D6FE5 /* DOMWebKitTransitionEventInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 31C0FF480E4CEFDD007D6FE5 /* DOMWebKitTransitionEventInternal.h */; };
 617 3390CA550FFC157B00921962 /* NotificationCenter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3390CA510FFC157B00921962 /* NotificationCenter.cpp */; };
 618 3390CA560FFC157B00921962 /* NotificationCenter.h in Headers */ = {isa = PBXBuildFile; fileRef = 3390CA520FFC157B00921962 /* NotificationCenter.h */; };
 619 3390CA570FFC157B00921962 /* NotificationCenter.idl in Resources */ = {isa = PBXBuildFile; fileRef = 3390CA530FFC157B00921962 /* NotificationCenter.idl */; };
 620 3390CA580FFC157B00921962 /* NotificationContents.h in Headers */ = {isa = PBXBuildFile; fileRef = 3390CA540FFC157B00921962 /* NotificationContents.h */; };
617621 371F4F400D25B9AF00ECE0D5 /* FontData.h in Headers */ = {isa = PBXBuildFile; fileRef = 371F4F3E0D25B9AF00ECE0D5 /* FontData.h */; settings = {ATTRIBUTES = (Private, ); }; };
618622 371F4F410D25B9AF00ECE0D5 /* FontData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 371F4F3F0D25B9AF00ECE0D5 /* FontData.cpp */; };
619623 371F4FFC0D25E7F300ECE0D5 /* SegmentedFontData.h in Headers */ = {isa = PBXBuildFile; fileRef = 371F4FFA0D25E7F300ECE0D5 /* SegmentedFontData.h */; };

55425546 31C0FF460E4CEFDD007D6FE5 /* DOMWebKitTransitionEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMWebKitTransitionEvent.h; sourceTree = "<group>"; };
55435547 31C0FF470E4CEFDD007D6FE5 /* DOMWebKitTransitionEvent.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMWebKitTransitionEvent.mm; sourceTree = "<group>"; };
55445548 31C0FF480E4CEFDD007D6FE5 /* DOMWebKitTransitionEventInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMWebKitTransitionEventInternal.h; sourceTree = "<group>"; };
 5549 333F704E0FB49CA2008E12A6 /* Notification.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = Notification.idl; path = notifications/Notification.idl; sourceTree = "<group>"; };
 5550 333F704F0FB49CA2008E12A6 /* Notification.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Notification.h; path = notifications/Notification.h; sourceTree = "<group>"; };
 5551 333F70500FB49CA2008E12A6 /* Notification.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Notification.cpp; path = notifications/Notification.cpp; sourceTree = "<group>"; };
 5552 333F70510FB49CA2008E12A6 /* NotificationProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NotificationProvider.h; path = notifications/NotificationProvider.h; sourceTree = "<group>"; };
 5553 3390CA510FFC157B00921962 /* NotificationCenter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NotificationCenter.cpp; path = notifications/NotificationCenter.cpp; sourceTree = "<group>"; };
 5554 3390CA520FFC157B00921962 /* NotificationCenter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NotificationCenter.h; path = notifications/NotificationCenter.h; sourceTree = "<group>"; };
 5555 3390CA530FFC157B00921962 /* NotificationCenter.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = NotificationCenter.idl; path = notifications/NotificationCenter.idl; sourceTree = "<group>"; };
 5556 3390CA540FFC157B00921962 /* NotificationContents.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NotificationContents.h; path = notifications/NotificationContents.h; sourceTree = "<group>"; };
55455557 371F4F3E0D25B9AF00ECE0D5 /* FontData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FontData.h; sourceTree = "<group>"; };
55465558 371F4F3F0D25B9AF00ECE0D5 /* FontData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FontData.cpp; sourceTree = "<group>"; };
55475559 371F4FFA0D25E7F300ECE0D5 /* SegmentedFontData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SegmentedFontData.h; sourceTree = "<group>"; };

94149426 93EEC1EC09C2877700C515D1 /* html */,
94159427 1C81B94D0E9732D900266E07 /* inspector */,
94169428 BCB16BFB0979C38700467741 /* loader */,
 9429 333F703D0FB49C16008E12A6 /* notifications */,
94179430 65BF02180974806300C43196 /* page */,
94189431 BCF1A5BA097832090061A123 /* platform */,
94199432 5DCF83690D59157800953BC6 /* plugins */,

98849897 name = animation;
98859898 sourceTree = "<group>";
98869899 };
 9900 333F703D0FB49C16008E12A6 /* notifications */ = {
 9901 isa = PBXGroup;
 9902 children = (
 9903 3390CA510FFC157B00921962 /* NotificationCenter.cpp */,
 9904 3390CA520FFC157B00921962 /* NotificationCenter.h */,
 9905 3390CA530FFC157B00921962 /* NotificationCenter.idl */,
 9906 3390CA540FFC157B00921962 /* NotificationContents.h */,
 9907 333F704E0FB49CA2008E12A6 /* Notification.idl */,
 9908 333F704F0FB49CA2008E12A6 /* Notification.h */,
 9909 333F70500FB49CA2008E12A6 /* Notification.cpp */,
 9910 333F70510FB49CA2008E12A6 /* NotificationProvider.h */,
 9911 );
 9912 name = notifications;
 9913 sourceTree = "<group>";
 9914 };
98879915 449195900FBE175B00D9F824 /* Exports */ = {
98889916 isa = PBXGroup;
98899917 children = (

1691716945 BC77D16C0FF19F560070887B /* JSDataGridColumnList.h in Headers */,
1691816946 BCBCAE370FF19385000762AE /* DataGridDataSource.h in Headers */,
1691916947 BCBCAE3D0FF19399000762AE /* JSDataGridDataSource.h in Headers */,
 16948 3390CA560FFC157B00921962 /* NotificationCenter.h in Headers */,
 16949 3390CA580FFC157B00921962 /* NotificationContents.h in Headers */,
1692016950 C50D0E830FF4272900AC2644 /* StorageNamespace.h in Headers */,
1692116951 BC7DAAEF0FF9615D00CE0138 /* DOMDataGridDataSource.h in Headers */,
1692216952 B5A684220FFABE9800D24689 /* SQLiteFileSystem.h in Headers */,

1702817058 BC77CDA30FEFEB530070887B /* HTMLDataGridCellElement.idl in Resources */,
1702917059 BC77CF990FF172420070887B /* DataGridColumnList.idl in Resources */,
1703017060 BC77CF9F0FF172B30070887B /* DataGridColumn.idl in Resources */,
 17061 3390CA570FFC157B00921962 /* NotificationCenter.idl in Resources */,
1703117062 );
1703217063 runOnlyForDeploymentPostprocessing = 0;
1703317064 };

1893218963 BCBCAE540FF1A29E000762AE /* JSHTMLDataGridElementCustom.cpp in Sources */,
1893318964 BC77D1FD0FF28D9B0070887B /* DataGridColumnList.cpp in Sources */,
1893418965 BC77D2390FF298080070887B /* DataGridColumn.cpp in Sources */,
 18966 3390CA550FFC157B00921962 /* NotificationCenter.cpp in Sources */,
1893518967 C50D0E820FF4272900AC2644 /* StorageNamespace.cpp in Sources */,
1893618968 BC7DAAEE0FF9615D00CE0138 /* DOMDataGridDataSource.cpp in Sources */,
1893718969 B5A684240FFABEAA00D24689 /* SQLiteFileSystem.cpp in Sources */,
45574

WebCore/bindings/js/JSDOMWindowCustom.cpp

4444#include "JSLocation.h"
4545#include "JSMessageChannelConstructor.h"
4646#include "JSMessagePort.h"
 47#include "JSNotificationCenter.h"
4748#include "JSOptionConstructor.h"
4849#include "JSWebKitCSSMatrixConstructor.h"
4950#include "JSWebKitPointConstructor.h"

5354#include "Location.h"
5455#include "MediaPlayer.h"
5556#include "MessagePort.h"
 57#include "NotificationCenter.h"
5658#include "Page.h"
5759#include "PlatformScreen.h"
5860#include "RegisteredEventListener.h"

@@JSValue JSDOMWindow::location(ExecState*
374376 return jsLocation;
375377}
376378
 379#if ENABLE(NOTIFICATIONS)
 380JSValue JSDOMWindow::notifications(ExecState* exec) const
 381{
 382 NotificationCenter* notifications = impl()->notifications();
 383 if (DOMObject* wrapper = getCachedDOMObjectWrapper(exec->globalData(), notifications))
 384 return wrapper;
 385
 386 JSNotificationCenter* jsNotifications = new (exec) JSNotificationCenter(getDOMStructure<JSNotificationCenter>(exec, const_cast<JSDOMWindow*>(this)), notifications);
 387 cacheDOMObjectWrapper(exec->globalData(), notifications, jsNotifications);
 388 return jsNotifications;
 389}
 390#endif
 391
377392void JSDOMWindow::setLocation(ExecState* exec, JSValue value)
378393{
379394 Frame* lexicalFrame = toLexicalFrame(exec);
45574

WebCore/bindings/js/JSDesktopNotificationsCustom.cpp

 1/*
 2 * Copyright (C) 2009 Google 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 are
 6 * met:
 7 *
 8 * * Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * * Redistributions in binary form must reproduce the above
 11 * copyright notice, this list of conditions and the following disclaimer
 12 * in the documentation and/or other materials provided with the
 13 * distribution.
 14 * * Neither the name of Google Inc. nor the names of its
 15 * contributors may be used to endorse or promote products derived from
 16 * this software without specific prior written permission.
 17 *
 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 29 */
 30
 31#include "config.h"
 32
 33#if ENABLE(NOTIFICATIONS)
 34
 35#include "Document.h"
 36#include "JSCustomVoidCallback.h"
 37#include "JSNotification.h"
 38#include "JSNotificationCenter.h"
 39#include "Notification.h"
 40#include "NotificationCenter.h"
 41
 42using namespace JSC;
 43
 44namespace WebCore {
 45
 46JSValue JSNotificationCenter::createHTMLNotification(ExecState* exec, const ArgList& args)
 47{
 48 ExceptionCode ec = 0;
 49 String url = args.at(0).toString(exec);
 50 JSValue value = toJS(exec, Notification::create(url, impl()->context(), ec, impl()->provider()));
 51 setDOMException(exec, ec);
 52 return value;
 53}
 54
 55JSValue JSNotificationCenter::createNotification(ExecState* exec, const ArgList& args)
 56{
 57 ExceptionCode ec = 0;
 58 NotificationContents contents(args.at(0).toString(exec), args.at(1).toString(exec), args.at(2).toString(exec));
 59
 60
 61 JSValue value = toJS(exec, Notification::create(contents, impl()->context(), ec, impl()->provider()));
 62 setDOMException(exec, ec);
 63 return value;
 64}
 65
 66JSValue JSNotificationCenter::checkPermission(ExecState* exec, const ArgList& args)
 67{
 68 return JSValue(exec, impl()->checkPermission());
 69}
 70
 71JSValue JSNotificationCenter::requestPermission(ExecState* exec, const ArgList& args)
 72{
 73 // Permission request is only valid from page context.
 74 ScriptExecutionContext* context = impl()->context();
 75 if (context->isWorkerContext())
 76 return throwError(exec, SyntaxError);
 77
 78 if (!args.at(0).isObject())
 79 return throwError(exec, TypeError);
 80
 81 PassRefPtr<JSCustomVoidCallback> callback = JSCustomVoidCallback::create(args.at(0).getObject(), static_cast<Document*>(context)->frame());
 82
 83 impl()->requestPermission(callback);
 84 return jsUndefined();
 85}
 86
 87} // namespace
 88
 89#endif // ENABLE(NOTIFICATIONS)
 90
0

WebCore/loader/EmptyClients.h

@@public:
133133 virtual void exceededDatabaseQuota(Frame*, const String&) { }
134134#endif
135135
 136#if ENABLE(NOTIFICATIONS)
 137 virtual NotificationProvider* notificationProvider() const { return 0; }
 138#endif
 139
136140 virtual void runOpenPanel(Frame*, PassRefPtr<FileChooser>) { }
137141
138142 virtual void formStateDidChange(const Node*) { }
45574

WebCore/notifications/Notification.cpp

 1/*
 2 * Copyright (C) 2009 Google 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 are
 6 * met:
 7 *
 8 * * Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * * Redistributions in binary form must reproduce the above
 11 * copyright notice, this list of conditions and the following disclaimer
 12 * in the documentation and/or other materials provided with the
 13 * distribution.
 14 * * Neither the name of Google Inc. nor the names of its
 15 * contributors may be used to endorse or promote products derived from
 16 * this software without specific prior written permission.
 17 *
 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 29 */
 30
 31#include "config.h"
 32
 33#if ENABLE(NOTIFICATIONS)
 34
 35#include "Notification.h"
 36#include "NotificationContents.h"
 37
 38#include "Document.h"
 39#include "EventNames.h"
 40#include "WorkerContext.h"
 41
 42namespace WebCore {
 43
 44Notification::Notification(const String& url, ScriptExecutionContext* context, ExceptionCode& ec, NotificationProvider* provider)
 45 : ActiveDOMObject(context, this)
 46 , m_isHTML(true)
 47 , m_isShowing(false)
 48 , m_provider(provider)
 49{
 50 if (m_provider->checkPermission(context->securityOrigin()) != NotificationProvider::PERMISSION_ALLOWED) {
 51 ec = SECURITY_ERR;
 52 return;
 53 }
 54
 55 m_notificationURL = context->completeURL(url);
 56 if (url.isEmpty() || !m_notificationURL.isValid()) {
 57 ec = SYNTAX_ERR;
 58 return;
 59 }
 60}
 61
 62Notification::Notification(const NotificationContents& contents, ScriptExecutionContext* context, ExceptionCode& ec, NotificationProvider* provider)
 63 : ActiveDOMObject(context, this)
 64 , m_isHTML(false)
 65 , m_isShowing(false)
 66 , m_contents(contents)
 67 , m_provider(provider)
 68{
 69 if (m_provider->checkPermission(context->securityOrigin()) != NotificationProvider::PERMISSION_ALLOWED) {
 70 ec = SECURITY_ERR;
 71 return;
 72 }
 73
 74 KURL icon = context->completeURL(contents.icon());
 75 if (!icon.isEmpty() && !icon.isValid()) {
 76 ec = SYNTAX_ERR;
 77 return;
 78 }
 79}
 80
 81Notification::~Notification()
 82{
 83}
 84
 85void Notification::show()
 86{
 87 // prevent double-showing
 88 if (!m_isShowing)
 89 m_isShowing = m_provider->show(this);
 90}
 91
 92void Notification::cancel()
 93{
 94 if (m_isShowing)
 95 m_provider->cancel(this);
 96}
 97
 98void Notification::dispatchDisplayEvent()
 99{
 100 RefPtr<Event> event = Event::create("display", false, true);
 101
 102 if (m_onDisplayListener) {
 103 event->setTarget(this);
 104 event->setCurrentTarget(this);
 105 m_onDisplayListener->handleEvent(event.get(), true);
 106 }
 107
 108 ExceptionCode ec = 0;
 109 dispatchEvent(event.release(), ec);
 110 ASSERT(!ec);
 111}
 112
 113void Notification::dispatchErrorEvent()
 114{
 115 RefPtr<Event> event = Event::create(eventNames().errorEvent, false, true);
 116
 117 if (m_onErrorListener) {
 118 event->setTarget(this);
 119 event->setCurrentTarget(this);
 120 m_onErrorListener->handleEvent(event.get(), true);
 121 }
 122
 123 ExceptionCode ec = 0;
 124 dispatchEvent(event.release(), ec);
 125 ASSERT(!ec);
 126}
 127
 128void Notification::dispatchCloseEvent()
 129{
 130 RefPtr<Event> event = Event::create(eventNames().closeEvent, false, true);
 131
 132 if (m_onCloseListener) {
 133 event->setTarget(this);
 134 event->setCurrentTarget(this);
 135 m_onCloseListener->handleEvent(event.get(), true);
 136 }
 137
 138 ExceptionCode ec = 0;
 139 dispatchEvent(event.release(), ec);
 140 ASSERT(!ec);
 141
 142}
 143
 144void Notification::addEventListener(const AtomicString& eventType, PassRefPtr<EventListener> listener, bool useCapture)
 145{
 146 RefPtr<RegisteredEventListener> registeredListener = RegisteredEventListener::create(eventType, listener, useCapture);
 147 m_eventListeners.append(registeredListener);
 148}
 149
 150void Notification::removeEventListener(const AtomicString& eventType, EventListener* listener, bool useCapture)
 151{
 152 size_t size = m_eventListeners.size();
 153 for (size_t i = 0; i < size; ++i) {
 154 RegisteredEventListener& r = *m_eventListeners[i];
 155 if (r.eventType() == eventType && r.listener() == listener && r.useCapture() == useCapture) {
 156 r.setRemoved(true);
 157 m_eventListeners.remove(i);
 158 return;
 159 }
 160 }
 161}
 162
 163bool Notification::dispatchEvent(PassRefPtr<Event> event, ExceptionCode& ec)
 164{
 165 RegisteredEventListenerVector listenersCopy = m_eventListeners;
 166 size_t size = listenersCopy.size();
 167 for (size_t i = 0; i < size; ++i) {
 168 RegisteredEventListener& r = *listenersCopy[i];
 169 if (r.eventType() == event->type() && !r.removed())
 170 r.listener()->handleEvent(event.get());
 171 }
 172
 173 return true;
 174}
 175
 176void Notification::display()
 177{
 178 dispatchDisplayEvent();
 179}
 180
 181void Notification::error()
 182{
 183 dispatchErrorEvent();
 184}
 185
 186void Notification::close()
 187{
 188 dispatchCloseEvent();
 189}
 190
 191} // namespace WebCore
 192
 193#endif // ENABLE(NOTIFICATIONS)
0

WebCore/notifications/Notification.h

 1/*
 2 * Copyright (C) 2009 Google 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 are
 6 * met:
 7 *
 8 * * Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * * Redistributions in binary form must reproduce the above
 11 * copyright notice, this list of conditions and the following disclaimer
 12 * in the documentation and/or other materials provided with the
 13 * distribution.
 14 * * Neither the name of Google Inc. nor the names of its
 15 * contributors may be used to endorse or promote products derived from
 16 * this software without specific prior written permission.
 17 *
 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 29 */
 30
 31#ifndef Notification_h
 32#define Notification_h
 33
 34#include "ActiveDOMObject.h"
 35#include "AtomicStringHash.h"
 36#include "Event.h"
 37#include "EventListener.h"
 38#include "EventTarget.h"
 39#include "ExceptionCode.h"
 40#include "KURL.h"
 41#include "NotificationProvider.h"
 42#include "NotificationContents.h"
 43#include "RegisteredEventListener.h"
 44#include <wtf/OwnPtr.h>
 45#include <wtf/PassRefPtr.h>
 46#include <wtf/RefCounted.h>
 47#include <wtf/RefPtr.h>
 48
 49#if ENABLE(NOTIFICATIONS)
 50namespace WebCore {
 51
 52 class WorkerContext;
 53
 54 class Notification : public RefCounted<Notification>, public ActiveDOMObject, public EventTarget {
 55 public:
 56 static PassRefPtr<Notification> create(const String& url, ScriptExecutionContext* context, ExceptionCode& ec, NotificationProvider* provider) { return adoptRef(new Notification(url, context, ec, provider)); }
 57 static PassRefPtr<Notification> create(const NotificationContents& contents, ScriptExecutionContext* context, ExceptionCode& ec, NotificationProvider* provider) { return adoptRef(new Notification(contents, context, ec, provider)); }
 58
 59 virtual ~Notification();
 60
 61 void show();
 62 void cancel();
 63
 64 bool isHTML() { return m_isHTML; }
 65 KURL url() { return m_notificationURL; }
 66 NotificationContents& contents() { return m_contents; }
 67
 68 EventListener* ondisplay() const { return m_onDisplayListener.get(); }
 69 void setOndisplay(PassRefPtr<EventListener> eventListener) { m_onDisplayListener = eventListener; }
 70 EventListener* onerror() const { return m_onErrorListener.get(); }
 71 void setOnerror(PassRefPtr<EventListener> eventListener) { m_onErrorListener = eventListener; }
 72 EventListener* onclose() const { return m_onCloseListener.get(); }
 73 void setOnclose(PassRefPtr<EventListener> eventListener) { m_onCloseListener = eventListener; }
 74
 75 using RefCounted<Notification>::ref;
 76 using RefCounted<Notification>::deref;
 77
 78 // Callback methods for the provider when events occur regarding the notification.
 79 void display();
 80 void error();
 81 void close();
 82
 83 // EventTarget interface
 84 virtual ScriptExecutionContext* scriptExecutionContext() const { return ActiveDOMObject::scriptExecutionContext(); }
 85 virtual void addEventListener(const AtomicString&, PassRefPtr<EventListener>, bool);
 86 virtual void removeEventListener(const AtomicString&, EventListener*, bool);
 87 virtual bool dispatchEvent(PassRefPtr<Event>, ExceptionCode&);
 88
 89 private:
 90 Notification(const String& url, ScriptExecutionContext* context, ExceptionCode& ec, NotificationProvider* provider);
 91 Notification(const NotificationContents& fields, ScriptExecutionContext* context, ExceptionCode& ec, NotificationProvider* provider);
 92
 93 void dispatchDisplayEvent();
 94 void dispatchErrorEvent();
 95 void dispatchCloseEvent();
 96
 97 // EventTarget interface
 98 virtual void refEventTarget() { ref(); }
 99 virtual void derefEventTarget() { deref(); }
 100
 101 bool m_isHTML;
 102 KURL m_notificationURL;
 103 NotificationContents m_contents;
 104
 105 bool m_isShowing;
 106
 107 RefPtr<EventListener> m_onDisplayListener;
 108 RefPtr<EventListener> m_onErrorListener;
 109 RefPtr<EventListener> m_onCloseListener;
 110 RegisteredEventListenerVector m_eventListeners;
 111
 112 NotificationProvider* m_provider;
 113 };
 114
 115} // namespace WebCore
 116
 117#endif // ENABLE(NOTIFICATIONS)
 118
 119#endif // Notifications_h
0

WebCore/notifications/Notification.idl

 1/*
 2 * Copyright (C) 2009 Google 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 are
 6 * met:
 7 *
 8 * * Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * * Redistributions in binary form must reproduce the above
 11 * copyright notice, this list of conditions and the following disclaimer
 12 * in the documentation and/or other materials provided with the
 13 * distribution.
 14 * * Neither the name of Google Inc. nor the names of its
 15 * contributors may be used to endorse or promote products derived from
 16 * this software without specific prior written permission.
 17 *
 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 29 */
 30
 31module notifications {
 32
 33 interface [
 34 Conditional=NOTIFICATIONS
 35 ] Notification {
 36 void show();
 37 void cancel();
 38
 39 attribute EventListener ondisplay;
 40 attribute EventListener onerror;
 41 attribute EventListener onclose;
 42 };
 43
 44}
0

WebCore/notifications/NotificationCenter.cpp

 1/*
 2 * Copyright (C) 2009 Google 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 are
 6 * met:
 7 *
 8 * * Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * * Redistributions in binary form must reproduce the above
 11 * copyright notice, this list of conditions and the following disclaimer
 12 * in the documentation and/or other materials provided with the
 13 * distribution.
 14 * * Neither the name of Google Inc. nor the names of its
 15 * contributors may be used to endorse or promote products derived from
 16 * this software without specific prior written permission.
 17 *
 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 29 */
 30
 31#include "config.h"
 32
 33#if ENABLE(NOTIFICATIONS)
 34
 35#include "NotificationCenter.h"
 36
 37#include "Document.h"
 38#include "VoidCallback.h"
 39#include "WorkerContext.h"
 40
 41namespace WebCore {
 42
 43NotificationCenter::NotificationCenter(ScriptExecutionContext* context, NotificationProvider* provider)
 44 : ActiveDOMObject(context, this)
 45 , m_scriptExecutionContext(context)
 46 , m_notificationProvider(provider) {}
 47
 48
 49int NotificationCenter::checkPermission()
 50{
 51 return m_notificationProvider->checkPermission(m_scriptExecutionContext->securityOrigin());
 52}
 53
 54void NotificationCenter::requestPermission(PassRefPtr<VoidCallback> callback)
 55{
 56 m_notificationProvider->requestPermission(m_scriptExecutionContext->securityOrigin(), callback);
 57}
 58
 59} // namespace WebCore
 60
 61#endif // ENABLE(NOTIFICATIONS)
0

WebCore/notifications/NotificationCenter.h

 1/*
 2 * Copyright (C) 2009 Google 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 are
 6 * met:
 7 *
 8 * * Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * * Redistributions in binary form must reproduce the above
 11 * copyright notice, this list of conditions and the following disclaimer
 12 * in the documentation and/or other materials provided with the
 13 * distribution.
 14 * * Neither the name of Google Inc. nor the names of its
 15 * contributors may be used to endorse or promote products derived from
 16 * this software without specific prior written permission.
 17 *
 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 29 */
 30
 31#ifndef NotificationCenter_h
 32#define NotificationCenter_h
 33
 34#include "Notification.h"
 35#include "WorkerThread.h"
 36#include <wtf/OwnPtr.h>
 37#include <wtf/PassRefPtr.h>
 38#include <wtf/RefCounted.h>
 39#include <wtf/RefPtr.h>
 40
 41#if ENABLE(NOTIFICATIONS)
 42
 43namespace WebCore {
 44
 45 class ScriptExecutionContext;
 46
 47 class NotificationCenter : public RefCounted<NotificationCenter>, public ActiveDOMObject {
 48 public:
 49 static PassRefPtr<NotificationCenter> create(ScriptExecutionContext* context, NotificationProvider* provider) { return adoptRef(new NotificationCenter(context, provider)); }
 50
 51 PassRefPtr<Notification> createHTMLNotification(const String& URI, ExceptionCode& ec)
 52 {
 53 return Notification::create(KURL(URI), m_scriptExecutionContext, ec, m_notificationProvider);
 54 }
 55 PassRefPtr<Notification> createNotification(NotificationContents contents, ExceptionCode& ec)
 56 {
 57 return Notification::create(contents, m_scriptExecutionContext, ec, m_notificationProvider);
 58 }
 59
 60 ScriptExecutionContext* context() const { return m_scriptExecutionContext; }
 61 NotificationProvider* provider() const { return m_notificationProvider; }
 62
 63 int checkPermission();
 64 void requestPermission(PassRefPtr<VoidCallback> callback);
 65
 66 private:
 67 NotificationCenter(ScriptExecutionContext*, NotificationProvider*);
 68
 69 ScriptExecutionContext* m_scriptExecutionContext;
 70 NotificationProvider* m_notificationProvider;
 71 };
 72
 73} // namespace WebCore
 74
 75#endif // ENABLE(NOTIFICATIONS)
 76
 77#endif // Notifications_h
0

WebCore/notifications/NotificationCenter.idl

 1/*
 2 * Copyright (C) 2009 Google 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 are
 6 * met:
 7 *
 8 * * Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * * Redistributions in binary form must reproduce the above
 11 * copyright notice, this list of conditions and the following disclaimer
 12 * in the documentation and/or other materials provided with the
 13 * distribution.
 14 * * Neither the name of Google Inc. nor the names of its
 15 * contributors may be used to endorse or promote products derived from
 16 * this software without specific prior written permission.
 17 *
 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 29 */
 30
 31module notifications {
 32
 33 interface [
 34 Conditional=NOTIFICATIONS
 35 ] NotificationCenter {
 36 [ReturnsNew] [Custom] Notification createHTMLNotification(in DOMString url);
 37 [ReturnsNew] [Custom] Notification createNotification(in DOMString iconUrl, in DOMString title, in DOMString body);
 38
 39 [Custom] int checkPermission();
 40 [Custom] void requestPermission(in VoidCallback callback);
 41 };
 42
 43}
0

WebCore/notifications/NotificationContents.h

 1/*
 2 * Copyright (C) 2009 Google 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 are
 6 * met:
 7 *
 8 * * Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * * Redistributions in binary form must reproduce the above
 11 * copyright notice, this list of conditions and the following disclaimer
 12 * in the documentation and/or other materials provided with the
 13 * distribution.
 14 * * Neither the name of Google Inc. nor the names of its
 15 * contributors may be used to endorse or promote products derived from
 16 * this software without specific prior written permission.
 17 *
 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 29 */
 30
 31#ifndef NotificationContents_h
 32#define NotificationContents_h
 33
 34#if ENABLE(NOTIFICATIONS)
 35
 36namespace WebCore {
 37
 38 class NotificationContents {
 39 public:
 40 NotificationContents() {}
 41 NotificationContents(const String& iconUrl, const String& title, const String& body)
 42 : m_icon(iconUrl)
 43 , m_title(title)
 44 , m_body(body) {}
 45
 46 String icon() const { return m_icon; }
 47 String title() const { return m_title; }
 48 String body() const { return m_body; }
 49
 50 private:
 51 String m_icon;
 52 String m_title;
 53 String m_body;
 54 };
 55
 56} // namespace WebCore
 57
 58#endif // ENABLE(NOTIFICATIONS)
 59
 60#endif // NotificationContents_h
0

WebCore/notifications/NotificationProvider.h

 1/*
 2 * Copyright (C) 2009 Google 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 are
 6 * met:
 7 *
 8 * * Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * * Redistributions in binary form must reproduce the above
 11 * copyright notice, this list of conditions and the following disclaimer
 12 * in the documentation and/or other materials provided with the
 13 * distribution.
 14 * * Neither the name of Google Inc. nor the names of its
 15 * contributors may be used to endorse or promote products derived from
 16 * this software without specific prior written permission.
 17 *
 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 29 */
 30
 31#ifndef NotificationProvider_h
 32#define NotificationProvider_h
 33
 34#include <wtf/PassRefPtr.h>
 35#include "VoidCallback.h"
 36
 37#if ENABLE(NOTIFICATIONS)
 38
 39namespace WebCore {
 40
 41 class Notification;
 42 class SecurityOrigin;
 43 class String;
 44
 45 class NotificationProvider {
 46
 47 public:
 48 enum Permission {
 49 PERMISSION_ALLOWED,
 50 PERMISSION_NOT_ALLOWED,
 51 PERMISSION_DENIED
 52 };
 53
 54 virtual ~NotificationProvider() {}
 55
 56 virtual bool show(Notification* object) = 0;
 57
 58 virtual void cancel(Notification* object) = 0;
 59
 60 virtual void requestPermission(SecurityOrigin* origin, PassRefPtr<VoidCallback> callback) = 0;
 61
 62 virtual Permission checkPermission(SecurityOrigin* origin) = 0;
 63 };
 64
 65} // namespace WebCore
 66
 67#endif // ENABLE(NOTIFICATIONS)
 68
 69#endif // NotificationProvider_h
0

WebCore/page/Chrome.cpp

@@bool Chrome::setCursor(PlatformCursorHan
391391 return m_client->setCursor(cursor);
392392}
393393
 394#if ENABLE(NOTIFICATIONS)
 395NotificationProvider* Chrome::notificationProvider() const
 396{
 397 return m_client->notificationProvider();
 398}
 399#endif
 400
394401// --------
395402
396403#if ENABLE(DASHBOARD_SUPPORT)
45574

WebCore/page/Chrome.h

@@namespace WebCore {
4444 class IntRect;
4545 class Page;
4646 class String;
 47#if ENABLE(NOTIFICATIONS)
 48 class NotificationProvider;
 49#endif
4750
4851 struct FrameLoadRequest;
4952 struct WindowFeatures;

@@namespace WebCore {
128131 void focusNSView(NSView*);
129132#endif
130133
 134#if ENABLE(NOTIFICATIONS)
 135 NotificationProvider* notificationProvider() const;
 136#endif
 137
131138 private:
132139 Page* m_page;
133140 ChromeClient* m_client;
45574

WebCore/page/ChromeClient.h

@@namespace WebCore {
6262 class GraphicsLayer;
6363#endif
6464
 65#if ENABLE(NOTIFICATIONS)
 66 class NotificationProvider;
 67#endif
 68
6569 class ChromeClient {
6670 public:
6771 virtual void chromeDestroyed() = 0;

@@namespace WebCore {
143147 virtual void dashboardRegionsChanged();
144148#endif
145149
 150#if ENABLE(NOTIFICATIONS)
 151 virtual NotificationProvider* notificationProvider() const = 0;
 152#endif
 153
146154 virtual void populateVisitedLinks();
147155
148156 virtual FloatRect customHighlightRect(Node*, const AtomicString& type, const FloatRect& lineRect);
45574

WebCore/page/DOMWindow.cpp

7979#include "DOMApplicationCache.h"
8080#endif
8181
 82#if ENABLE(NOTIFICATIONS)
 83#include "NotificationCenter.h"
 84#endif
 85
8286using std::min;
8387using std::max;
8488

@@void DOMWindow::clear()
453457 m_applicationCache->disconnectFrame();
454458 m_applicationCache = 0;
455459#endif
 460
 461#if ENABLE(NOTIFICATIONS)
 462 m_notifications = 0;
 463#endif
456464}
457465
458466Screen* DOMWindow::screen() const

@@Storage* DOMWindow::localStorage() const
588596}
589597#endif
590598
 599#if ENABLE(NOTIFICATIONS)
 600NotificationCenter* DOMWindow::webkitNotifications() const
 601{
 602 if (m_notifications)
 603 return m_notifications.get();
 604
 605 Document* document = this->document();
 606 if (!document)
 607 return 0;
 608
 609 Page* page = document->page();
 610 if (!page)
 611 return 0;
 612
 613 NotificationProvider* provider = page->chrome()->notificationProvider();
 614 if (provider)
 615 m_notifications = NotificationCenter::create(document, provider);
 616
 617 return m_notifications.get();
 618}
 619#endif
 620
591621void DOMWindow::postMessage(const String& message, MessagePort* messagePort, const String& targetOrigin, DOMWindow* source, ExceptionCode& ec)
592622{
593623 if (!m_frame)
45574

WebCore/page/DOMWindow.h

@@namespace WebCore {
5555 class MessagePort;
5656 class Navigator;
5757 class Node;
 58 class NotificationCenter;
5859 class PostMessageTimer;
5960 class ScheduledAction;
6061 class Screen;

@@namespace WebCore {
199200 DOMApplicationCache* applicationCache() const;
200201#endif
201202
 203#if ENABLE(NOTIFICATIONS)
 204 NotificationCenter* webkitNotifications() const;
 205#endif
 206
202207 void postMessage(const String& message, MessagePort*, const String& targetOrigin, DOMWindow* source, ExceptionCode&);
203208 void postMessageTimerFired(PostMessageTimer*);
204209

@@namespace WebCore {
424429#if ENABLE(OFFLINE_WEB_APPLICATIONS)
425430 mutable RefPtr<DOMApplicationCache> m_applicationCache;
426431#endif
 432#if ENABLE(NOTIFICATIONS)
 433 mutable RefPtr<NotificationCenter> m_notifications;
 434#endif
427435
428436 RegisteredEventListenerVector m_eventListeners;
429437 };
45574

WebCore/page/DOMWindow.idl

@@module window {
163163 readonly attribute Storage sessionStorage;
164164 readonly attribute Storage localStorage;
165165#endif
 166#if defined(ENABLE_NOTIFICATIONS) && ENABLE_NOTIFICATIONS
 167 readonly attribute [Custom] NotificationCenter webkitNotifications;
 168#endif
166169
167170 attribute [Replaceable] Console console;
168171
45574

WebCore/page/Page.h

@@namespace WebCore {
7070#if ENABLE(WML)
7171 class WMLPageState;
7272#endif
 73#if ENABLE(NOTIFICATIONS)
 74 class NotificationProvider;
 75#endif
7376
7477 enum FindDirection { FindDirectionForward, FindDirectionBackward };
7578

@@namespace WebCore {
263266#if ENABLE(WML)
264267 OwnPtr<WMLPageState> m_wmlPageState;
265268#endif
 269
 270#if ENABLE(NOTIFICATIONS)
 271 NotificationProvider* m_notificationProvider;
 272#endif
266273 };
267274
268275} // namespace WebCore
45574

WebCore/workers/WorkerContext.cpp

5050#include "XMLHttpRequestException.h"
5151#include <wtf/RefPtr.h>
5252
 53#if ENABLE(NOTIFICATIONS)
 54#include "NotificationCenter.h"
 55#endif
 56
5357namespace WebCore {
5458
5559WorkerContext::WorkerContext(const KURL& url, const String& userAgent, WorkerThread* thread)

@@WorkerContext::WorkerContext(const KURL&
6569WorkerContext::~WorkerContext()
6670{
6771 ASSERT(currentThread() == m_thread->threadID());
68 
 72#if ENABLE(NOTIFICATIONS)
 73 m_notifications.clear();
 74#endif
6975 m_thread->workerObjectProxy().workerContextDestroyed();
7076}
7177

@@void WorkerContext::importScripts(const
310316 }
311317}
312318
 319#if ENABLE(NOTIFICATIONS)
 320NotificationCenter* WorkerContext::webkitNotifications() const
 321{
 322 if (!m_notifications)
 323 m_notifications = NotificationCenter::create(scriptExecutionContext(), m_thread->getNotificationProvider());
 324 return m_notifications.get();
 325}
 326#endif
 327
313328} // namespace WebCore
314329
315330#endif // ENABLE(WORKERS)
45574

WebCore/workers/WorkerContext.h

4141
4242namespace WebCore {
4343
 44 class NotificationCenter;
4445 class ScheduledAction;
4546 class WorkerLocation;
4647 class WorkerNavigator;

@@namespace WebCore {
112113
113114 void dispatchMessage(const String&, PassRefPtr<MessagePort>);
114115
 116#if ENABLE(NOTIFICATIONS)
 117 NotificationCenter* webkitNotifications() const;
 118#endif
 119
115120 // These methods are used for GC marking. See JSWorkerContext::mark() in
116121 // JSWorkerContextCustom.cpp.
117122 WorkerNavigator* optionalNavigator() const { return m_navigator.get(); }

@@namespace WebCore {
143148 RefPtr<EventListener> m_onmessageListener;
144149 EventListenersMap m_eventListeners;
145150
 151#if ENABLE_NOTIFICATIONS
 152 mutable RefPtr<NotificationCenter> m_notifications;
 153#endif
146154 bool m_closing;
147155 };
148156
45574

WebCore/workers/WorkerContext.idl

@@module threads {
7474 boolean dispatchEvent(in Event evt)
7575 raises(EventException);
7676
 77#if defined(ENABLE_NOTIFICATIONS) && ENABLE_NOTIFICATIONS
 78 // Notification interface
 79 readonly attribute NotificationCenter webkitNotifications;
 80#endif
7781
7882 // Constructors
7983 attribute MessageEventConstructor MessageEvent;
45574

WebCore/workers/WorkerThread.h

3737namespace WebCore {
3838
3939 class KURL;
 40 class NotificationProvider;
4041 class String;
4142 class WorkerContext;
4243 class WorkerLoaderProxy;

@@namespace WebCore {
5657 WorkerLoaderProxy& workerLoaderProxy() const { return m_workerLoaderProxy; }
5758 WorkerObjectProxy& workerObjectProxy() const { return m_workerObjectProxy; }
5859
 60#if ENABLE(NOTIFICATIONS)
 61 virtual NotificationProvider* getNotificationProvider() { return m_notificationProvider; }
 62 virtual void setNotificationProvider(NotificationProvider* provider) { m_notificationProvider = provider; }
 63#endif
 64
5965 private:
6066 WorkerThread(const KURL&, const String& userAgent, const String& sourceCode, WorkerLoaderProxy&, WorkerObjectProxy&);
6167

@@namespace WebCore {
7177 Mutex m_threadCreationMutex;
7278
7379 OwnPtr<WorkerThreadStartupData> m_startupData;
 80
 81#if ENABLE(NOTIFICATIONS)
 82 NotificationProvider* m_notificationProvider;
 83#endif
7484 };
7585
7686} // namespace WebCore
45574

WebKitTools/Scripts/build-webkit

@@my ($threeDRenderingSupport, $channelMes
4949 $javaScriptDebuggerSupport, $offlineWebApplicationSupport, $svgSupport, $svgAnimationSupport,
5050 $svgAsImageSupport, $svgDOMObjCBindingsSupport, $svgFontsSupport, $svgForeignObjectSupport,
5151 $svgUseSupport, $videoSupport, $wmlSupport, $workersSupport, $xpathSupport, $xsltSupport,
52  $coverageSupport);
 52 $coverageSupport, $notificationsSupport);
5353
5454my @features = (
5555 { option => "3d-rendering", desc => "Toggle 3D rendering support",

@@my @features = (
8282 { option => "javascript-debugger", desc => "Toggle JavaScript Debugger/Profiler support",
8383 define => "ENABLE_JAVASCRIPT_DEBUGGER", default => 1, value => \$javaScriptDebuggerSupport },
8484
 85 { option => "notifications", desc => "Toggle Desktop Notifications Support",
 86 define => "ENABLE_NOTIFICATIONS", default => 0, value => \$notificationsSupport },
 87
8588 { option => "offline-web-applications", desc => "Toggle Offline Web Application Support",
8689 define => "ENABLE_OFFLINE_WEB_APPLICATIONS", default => 1, value => \$offlineWebApplicationSupport },
8790
45574