Skip to content

Commit

Permalink
Two small fixes for Chrome for Android PDF printing.
Browse files Browse the repository at this point in the history
BUG=147070

Review URL: https://chromiumcodereview.appspot.com/23264039

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@219271 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
cimamoglu@chromium.org committed Aug 23, 2013
1 parent 39b2baf commit b9321a7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion chrome/browser/printing/printing_message_filter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,11 @@ void PrintingMessageFilter::OnScriptedPrintReply(
scoped_refptr<printing::PrinterQuery> printer_query,
IPC::Message* reply_msg) {
PrintMsg_PrintPages_Params params;
#if defined(OS_ANDROID)
// We need to save the routing ID here because Send method below deletes the
// |reply_msg| before we can get the routing ID for the Android code.
int routing_id = reply_msg->routing_id();
#endif
if (printer_query->last_status() != printing::PrintingContext::OK ||
!printer_query->settings().dpi()) {
params.Reset();
Expand All @@ -380,7 +385,7 @@ void PrintingMessageFilter::OnScriptedPrintReply(
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
base::Bind(&PrintingMessageFilter::UpdateFileDescriptor, this,
reply_msg->routing_id(), file_descriptor));
routing_id, file_descriptor));
}
#endif
print_job_manager_->QueuePrinterQuery(printer_query.get());
Expand Down
2 changes: 1 addition & 1 deletion printing/printing_context_android.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class PRINTING_EXPORT PrintingContextAndroid : public PrintingContext {

// Called from Java, when printing settings from the user are ready or the
// printing operation is canceled.
void AskUserForSettingsReply(bool success);
void AskUserForSettingsReply(JNIEnv* env, jobject obj, jboolean success);

// PrintingContext implementation.
virtual void AskUserForSettings(
Expand Down

0 comments on commit b9321a7

Please sign in to comment.