summaryrefslogtreecommitdiffstats
path: root/webkit/plugins/ppapi/ppapi_plugin_instance.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-22 00:05:17 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-22 00:05:17 +0000
commitc8f73aba9f1fd8b2e0a34fcca08a1e968ddd8244 (patch)
treed2658c6f1da345a1f38531809250c934dd4d73fa /webkit/plugins/ppapi/ppapi_plugin_instance.cc
parent090d7108424b5a8600e1b590b2227e52f23d6e7e (diff)
downloadchromium_src-c8f73aba9f1fd8b2e0a34fcca08a1e968ddd8244.zip
chromium_src-c8f73aba9f1fd8b2e0a34fcca08a1e968ddd8244.tar.gz
chromium_src-c8f73aba9f1fd8b2e0a34fcca08a1e968ddd8244.tar.bz2
When we detect a PDF with an unsupported feature, ask the user if they want to view it with Adobe Reader if it's installed. If it's not, ask them if they want to launch the url to install it. If it's installed and out of date, show an interstitial.
BUG=65339 Review URL: http://codereview.chromium.org/6259008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72240 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/plugins/ppapi/ppapi_plugin_instance.cc')
-rw-r--r--webkit/plugins/ppapi/ppapi_plugin_instance.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/webkit/plugins/ppapi/ppapi_plugin_instance.cc b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
index dfe1456..8a9f62a 100644
--- a/webkit/plugins/ppapi/ppapi_plugin_instance.cc
+++ b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
@@ -250,9 +250,8 @@ void ZoomChanged(PP_Instance instance_id, double factor) {
return;
// We only want to tell the page to change its zoom if the whole page is the
- // PDF. If we're in an iframe, then don't do anything.
- WebFrame* frame = instance->container()->element().document().frame();
- if (!frame->view()->mainFrame()->document().isPluginDocument())
+ // plugin. If we're in an iframe, then don't do anything.
+ if (!instance->IsFullPagePlugin())
return;
double zoom_level = WebView::zoomFactorToZoomLevel(factor);
@@ -1231,5 +1230,10 @@ ObjectVar* PluginInstance::ObjectVarForNPObject(NPObject* np_object) const {
return found->second;
}
+bool PluginInstance::IsFullPagePlugin() const {
+ WebFrame* frame = container()->element().document().frame();
+ return frame->view()->mainFrame()->document().isPluginDocument();
+}
+
} // namespace ppapi
} // namespace webkit