PDFPlugin: getMainResourceDataOfFrame should return PDFPlugin's data so that Save...
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Jan 2013 21:42:22 +0000 (21:42 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Jan 2013 21:42:22 +0000 (21:42 +0000)
commit0518f4c53978a2c1cba6ccdc2d35fa7d5ef16ecf
tree1a2ed739ed3babe2b56e6d7a81af918027511b97
parentebcbbe68cb2b86e6cbaceae6a8804935d638ce36
PDFPlugin: getMainResourceDataOfFrame should return PDFPlugin's data so that Save... works
https://bugs.webkit.org/show_bug.cgi?id=108060
<rdar://problem/13075454>

Reviewed by Sam Weinig.

* WebProcess/Plugins/Netscape/NetscapePlugin.h: Implement getResourceData.
* WebProcess/Plugins/PDF/SimplePDFPlugin.h:
* WebProcess/Plugins/PDF/SimplePDFPlugin.mm: Implement getResourceData, returning the accumulated
data if it exists and has finished loading.
(WebKit::SimplePDFPlugin::getResourceData):
* WebProcess/Plugins/Plugin.h: Add getResourceData, which hands out a raw pointer/size pair
to the plugin's "main resource" data.
* WebProcess/Plugins/PluginProxy.h: Implement getResourceData.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::getResourceData): Forward getResourceData through to the plugin.
* WebProcess/Plugins/PluginView.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::getMainResourceDataOfFrame): If the requested frame is backed by a PluginDocument,
attempt to ask the PluginView for its resource data.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@141004 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h
Source/WebKit2/WebProcess/Plugins/PDF/SimplePDFPlugin.h
Source/WebKit2/WebProcess/Plugins/PDF/SimplePDFPlugin.mm
Source/WebKit2/WebProcess/Plugins/Plugin.h
Source/WebKit2/WebProcess/Plugins/PluginProxy.h
Source/WebKit2/WebProcess/Plugins/PluginView.cpp
Source/WebKit2/WebProcess/Plugins/PluginView.h
Source/WebKit2/WebProcess/WebPage/WebPage.cpp