Changeset 130214 in webkit
- Timestamp:
- Oct 2, 2012, 2:49:33 PM (13 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r130208 r130214 1 2012-10-02 Alexey Proskuryakov <ap@apple.com> 2 3 <rdar://problem/12407139> WebKit2 should provide API that returns all pages in the same process as a given page 4 https://bugs.webkit.org/show_bug.cgi?id=98193 5 6 Reviewed by Sam Weinig. 7 8 * UIProcess/API/C/WKPage.cpp: 9 (WKPageCopyRelatedPages): 10 * UIProcess/API/C/WKPagePrivate.h: 11 * UIProcess/WebPageProxy.cpp: 12 (WebKit::WebPageProxy::relatedPages): 13 * UIProcess/WebPageProxy.h: 14 * UIProcess/WebProcessProxy.cpp: 15 (WebKit::WebProcessProxy::pages): 16 * UIProcess/WebProcessProxy.h: 17 Added. This should work once a process has crashed, too. 18 1 19 2012-10-02 Anders Carlsson <andersca@apple.com> 2 20 -
trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp
r129545 r130214 739 739 } 740 740 741 WKArrayRef WKPageCopyRelatedPages(WKPageRef pageRef) 742 { 743 return toAPI(toImpl(pageRef)->relatedPages().leakRef()); 744 } -
trunk/Source/WebKit2/UIProcess/API/C/WKPagePrivate.h
r122393 r130214 95 95 WK_EXPORT void WKPageSetMediaVolume(WKPageRef page, float volume); 96 96 97 WK_EXPORT WKArrayRef WKPageCopyRelatedPages(WKPageRef page); 98 97 99 #ifdef __cplusplus 98 100 } -
trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp
r130033 r130214 278 278 } 279 279 280 PassRefPtr<ImmutableArray> WebPageProxy::relatedPages() const 281 { 282 Vector<WebPageProxy*> pages = m_process->pages(); 283 ASSERT(pages.contains(this)); 284 285 Vector<RefPtr<APIObject> > result; 286 result.reserveCapacity(pages.size() - 1); 287 for (size_t i = 0; i < pages.size(); ++i) { 288 if (pages[i] != this) 289 result.append(pages[i]); 290 } 291 292 return ImmutableArray::adopt(result); 293 } 294 280 295 void WebPageProxy::initializeLoaderClient(const WKPageLoaderClient* loadClient) 281 296 { -
trunk/Source/WebKit2/UIProcess/WebPageProxy.h
r130031 r130214 623 623 624 624 bool isValid(); 625 626 PassRefPtr<ImmutableArray> relatedPages() const; 625 627 626 628 const String& urlAtProcessExit() const { return m_urlAtProcessExit; } -
trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp
r129451 r130214 187 187 } 188 188 189 Vector<WebPageProxy*> WebProcessProxy::pages() const 190 { 191 Vector<WebPageProxy*> result; 192 copyValuesToVector(m_pageMap, result); 193 return result; 194 } 195 189 196 #if ENABLE(WEB_INTENTS) 190 197 void WebProcessProxy::removeMessagePortChannel(uint64_t channelID) -
trunk/Source/WebKit2/UIProcess/WebProcessProxy.h
r129451 r130214 85 85 void addExistingWebPage(WebPageProxy*, uint64_t pageID); 86 86 void removeWebPage(uint64_t pageID); 87 Vector<WebPageProxy*> pages() const; 87 88 88 89 #if ENABLE(WEB_INTENTS)
Note:
See TracChangeset
for help on using the changeset viewer.