Changeset 150785 in webkit
- Timestamp:
- May 27, 2013 5:02:46 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 1 deleted
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r150767 r150785 1 2013-05-26 Jon Lee <jonlee@apple.com> 2 3 [WK2] Notifications clobber each other with multiple processes 4 https://bugs.webkit.org/show_bug.cgi?id=116428 5 <rdar://problem/13935191> 6 7 Reviewed by Darin Adler. 8 9 * ManualTests/notification-in-multiple-windows.html: Added. 10 1 11 2013-05-27 Patrick Gansterer <paroga@webkit.org> 2 12 -
trunk/Source/WebKit2/CMakeLists.txt
r150679 r150785 552 552 UIProcess/Downloads/DownloadProxy.messages.in 553 553 554 UIProcess/Notifications/WebNotificationManagerProxy.messages.in555 556 554 UIProcess/Plugins/PluginProcessProxy.messages.in 557 555 -
trunk/Source/WebKit2/ChangeLog
r150774 r150785 1 2013-05-26 Jon Lee <jonlee@apple.com> 2 3 [WK2] Notifications clobber each other with multiple processes 4 https://bugs.webkit.org/show_bug.cgi?id=116428 5 <rdar://problem/13935191> 6 7 Reviewed by Darin Adler. 8 9 With multiple processes, the notification IDs, when passed up to the UI process, can clobber 10 each other. To fix this, we need to maintain a global map of notification IDs. This map is 11 keyed by its own unique notification ID, and maps to a pair containing the web page ID and that 12 web page's ID for the notification. 13 14 Now that we maintain groups of notifications based on the web page, we no longer send IPC messages 15 from WebNotificationManager to WebNotificationManagerProxy; instead we send messages to the 16 WebPageProxy. This removes the need for WebNotificationManagerProxy to be a message receiver. 17 18 When a page closes, all of the web notifications are cleared out. However, by the time the 19 WebPage::close() is called, the connection between WebPage and WebPageProxy is destroyed. Since 20 the WebPage is told to close from the UI process anyway, we clear out the notifications separately, 21 instead of waiting for a message from the WebPage. 22 23 * UIProcess/Notifications/WebNotificationManagerProxy.h: Update to take into account the 24 notification's web page. Remove inheritance of CoreIPC::MessageReceiver. Expose the original message 25 handlers as public functions, since they will be called from WebPageProxy. Add a new map that 26 associates a global ID with a notification ID that came from a web page. 27 There are now two flavors of clearNotifications(). One clears out all notifications associated 28 with a web page. This is called when the page is closed. The other clears out a subset of 29 notifications associated with a web page. This is called when notifications associated with a sub-frame 30 is closed. 31 * UIProcess/Notifications/WebNotificationManagerProxy.messages.in: Removed. All messages from 32 the web process go to WebPageProxy now. 33 34 * UIProcess/Notifications/WebNotificationManagerProxy.cpp: Update to take into account the 35 notification's web page. 36 37 (WebKit::generateGlobalNotificationID): The manager proxy now maintains its own global notification 38 ID generator. 39 (WebKit::WebNotificationManagerProxy::WebNotificationManagerProxy): The proxy is no longer a 40 message receiver. Remove code that registers it as such. 41 42 (WebKit::WebNotificationManagerProxy::show): Refactor to differentiate between the notification ID 43 that came from the web process, and the global notification ID the proxy maintains. Add the mapping 44 from the global ID to the (web page ID, notification ID) pair. 45 (WebKit::WebNotificationManagerProxy::cancel): Refactor to take into consideration the web page. 46 (WebKit::WebNotificationManagerProxy::didDestroyNotification): Refactor to take into consideration 47 the web page. Fixes a leak where we did not remove the item from the maps. This function is called 48 from the web process, when the ScriptExecutionContext is destroyed, so we remove it from our maps 49 before we pass the message along to the provider. 50 51 Helper functions that evaluate when a given notification in the map matches the desired parameters. 52 (WebKit::pageIDsMatch): The notification is associated with the provided page. 53 (WebKit::pageAndNotificationIDsMatch): The notification is associated with the provided page and is 54 contained within the list of provided notifications. 55 56 (WebKit::WebNotificationManagerProxy::clearNotifications): Changed to only remove notifications 57 associated with the provided web page, and could include a specific list of notifications. This latter 58 situation occurs if notifications were associated with an iframe, and that iframe was removed. 59 There is an O(n) walk that could be make more efficient using another hash map, but that's overhead 60 for a map that should be small in size anyway. 61 62 (WebKit::WebNotificationManagerProxy::providerDidShowNotification): Refactor to take into 63 consideration the web page. 64 (WebKit::WebNotificationManagerProxy::providerDidClickNotification): Refactor to take into 65 consideration the web page. 66 (WebKit::WebNotificationManagerProxy::providerDidCloseNotifications): Now we need to comb through 67 the list of global IDs and put them in buckets based on the notification's web pages. After that 68 is done we can send the DidCloseNotifications() to those pages' processes. There is a possible 69 extra optimization here where we group based on the page's process instead, to reduce the number 70 of messages sent to processes. 71 72 * UIProcess/WebPageProxy.cpp: 73 (WebKit::WebPageProxy::close): When a web page is closed, we clear the notifications associated 74 with the page. 75 (WebKit::WebPageProxy::cancelNotification): Forward call to WebNotificationManagerProxy. 76 (WebKit::WebPageProxy::clearNotifications): Ditto. 77 (WebKit::WebPageProxy::didDestroyNotification): Ditto. 78 * UIProcess/WebPageProxy.h: 79 * UIProcess/WebPageProxy.messages.in: 80 81 * WebProcess/Notifications/NotificationPermissionRequestManager.cpp: 82 * WebProcess/Notifications/WebNotificationManager.cpp: 83 (WebKit::WebNotificationManager::cancel): 84 (WebKit::WebNotificationManager::clearNotifications): 85 (WebKit::WebNotificationManager::didDestroyNotification): 86 * WebProcess/Notifications/NotificationPermissionRequestManager.cpp: Remove extraneous include. 87 88 * CMakeLists.txt: Remove WebNotificationManagerProxy.messages.in and related files. 89 * DerivedSources.pri: Ditto. 90 * DerivedSources.make: Ditto. 91 * GNUmakefile.list.am: Ditto. 92 * WebKit2.xcodeproj/project.pbxproj: Ditto. 93 1 94 2013-05-27 Tim Horton <timothy_horton@apple.com> 2 95 -
trunk/Source/WebKit2/DerivedSources.make
r150305 r150785 105 105 WebMediaCacheManager \ 106 106 WebMediaCacheManagerProxy \ 107 WebNotificationManagerProxy \108 107 WebNotificationManager \ 109 108 WebPage \ -
trunk/Source/WebKit2/DerivedSources.pri
r150327 r150785 98 98 WebNetworkInfoManager.messages.in \ 99 99 WebNetworkInfoManagerProxy.messages.in \ 100 WebNotificationManagerProxy.messages.in \101 100 WebNotificationManager.messages.in \ 102 101 WebFullScreenManager.messages.in \ -
trunk/Source/WebKit2/GNUmakefile.list.am
r150745 r150785 215 215 DerivedSources/WebKit2/WebNotificationManagerMessageReceiver.cpp \ 216 216 DerivedSources/WebKit2/WebNotificationManagerMessages.h \ 217 DerivedSources/WebKit2/WebNotificationManagerProxyMessageReceiver.cpp \218 DerivedSources/WebKit2/WebNotificationManagerProxyMessages.h \219 217 DerivedSources/WebKit2/WebPageGroupProxyMessageReceiver.cpp \ 220 218 DerivedSources/WebKit2/WebPageGroupProxyMessages.h \ -
trunk/Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.cpp
r150020 r150785 32 32 #include "WebNotification.h" 33 33 #include "WebNotificationManagerMessages.h" 34 #include "WebNotificationManagerProxyMessages.h"35 34 #include "WebPageProxy.h" 35 #include "WebProcessProxy.h" 36 36 #include "WebSecurityOrigin.h" 37 37 38 using namespace std; 38 39 using namespace WTF; 39 40 using namespace WebCore; … … 41 42 namespace WebKit { 42 43 44 static uint64_t generateGlobalNotificationID() 45 { 46 static uint64_t uniqueGlobalNotificationID = 1; 47 return uniqueGlobalNotificationID++; 48 } 49 43 50 const char* WebNotificationManagerProxy::supplementName() 44 51 { … … 54 61 : WebContextSupplement(context) 55 62 { 56 WebContextSupplement::context()->addMessageReceiver(Messages::WebNotificationManagerProxy::messageReceiverName(), this);57 63 } 58 64 … … 79 85 APIObject::deref(); 80 86 } 81 82 // CoreIPC::MessageReceiver83 87 84 88 void WebNotificationManagerProxy::populateCopyOfNotificationPermissions(HashMap<String, bool>& permissions) … … 97 101 } 98 102 99 void WebNotificationManagerProxy::show(WebPageProxy* page, const String& title, const String& body, const String& iconURL, const String& tag, const String& lang, const String& dir, const String& originString, uint64_t notificationID) 100 { 101 if (!isNotificationIDValid(notificationID)) 102 return; 103 104 RefPtr<WebNotification> notification = WebNotification::create(title, body, iconURL, tag, lang, dir, originString, notificationID); 105 m_notifications.set(notificationID, notification); 106 m_provider.show(page, notification.get()); 107 } 108 109 void WebNotificationManagerProxy::cancel(uint64_t notificationID) 110 { 111 if (!isNotificationIDValid(notificationID)) 112 return; 113 114 RefPtr<WebNotification> notification = m_notifications.get(notificationID); 115 if (!notification) 116 return; 117 118 m_provider.cancel(notification.get()); 119 } 120 121 void WebNotificationManagerProxy::didDestroyNotification(uint64_t notificationID) 122 { 123 if (!isNotificationIDValid(notificationID)) 124 return; 125 126 RefPtr<WebNotification> notification = m_notifications.take(notificationID); 127 if (!notification) 128 return; 129 130 m_provider.didDestroyNotification(notification.get()); 131 } 132 133 void WebNotificationManagerProxy::clearNotifications(const Vector<uint64_t>& notificationIDs) 134 { 135 m_provider.clearNotifications(notificationIDs); 136 size_t count = notificationIDs.size(); 137 for (size_t i = 0; i < count; ++i) 138 m_notifications.remove(notificationIDs[i]); 139 } 140 141 void WebNotificationManagerProxy::providerDidShowNotification(uint64_t notificationID) 142 { 143 if (!context()) 144 return; 145 146 context()->sendToAllProcesses(Messages::WebNotificationManager::DidShowNotification(notificationID)); 147 } 148 149 void WebNotificationManagerProxy::providerDidClickNotification(uint64_t notificationID) 150 { 151 if (!context()) 152 return; 153 154 context()->sendToAllProcesses(Messages::WebNotificationManager::DidClickNotification(notificationID)); 155 } 156 157 158 void WebNotificationManagerProxy::providerDidCloseNotifications(ImmutableArray* notificationIDs) 159 { 160 if (!context()) 161 return; 162 163 size_t size = notificationIDs->size(); 164 165 Vector<uint64_t> vectorNotificationIDs; 166 vectorNotificationIDs.reserveInitialCapacity(size); 167 103 void WebNotificationManagerProxy::show(WebPageProxy* webPage, const String& title, const String& body, const String& iconURL, const String& tag, const String& lang, const String& dir, const String& originString, uint64_t pageNotificationID) 104 { 105 uint64_t globalNotificationID = generateGlobalNotificationID(); 106 RefPtr<WebNotification> notification = WebNotification::create(title, body, iconURL, tag, lang, dir, originString, globalNotificationID); 107 pair<uint64_t, uint64_t> notificationIDPair = make_pair(webPage->pageID(), pageNotificationID); 108 m_globalNotificationMap.set(globalNotificationID, notificationIDPair); 109 m_notifications.set(notificationIDPair, make_pair(globalNotificationID, notification)); 110 m_provider.show(webPage, notification.get()); 111 } 112 113 void WebNotificationManagerProxy::cancel(WebPageProxy* webPage, uint64_t pageNotificationID) 114 { 115 if (WebNotification* notification = m_notifications.get(make_pair(webPage->pageID(), pageNotificationID)).second.get()) 116 m_provider.cancel(notification); 117 } 118 119 void WebNotificationManagerProxy::didDestroyNotification(WebPageProxy* webPage, uint64_t pageNotificationID) 120 { 121 auto globalIDNotificationPair = m_notifications.take(make_pair(webPage->pageID(), pageNotificationID)); 122 if (uint64_t globalNotificationID = globalIDNotificationPair.first) { 123 WebNotification* notification = globalIDNotificationPair.second.get(); 124 m_globalNotificationMap.remove(globalNotificationID); 125 m_provider.didDestroyNotification(notification); 126 } 127 } 128 129 static bool pageIDsMatch(uint64_t pageID, uint64_t, uint64_t desiredPageID, const Vector<uint64_t>&) 130 { 131 return pageID == desiredPageID; 132 } 133 134 static bool pageAndNotificationIDsMatch(uint64_t pageID, uint64_t pageNotificationID, uint64_t desiredPageID, const Vector<uint64_t>& desiredPageNotificationIDs) 135 { 136 return pageID == desiredPageID && desiredPageNotificationIDs.contains(pageNotificationID); 137 } 138 139 void WebNotificationManagerProxy::clearNotifications(WebPageProxy* webPage) 140 { 141 clearNotifications(webPage, Vector<uint64_t>(), pageIDsMatch); 142 } 143 144 void WebNotificationManagerProxy::clearNotifications(WebPageProxy* webPage, const Vector<uint64_t>& pageNotificationIDs) 145 { 146 clearNotifications(webPage, pageNotificationIDs, pageAndNotificationIDsMatch); 147 } 148 149 void WebNotificationManagerProxy::clearNotifications(WebPageProxy* webPage, const Vector<uint64_t>& pageNotificationIDs, NotificationFilterFunction filterFunction) 150 { 151 uint64_t targetPageID = webPage->pageID(); 152 153 Vector<uint64_t> globalNotificationIDs; 154 globalNotificationIDs.reserveCapacity(m_globalNotificationMap.size()); 155 156 for (auto it = m_notifications.begin(), end = m_notifications.end(); it != end; ++it) { 157 uint64_t webPageID = it->key.first; 158 uint64_t pageNotificationID = it->key.second; 159 if (!filterFunction(webPageID, pageNotificationID, targetPageID, pageNotificationIDs)) 160 continue; 161 162 uint64_t globalNotificationID = it->value.first; 163 globalNotificationIDs.append(globalNotificationID); 164 } 165 166 for (auto it = globalNotificationIDs.begin(), end = globalNotificationIDs.end(); it != end; ++it) { 167 auto pageNotification = m_globalNotificationMap.take(*it); 168 m_notifications.remove(pageNotification); 169 } 170 171 m_provider.clearNotifications(globalNotificationIDs); 172 } 173 174 void WebNotificationManagerProxy::providerDidShowNotification(uint64_t globalNotificationID) 175 { 176 auto it = m_globalNotificationMap.find(globalNotificationID); 177 if (it == m_globalNotificationMap.end()) 178 return; 179 180 uint64_t webPageID = it->value.first; 181 WebPageProxy* webPage = WebProcessProxy::webPage(webPageID); 182 if (!webPage) 183 return; 184 185 uint64_t pageNotificationID = it->value.second; 186 webPage->process()->send(Messages::WebNotificationManager::DidShowNotification(pageNotificationID), 0); 187 } 188 189 void WebNotificationManagerProxy::providerDidClickNotification(uint64_t globalNotificationID) 190 { 191 auto it = m_globalNotificationMap.find(globalNotificationID); 192 if (it == m_globalNotificationMap.end()) 193 return; 194 195 uint64_t webPageID = it->value.first; 196 WebPageProxy* webPage = WebProcessProxy::webPage(webPageID); 197 if (!webPage) 198 return; 199 200 uint64_t pageNotificationID = it->value.second; 201 webPage->process()->send(Messages::WebNotificationManager::DidClickNotification(pageNotificationID), 0); 202 } 203 204 205 void WebNotificationManagerProxy::providerDidCloseNotifications(ImmutableArray* globalNotificationIDs) 206 { 207 HashMap<WebPageProxy*, Vector<uint64_t>> pageNotificationIDs; 208 209 size_t size = globalNotificationIDs->size(); 168 210 for (size_t i = 0; i < size; ++i) { 169 uint64_t notificationID = notificationIDs->at<WebUInt64>(i)->value(); 170 vectorNotificationIDs.append(notificationID); 171 } 172 173 if (vectorNotificationIDs.size()) 174 context()->sendToAllProcesses(Messages::WebNotificationManager::DidCloseNotifications(vectorNotificationIDs)); 211 auto it = m_globalNotificationMap.find(globalNotificationIDs->at<WebUInt64>(i)->value()); 212 if (it == m_globalNotificationMap.end()) 213 continue; 214 215 if (WebPageProxy* webPage = WebProcessProxy::webPage(it->value.first)) { 216 auto pageIt = pageNotificationIDs.find(webPage); 217 if (pageIt == pageNotificationIDs.end()) { 218 Vector<uint64_t> newVector; 219 newVector.reserveInitialCapacity(size); 220 pageIt = pageNotificationIDs.add(webPage, newVector).iterator; 221 } 222 223 uint64_t pageNotificationID = it->value.second; 224 pageIt->value.append(pageNotificationID); 225 } 226 227 m_notifications.remove(it->value); 228 m_globalNotificationMap.remove(it); 229 } 230 231 for (auto it = pageNotificationIDs.begin(), end = pageNotificationIDs.end(); it != end; ++it) 232 it->key->process()->send(Messages::WebNotificationManager::DidCloseNotifications(it->value), 0); 175 233 } 176 234 -
trunk/Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.h
r150020 r150785 44 44 class WebSecurityOrigin; 45 45 46 class WebNotificationManagerProxy : public TypedAPIObject<APIObject::TypeNotificationManager>, public WebContextSupplement , private CoreIPC::MessageReceiver{46 class WebNotificationManagerProxy : public TypedAPIObject<APIObject::TypeNotificationManager>, public WebContextSupplement { 47 47 public: 48 48 … … 54 54 void populateCopyOfNotificationPermissions(HashMap<String, bool>&); 55 55 56 void show(WebPageProxy*, const String& title, const String& body, const String& iconURL, const String& tag, const String& lang, const String& dir, const String& originString, uint64_t notificationID); 56 void show(WebPageProxy*, const String& title, const String& body, const String& iconURL, const String& tag, const String& lang, const String& dir, const String& originString, uint64_t pageNotificationID); 57 void cancel(WebPageProxy*, uint64_t pageNotificationID); 58 void clearNotifications(WebPageProxy*); 59 void clearNotifications(WebPageProxy*, const Vector<uint64_t>& pageNotificationIDs); 60 void didDestroyNotification(WebPageProxy*, uint64_t pageNotificationID); 57 61 58 62 void providerDidShowNotification(uint64_t notificationID); … … 68 72 explicit WebNotificationManagerProxy(WebContext*); 69 73 74 typedef bool (*NotificationFilterFunction)(uint64_t pageID, uint64_t pageNotificationID, uint64_t desiredPageID, const Vector<uint64_t>& desiredPageNotificationIDs); 75 void clearNotifications(WebPageProxy*, const Vector<uint64_t>& pageNotificationIDs, NotificationFilterFunction); 76 70 77 // WebContextSupplement 71 78 virtual void contextDestroyed() OVERRIDE; … … 73 80 virtual void derefWebContextSupplement() OVERRIDE; 74 81 75 // CoreIPC::MessageReceiver76 virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&) OVERRIDE;77 78 // Message handlers79 void cancel(uint64_t notificationID);80 void didDestroyNotification(uint64_t notificationID);81 void clearNotifications(const Vector<uint64_t>& notificationIDs);82 83 typedef HashMap<uint64_t, RefPtr<WebNotification>> WebNotificationMap;84 85 82 WebNotificationProvider m_provider; 86 WebNotificationMap m_notifications; 83 // Pair comprised of web page ID and the web process's notification ID 84 HashMap<uint64_t, pair<uint64_t, uint64_t>> m_globalNotificationMap; 85 // Key pair comprised of web page ID and the web process's notification ID; value pair comprised of global notification ID, and notification object 86 HashMap<pair<uint64_t, uint64_t>, pair<uint64_t, RefPtr<WebNotification>>> m_notifications; 87 87 }; 88 88 -
trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp
r150624 r150785 592 592 593 593 m_notificationPermissionRequestManager.invalidateRequests(); 594 m_process->context()->supplement<WebNotificationManagerProxy>()->clearNotifications(this); 594 595 595 596 m_toolTip = String(); … … 4104 4105 } 4105 4106 4107 void WebPageProxy::cancelNotification(uint64_t notificationID) 4108 { 4109 m_process->context()->supplement<WebNotificationManagerProxy>()->cancel(this, notificationID); 4110 } 4111 4112 void WebPageProxy::clearNotifications(const Vector<uint64_t>& notificationIDs) 4113 { 4114 m_process->context()->supplement<WebNotificationManagerProxy>()->clearNotifications(this, notificationIDs); 4115 } 4116 4117 void WebPageProxy::didDestroyNotification(uint64_t notificationID) 4118 { 4119 m_process->context()->supplement<WebNotificationManagerProxy>()->didDestroyNotification(this, notificationID); 4120 } 4121 4106 4122 float WebPageProxy::headerHeight(WebFrameProxy* frame) 4107 4123 { -
trunk/Source/WebKit2/UIProcess/WebPageProxy.h
r150521 r150785 873 873 void requestNotificationPermission(uint64_t notificationID, const String& originString); 874 874 void showNotification(const String& title, const String& body, const String& iconURL, const String& tag, const String& lang, const String& dir, const String& originString, uint64_t notificationID); 875 875 void cancelNotification(uint64_t notificationID); 876 void clearNotifications(const Vector<uint64_t>& notificationIDs); 877 void didDestroyNotification(uint64_t notificationID); 878 876 879 #if USE(TILED_BACKING_STORE) 877 880 void pageDidRequestScroll(const WebCore::IntPoint&); -
trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in
r150484 r150785 221 221 RequestNotificationPermission(uint64_t requestID, WTF::String originIdentifier) 222 222 ShowNotification(WTF::String title, WTF::String body, WTF::String iconURL, WTF::String tag, WTF::String lang, WTF::String dir, WTF::String originIdentifier, uint64_t notificationID) 223 CancelNotification(uint64_t notificationID) 224 ClearNotifications(Vector<uint64_t> notificationIDs) 225 DidDestroyNotification(uint64_t notificationID) 223 226 224 227 # Spelling and grammar messages -
trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
r150669 r150785 335 335 31312620148FF82C00BA2A39 /* WebNotificationManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3131261B148FF82B00BA2A39 /* WebNotificationManager.cpp */; }; 336 336 31312621148FF82C00BA2A39 /* WebNotificationManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 3131261C148FF82B00BA2A39 /* WebNotificationManager.h */; }; 337 318BE1671473433700A8FBB2 /* WebNotificationManagerProxyMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 318BE1651473433700A8FBB2 /* WebNotificationManagerProxyMessageReceiver.cpp */; };338 318BE1681473433700A8FBB2 /* WebNotificationManagerProxyMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 318BE1661473433700A8FBB2 /* WebNotificationManagerProxyMessages.h */; };339 337 318BE17114743DB100A8FBB2 /* WKNotificationManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 318BE17014743DB100A8FBB2 /* WKNotificationManager.h */; settings = {ATTRIBUTES = (Private, ); }; }; 340 338 318BE17514743DD700A8FBB2 /* WKNotificationManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 318BE17414743DD600A8FBB2 /* WKNotificationManager.cpp */; }; … … 1791 1789 3131261C148FF82B00BA2A39 /* WebNotificationManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebNotificationManager.h; sourceTree = "<group>"; }; 1792 1790 3131261D148FF82C00BA2A39 /* WebNotificationManager.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebNotificationManager.messages.in; sourceTree = "<group>"; }; 1793 318BE1651473433700A8FBB2 /* WebNotificationManagerProxyMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebNotificationManagerProxyMessageReceiver.cpp; sourceTree = "<group>"; };1794 318BE1661473433700A8FBB2 /* WebNotificationManagerProxyMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebNotificationManagerProxyMessages.h; sourceTree = "<group>"; };1795 1791 318BE17014743DB100A8FBB2 /* WKNotificationManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKNotificationManager.h; sourceTree = "<group>"; }; 1796 1792 318BE17414743DD600A8FBB2 /* WKNotificationManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKNotificationManager.cpp; sourceTree = "<group>"; }; … … 1801 1797 31A2EC43148997BE00810D71 /* WebNotificationManagerProxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebNotificationManagerProxy.cpp; sourceTree = "<group>"; }; 1802 1798 31A2EC44148997BF00810D71 /* WebNotificationManagerProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebNotificationManagerProxy.h; sourceTree = "<group>"; }; 1803 31A2EC45148997BF00810D71 /* WebNotificationManagerProxy.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebNotificationManagerProxy.messages.in; sourceTree = "<group>"; };1804 1799 31A2EC46148997C000810D71 /* WebNotificationProvider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebNotificationProvider.cpp; sourceTree = "<group>"; }; 1805 1800 31A2EC47148997C100810D71 /* WebNotificationProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebNotificationProvider.h; sourceTree = "<group>"; }; … … 3567 3562 31A2EC43148997BE00810D71 /* WebNotificationManagerProxy.cpp */, 3568 3563 31A2EC44148997BF00810D71 /* WebNotificationManagerProxy.h */, 3569 31A2EC45148997BF00810D71 /* WebNotificationManagerProxy.messages.in */,3570 3564 31A2EC46148997C000810D71 /* WebNotificationProvider.cpp */, 3571 3565 31A2EC47148997C100810D71 /* WebNotificationProvider.h */, … … 5120 5114 31BA9248148830810062EDB5 /* WebNotificationManagerMessageReceiver.cpp */, 5121 5115 31BA9249148830810062EDB5 /* WebNotificationManagerMessages.h */, 5122 318BE1651473433700A8FBB2 /* WebNotificationManagerProxyMessageReceiver.cpp */,5123 318BE1661473433700A8FBB2 /* WebNotificationManagerProxyMessages.h */,5124 5116 29D55DEF161BF9F10031A2E3 /* WebPageGroupProxyMessageReceiver.cpp */, 5125 5117 29D55DF0161BF9F10031A2E3 /* WebPageGroupProxyMessages.h */, … … 5624 5616 31BA924E148831260062EDB5 /* WebNotificationManagerMessages.h in Headers */, 5625 5617 31A2EC4B148997C200810D71 /* WebNotificationManagerProxy.h in Headers */, 5626 318BE1681473433700A8FBB2 /* WebNotificationManagerProxyMessages.h in Headers */,5627 5618 31A2EC4E148997C200810D71 /* WebNotificationProvider.h in Headers */, 5628 5619 BC33DD681238464600360F3F /* WebNumber.h in Headers */, … … 6901 6892 31BA924D148831260062EDB5 /* WebNotificationManagerMessageReceiver.cpp in Sources */, 6902 6893 31A2EC4A148997C200810D71 /* WebNotificationManagerProxy.cpp in Sources */, 6903 318BE1671473433700A8FBB2 /* WebNotificationManagerProxyMessageReceiver.cpp in Sources */,6904 6894 31A2EC4D148997C200810D71 /* WebNotificationProvider.cpp in Sources */, 6905 6895 BC857FB612B830E600EDEB2E /* WebOpenPanelParameters.cpp in Sources */, -
trunk/Source/WebKit2/WebProcess/Notifications/NotificationPermissionRequestManager.cpp
r138520 r150785 28 28 29 29 #include "WebCoreArgumentCoders.h" 30 #include "WebNotificationManagerProxyMessages.h"31 30 #include "WebPage.h" 32 31 #include "WebPageProxyMessages.h" -
trunk/Source/WebKit2/WebProcess/Notifications/WebNotificationManager.cpp
r150669 r150785 34 34 #include "WebNotification.h" 35 35 #include "WebNotificationManagerMessages.h" 36 #include "WebNotificationManagerProxyMessages.h"37 36 #include "WebPageProxyMessages.h" 38 37 #include <WebCore/Document.h> … … 176 175 return; 177 176 178 m_process->parentProcessConnection()->send(Messages::Web NotificationManagerProxy::Cancel(notificationID), 0);177 m_process->parentProcessConnection()->send(Messages::WebPageProxy::CancelNotification(notificationID), page->pageID()); 179 178 #else 180 179 UNUSED_PARAM(notification); … … 189 188 if (it == m_notificationContextMap.end()) 190 189 return; 191 190 192 191 Vector<uint64_t>& notificationIDs = it->value; 193 m_process->parentProcessConnection()->send(Messages::Web NotificationManagerProxy::ClearNotifications(notificationIDs), 0);192 m_process->parentProcessConnection()->send(Messages::WebPageProxy::ClearNotifications(notificationIDs), page->pageID()); 194 193 size_t count = notificationIDs.size(); 195 194 for (size_t i = 0; i < count; ++i) { … … 217 216 m_notificationIDMap.remove(notificationID); 218 217 removeNotificationFromContextMap(notificationID, notification); 219 m_process->parentProcessConnection()->send(Messages::Web NotificationManagerProxy::DidDestroyNotification(notificationID), 0);218 m_process->parentProcessConnection()->send(Messages::WebPageProxy::DidDestroyNotification(notificationID), page->pageID()); 220 219 #else 221 220 UNUSED_PARAM(notification);
Note: See TracChangeset
for help on using the changeset viewer.