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

Unified Diff: content/renderer/pepper/pepper_plugin_instance_impl.cc

Issue 1149983008: Change return type of PrintPage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
Index: content/renderer/pepper/pepper_plugin_instance_impl.cc
diff --git a/content/renderer/pepper/pepper_plugin_instance_impl.cc b/content/renderer/pepper/pepper_plugin_instance_impl.cc
index 85449bacf5bb1da057bc660f59ce8d98df8acedc..d91ca7395731e39815b7b4f8548fcfc8d20d8c25 100644
--- a/content/renderer/pepper/pepper_plugin_instance_impl.cc
+++ b/content/renderer/pepper/pepper_plugin_instance_impl.cc
@@ -1742,7 +1742,7 @@ int PepperPluginInstanceImpl::PrintBegin(const WebPrintParams& print_params) {
return num_pages;
}
-bool PepperPluginInstanceImpl::PrintPage(int page_number,
+void PepperPluginInstanceImpl::PrintPage(int page_number,
blink::WebCanvas* canvas) {
#if defined(ENABLE_PRINTING)
DCHECK(plugin_print_interface_);
@@ -1757,16 +1757,13 @@ bool PepperPluginInstanceImpl::PrintPage(int page_number,
if (save_for_later) {
ranges_.push_back(page_range);
canvas_ = skia::SharePtr(canvas);
- return true;
} else {
- return PrintPageHelper(&page_range, 1, canvas);
+ PrintPageHelper(&page_range, 1, canvas);
}
-#else // ENABLE_PRINTING
- return false;
#endif
}
-bool PepperPluginInstanceImpl::PrintPageHelper(
+void PepperPluginInstanceImpl::PrintPageHelper(
PP_PrintPageNumberRange_Dev* page_ranges,
int num_ranges,
blink::WebCanvas* canvas) {
@@ -1774,21 +1771,17 @@ bool PepperPluginInstanceImpl::PrintPageHelper(
scoped_refptr<PepperPluginInstanceImpl> ref(this);
DCHECK(plugin_print_interface_);
if (!plugin_print_interface_)
- return false;
+ return;
PP_Resource print_output = plugin_print_interface_->PrintPages(
pp_instance(), page_ranges, num_ranges);
if (!print_output)
- return false;
-
- bool ret = false;
+ return;
if (current_print_settings_.format == PP_PRINTOUTPUTFORMAT_PDF)
- ret = PrintPDFOutput(print_output, canvas);
+ PrintPDFOutput(print_output, canvas);
// Now we need to release the print output resource.
PluginModule::GetCore()->ReleaseResource(print_output);
-
- return ret;
}
void PepperPluginInstanceImpl::PrintEnd() {
« no previous file with comments | « content/renderer/pepper/pepper_plugin_instance_impl.h ('k') | content/renderer/pepper/pepper_webplugin_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698