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

Unified Diff: webkit/plugins/ppapi/ppb_pdf_impl.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.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/ppb_pdf_impl.cc
===================================================================
--- webkit/plugins/ppapi/ppb_pdf_impl.cc (revision 71882)
+++ webkit/plugins/ppapi/ppb_pdf_impl.cc (working copy)
@@ -268,6 +268,18 @@
webkit_glue::UserMetricsRecordAction(action_str->value());
}
+void HasUnsupportedFeature(PP_Instance instance_id) {
+ PluginInstance* instance = ResourceTracker::Get()->GetInstance(instance_id);
+ if (!instance)
+ return;
+
+ // Only want to show an info bar if the pdf is the whole tab.
+ if (!instance->IsFullPagePlugin())
+ return;
+
+ instance->delegate()->HasUnsupportedFeature();
+}
+
const PPB_PDF ppb_pdf = {
&GetLocalizedString,
&GetResourceImage,
@@ -278,7 +290,8 @@
&DidStopLoading,
&SetContentRestriction,
&HistogramPDFPageCount,
- &UserMetricsRecordAction
+ &UserMetricsRecordAction,
+ &HasUnsupportedFeature
};
} // namespace
« no previous file with comments | « webkit/plugins/ppapi/ppapi_plugin_instance.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698