Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Unified Diff: webkit/plugins/ppapi/ppapi_plugin_instance.cc

Issue 6259008: When we detect a PDF with an unsupported feature, ask the user if they want t... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/plugins/ppapi/ppapi_plugin_instance.h ('k') | webkit/plugins/ppapi/ppb_pdf_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/ppapi_plugin_instance.cc
===================================================================
--- webkit/plugins/ppapi/ppapi_plugin_instance.cc (revision 71882)
+++ webkit/plugins/ppapi/ppapi_plugin_instance.cc (working copy)
@@ -250,9 +250,8 @@
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 @@
return found->second;
}
+bool PluginInstance::IsFullPagePlugin() const {
+ WebFrame* frame = container()->element().document().frame();
+ return frame->view()->mainFrame()->document().isPluginDocument();
+}
+
} // namespace ppapi
} // namespace webkit
« no previous file with comments | « webkit/plugins/ppapi/ppapi_plugin_instance.h ('k') | webkit/plugins/ppapi/ppb_pdf_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698