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

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

Issue 10540033: Add ENABLE_PRINTING and disable it on Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Arrange some ifdefs Created 8 years, 6 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 | « printing/printing.gyp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/ppapi_plugin_instance.cc
diff --git a/webkit/plugins/ppapi/ppapi_plugin_instance.cc b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
index 429dd03d4c65297cf1180a606232516017f62711..9973100fb283a8e16aedf612e802ca5e15734210 100644
--- a/webkit/plugins/ppapi/ppapi_plugin_instance.cc
+++ b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
@@ -1169,6 +1169,7 @@ int PluginInstance::PrintBegin(const WebPrintParams& print_params) {
}
bool PluginInstance::PrintPage(int page_number, WebKit::WebCanvas* canvas) {
+#if defined(ENABLE_PRINTING)
DCHECK(plugin_print_interface_);
PP_PrintPageNumberRange_Dev page_range;
page_range.first_page_number = page_range.last_page_number = page_number;
@@ -1188,6 +1189,9 @@ bool PluginInstance::PrintPage(int page_number, WebKit::WebCanvas* canvas) {
{
return PrintPageHelper(&page_range, 1, canvas);
}
+#else // defined(ENABLED_PRINTING)
+ return false;
+#endif
}
bool PluginInstance::PrintPageHelper(PP_PrintPageNumberRange_Dev* page_ranges,
@@ -1415,6 +1419,7 @@ PluginDelegate::PlatformContext3D* PluginInstance::CreateContext3D() {
bool PluginInstance::PrintPDFOutput(PP_Resource print_output,
WebKit::WebCanvas* canvas) {
+#if defined(ENABLE_PRINTING)
::ppapi::thunk::EnterResourceNoLock<PPB_Buffer_API> enter(print_output, true);
if (enter.failed())
return false;
@@ -1518,6 +1523,9 @@ bool PluginInstance::PrintPDFOutput(PP_Resource print_output,
#endif // defined(OS_WIN)
return ret;
+#else // defined(ENABLE_PRINTING)
+ return false;
+#endif
}
PPB_Graphics2D_Impl* PluginInstance::GetBoundGraphics2D() const {
« no previous file with comments | « printing/printing.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698