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

Side by Side Diff: printing/android/java/src/org/chromium/printing/PrintingController.java

Issue 740983002: Implement window.print() on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.printing; 5 package org.chromium.printing;
6 6
7 import android.print.PrintDocumentAdapter; 7 import android.print.PrintDocumentAdapter;
8 8
9 /** 9 /**
10 * This interface describes a class which is responsible of talking to the print ing backend. 10 * This interface describes a class which is responsible of talking to the print ing backend.
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 * @param maxPages Number of pages in the PDF, according to the last provide d settings. 66 * @param maxPages Number of pages in the PDF, according to the last provide d settings.
67 * If this is PrintDocumentInfo.PAGE_COUNT_UNKNOWN, then use the last known 67 * If this is PrintDocumentInfo.PAGE_COUNT_UNKNOWN, then use the last known
68 * valid max pages count. 68 * valid max pages count.
69 */ 69 */
70 void pageCountEstimationDone(final int maxPages); 70 void pageCountEstimationDone(final int maxPages);
71 71
72 /** 72 /**
73 * Sets PrintingContext currently associated with the controller. 73 * Sets PrintingContext currently associated with the controller.
74 * 74 *
75 * This needs to be called after PrintingContext object is created. Firstly its native 75 * This needs to be called after PrintingContext object is created. Firstly its native
76 * counterpart is created, and then the Java. PrintingController implementa tion 76 * counterpart is created, and then the Java. PrintingController implementat ion
77 * needs this to interact with the native side, since JNI is built on Printi ngContext. 77 * needs this to interact with the native side, since JNI is built on Printi ngContext.
78 **/ 78 **/
79 void setPrintingContext(final PrintingContextInterface printingContext); 79 void setPrintingContext(final PrintingContextInterface printingContext);
80 80
81 /** 81 /**
82 * @return Whether a complete PDF generation cycle inside Chromium has been completed. 82 * @return Whether a complete PDF generation cycle inside Chromium has been completed.
83 */ 83 */
84 boolean hasPrintingFinished(); 84 boolean hasPrintingFinished();
85
86 /**
87 * Sets the data required to initiate a printing process. The process can la ter be started using
88 * {@link #startPendingPrint(PrintingContextInterface)}.
89 *
90 * @param printable An object capable of starting native side PDF generation , i.e. typically
91 * a Tab.
92 * @param printManager The print manager that manages the print job.
93 */
94 void setPendingPrint(final Printable printable, final PrintManagerDelegate p rintManager);
95
96 /**
97 * Starts printing, provided that the current object already has sufficient data to start the
98 * process. (using {@link #setPendingPrint(Printable, PrintManagerDelegate)} for example)
99 *
100 * @param jsOriginatedPrintingContext The printingContext holding the callba ck to be used to
101 * reply when javascript can resume. When printing is done (or could not start),
102 * {@link PrintingContextInterface#showSystemDialogDone()} will be calle d on this object.
103 */
104 void startPendingPrint(PrintingContextInterface jsOriginatedPrintingContext) ;
105
85 } 106 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698