Changeset 111832 in webkit
- Timestamp:
- Mar 22, 2012 11:29:16 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/CMakeLists.txt
r111799 r111832 1626 1626 IF (ENABLE_NOTIFICATIONS) 1627 1627 LIST(APPEND WebCore_SOURCES 1628 notifications/DOMWindowNotifications.cpp 1628 1629 notifications/NotificationCenter.cpp 1629 1630 notifications/NotificationController.cpp … … 1632 1633 1633 1634 LIST(APPEND WebCore_IDL_FILES 1635 notifications/DOMWindowNotifications.idl 1634 1636 notifications/Notification.idl 1635 1637 notifications/NotificationCenter.idl -
trunk/Source/WebCore/ChangeLog
r111829 r111832 1 2012-03-22 Adam Barth <abarth@webkit.org> 2 3 Move Notifications APIs from DOMWindow.idl to DOMWindowNotifications.idl (Part 1) 4 https://bugs.webkit.org/show_bug.cgi?id=82015 5 6 Reviewed by Kentaro Hara. 7 8 This patch moves DOMWindow.webkitNotifications from DOMWindow.idl to 9 DOMWindowNotificiations.idl in preparation for moving notificiations 10 into Modules. 11 12 A future patch will remove DOMWindow::resetNotificaitions in favor of 13 more general mechanisms. 14 15 * CMakeLists.txt: 16 * DerivedSources.make: 17 * DerivedSources.pri: 18 * GNUmakefile.list.am: 19 * Target.pri: 20 * WebCore.gypi: 21 * WebCore.vcproj/WebCore.vcproj: 22 * WebCore.xcodeproj/project.pbxproj: 23 * notifications/DOMWindowNotifications.cpp: Added. 24 (WebCore): 25 (WebCore::DOMWindowNotifications::DOMWindowNotifications): 26 (WebCore::DOMWindowNotifications::~DOMWindowNotifications): 27 (WebCore::DOMWindowNotifications::from): 28 (WebCore::DOMWindowNotifications::webkitNotifications): 29 (WebCore::DOMWindowNotifications::reset): 30 (WebCore::DOMWindowNotifications::supplementName): 31 * notifications/DOMWindowNotifications.h: Added. 32 (WebCore): 33 (DOMWindowNotifications): 34 * notifications/DOMWindowNotifications.idl: Added. 35 * page/DOMWindow.cpp: 36 (WebCore::DOMWindow::~DOMWindow): 37 (WebCore): 38 (WebCore::DOMWindow::resetNotifications): 39 * page/DOMWindow.h: 40 (WebCore): 41 (DOMWindow): 42 * page/DOMWindow.idl: 43 1 44 2012-03-22 Li Yin <li.yin@intel.com> 2 45 -
trunk/Source/WebCore/DerivedSources.make
r111474 r111832 384 384 $(WebCore)/inspector/ScriptProfileNode.idl \ 385 385 $(WebCore)/loader/appcache/DOMApplicationCache.idl \ 386 $(WebCore)/notifications/DOMWindowNotifications.idl \ 386 387 $(WebCore)/notifications/Notification.idl \ 387 388 $(WebCore)/notifications/NotificationCenter.idl \ -
trunk/Source/WebCore/DerivedSources.pri
r111474 r111832 397 397 $$PWD/inspector/ScriptProfileNode.idl \ 398 398 $$PWD/loader/appcache/DOMApplicationCache.idl \ 399 $$PWD/notifications/DOMWindowNotifications.idl \ 399 400 $$PWD/notifications/Notification.idl \ 400 401 $$PWD/notifications/NotificationCenter.idl \ -
trunk/Source/WebCore/GNUmakefile.list.am
r111733 r111832 2834 2834 Source/WebCore/mathml/MathMLTextElement.cpp \ 2835 2835 Source/WebCore/mathml/MathMLTextElement.h \ 2836 Source/WebCore/notifications/DOMWindowNotifications.cpp \ 2837 Source/WebCore/notifications/DOMWindowNotifications.h \ 2836 2838 Source/WebCore/notifications/NotificationCenter.cpp \ 2837 2839 Source/WebCore/notifications/NotificationCenter.h \ -
trunk/Source/WebCore/Target.pri
r111780 r111832 981 981 loader/TextResourceDecoder.cpp \ 982 982 loader/ThreadableLoader.cpp \ 983 notifications/DOMWindowNotifications.cpp \ 983 984 notifications/Notification.cpp \ 984 985 notifications/NotificationCenter.cpp \ … … 2081 2082 mathml/MathMLMathElement.h \ 2082 2083 mathml/MathMLTextElement.h \ 2084 notifications/DOMWindowNotifications.h \ 2083 2085 notifications/Notification.h \ 2084 2086 notifications/NotificationCenter.h \ -
trunk/Source/WebCore/WebCore.gypi
r111733 r111832 1096 1096 'inspector/ScriptProfileNode.idl', 1097 1097 'loader/appcache/DOMApplicationCache.idl', 1098 'notifications/DOMWindowNotifications.idl', 1098 1099 'notifications/Notification.idl', 1099 1100 'notifications/NotificationCenter.idl', … … 2882 2883 'mathml/MathMLTextElement.cpp', 2883 2884 'mathml/MathMLTextElement.h', 2885 'notifications/DOMWindowNotifications.cpp', 2886 'notifications/DOMWindowNotifications.h', 2884 2887 'notifications/Notification.cpp', 2885 2888 'notifications/Notification.h', -
trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj
r111733 r111832 53923 53923 > 53924 53924 <File 53925 RelativePath="..\notifications\DOMWindowNotifications.cpp" 53926 > 53927 </File> 53928 <File 53929 RelativePath="..\notifications\DOMWindowNotifications.h" 53930 > 53931 </File> 53932 <File 53925 53933 RelativePath="..\notifications\Notification.cpp" 53926 53934 > -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r111827 r111832 3508 3508 97B1F02E13B025CA00F5103F /* SharedBufferChunkReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 37569E0013AF172C00CDBA8E /* SharedBufferChunkReader.cpp */; }; 3509 3509 97B1F02F13B025D200F5103F /* SharedBufferChunkReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 37569E0213AF172C00CDBA8E /* SharedBufferChunkReader.h */; }; 3510 97B38E27151C4271004622E9 /* DOMWindowNotifications.h in Headers */ = {isa = PBXBuildFile; fileRef = 97B38E24151C4264004622E9 /* DOMWindowNotifications.h */; }; 3511 97B38E28151C4273004622E9 /* DOMWindowNotifications.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 97B38E23151C4264004622E9 /* DOMWindowNotifications.cpp */; }; 3510 3512 97BC69DA1505F076001B74AC /* AbstractDatabase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 97BC69D61505F076001B74AC /* AbstractDatabase.cpp */; }; 3511 3513 97BC69DB1505F076001B74AC /* AbstractDatabase.h in Headers */ = {isa = PBXBuildFile; fileRef = 97BC69D71505F076001B74AC /* AbstractDatabase.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 10473 10475 97AABD1114FA09D5007457AE /* WorkerThreadableWebSocketChannel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WorkerThreadableWebSocketChannel.cpp; path = Modules/websockets/WorkerThreadableWebSocketChannel.cpp; sourceTree = "<group>"; }; 10474 10476 97AABD1214FA09D5007457AE /* WorkerThreadableWebSocketChannel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WorkerThreadableWebSocketChannel.h; path = Modules/websockets/WorkerThreadableWebSocketChannel.h; sourceTree = "<group>"; }; 10477 97B38E23151C4264004622E9 /* DOMWindowNotifications.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DOMWindowNotifications.cpp; path = notifications/DOMWindowNotifications.cpp; sourceTree = "<group>"; }; 10478 97B38E24151C4264004622E9 /* DOMWindowNotifications.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DOMWindowNotifications.h; path = notifications/DOMWindowNotifications.h; sourceTree = "<group>"; }; 10479 97B38E25151C4264004622E9 /* DOMWindowNotifications.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = DOMWindowNotifications.idl; path = notifications/DOMWindowNotifications.idl; sourceTree = "<group>"; }; 10475 10480 97BC69D61505F076001B74AC /* AbstractDatabase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AbstractDatabase.cpp; path = Modules/webdatabase/AbstractDatabase.cpp; sourceTree = "<group>"; }; 10476 10481 97BC69D71505F076001B74AC /* AbstractDatabase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AbstractDatabase.h; path = Modules/webdatabase/AbstractDatabase.h; sourceTree = "<group>"; }; … … 14419 14424 isa = PBXGroup; 14420 14425 children = ( 14426 97B38E23151C4264004622E9 /* DOMWindowNotifications.cpp */, 14427 97B38E24151C4264004622E9 /* DOMWindowNotifications.h */, 14428 97B38E25151C4264004622E9 /* DOMWindowNotifications.idl */, 14421 14429 33503CC61017A1B1003B47E1 /* Notification.cpp */, 14422 14430 333F704F0FB49CA2008E12A6 /* Notification.h */, … … 22450 22458 1403B99709EB13AF00797C7F /* DOMWindow.h in Headers */, 22451 22459 9712A5AE15004EDA0048AF10 /* DOMWindowIndexedDatabase.h in Headers */, 22460 97B38E27151C4271004622E9 /* DOMWindowNotifications.h in Headers */, 22452 22461 97D2AD0414B823A60093DF32 /* DOMWindowProperty.h in Headers */, 22453 22462 97BC6A351505F081001B74AC /* DOMWindowSQLDatabase.h in Headers */, … … 25601 25610 1403B99809EB13AF00797C7F /* DOMWindow.cpp in Sources */, 25602 25611 9712A5AD15004EDA0048AF10 /* DOMWindowIndexedDatabase.cpp in Sources */, 25612 97B38E28151C4273004622E9 /* DOMWindowNotifications.cpp in Sources */, 25603 25613 97D2AD0314B823A60093DF32 /* DOMWindowProperty.cpp in Sources */, 25604 25614 97BC6A341505F081001B74AC /* DOMWindowSQLDatabase.cpp in Sources */, -
trunk/Source/WebCore/page/DOMWindow.cpp
r111243 r111832 46 46 #include "DOMTokenList.h" 47 47 #include "DOMURL.h" 48 #include "DOMWindowNotifications.h" 48 49 #include "Database.h" 49 50 #include "DatabaseCallback.h" … … 73 74 #include "MessageEvent.h" 74 75 #include "Navigator.h" 75 #include "NotificationCenter.h"76 #include "NotificationController.h"77 76 #include "Page.h" 78 77 #include "PageGroup.h" … … 419 418 ASSERT(!m_localStorage); 420 419 ASSERT(!m_applicationCache); 421 #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)422 ASSERT(!m_notifications);423 #endif424 420 #if ENABLE(BLOB) 425 421 ASSERT(!m_domURL); … … 786 782 787 783 #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS) 788 NotificationCenter* DOMWindow::webkitNotifications() const789 {790 if (!isCurrentlyDisplayedInFrame())791 return 0;792 if (m_notifications)793 return m_notifications.get();794 795 Document* document = this->document();796 if (!document)797 return 0;798 799 Page* page = document->page();800 if (!page)801 return 0;802 803 NotificationClient* provider = NotificationController::clientFrom(page);804 if (provider)805 m_notifications = NotificationCenter::create(document, provider);806 807 return m_notifications.get();808 }809 810 784 void DOMWindow::resetNotifications() 811 785 { 812 if (!m_notifications) 813 return; 814 m_notifications->disconnectFrame(); 815 m_notifications = 0; 786 DOMWindowNotifications::reset(this); 816 787 } 817 788 #endif -
trunk/Source/WebCore/page/DOMWindow.h
r111141 r111832 57 57 class Navigator; 58 58 class Node; 59 class NotificationCenter;60 59 class Page; 61 60 class Performance; … … 358 357 359 358 #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS) 360 NotificationCenter* webkitNotifications() const;361 // Renders webkitNotifications object safely inoperable, disconnects362 // if from embedder-provided NotificationClient.363 359 void resetNotifications(); 364 360 #endif … … 451 447 mutable RefPtr<DOMApplicationCache> m_applicationCache; 452 448 453 #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)454 mutable RefPtr<NotificationCenter> m_notifications;455 #endif456 457 449 #if ENABLE(WEB_TIMING) 458 450 mutable RefPtr<Performance> m_performance; -
trunk/Source/WebCore/page/DOMWindow.idl
r111141 r111832 170 170 readonly attribute [V8EnabledAtRuntime] Storage localStorage 171 171 getter raises(DOMException); 172 173 #if (defined(ENABLE_NOTIFICATIONS) && ENABLE_NOTIFICATIONS) || (defined(ENABLE_LEGACY_NOTIFICATIONS) && ENABLE_LEGACY_NOTIFICATIONS)174 readonly attribute [V8EnabledAtRuntime] NotificationCenter webkitNotifications;175 #endif176 172 177 173 #if defined(ENABLE_ORIENTATION_EVENTS) && ENABLE_ORIENTATION_EVENTS
Note: See TracChangeset
for help on using the changeset viewer.