Chromium Code Reviews| Index: printing/android/java/src/org/chromium/printing/PrintingContext.java |
| diff --git a/printing/android/java/src/org/chromium/printing/PrintingContext.java b/printing/android/java/src/org/chromium/printing/PrintingContext.java |
| index e50f0ce8fa244e9220781c59838ac8a005eb6ac8..4c7664e1bd75e5d5c078f4a81e86d86efe21abd2 100644 |
| --- a/printing/android/java/src/org/chromium/printing/PrintingContext.java |
| +++ b/printing/android/java/src/org/chromium/printing/PrintingContext.java |
| @@ -97,6 +97,17 @@ public class PrintingContext implements PrintingContextInterface { |
| } |
| @CalledByNative |
| + public void showPrintDialog() { |
| + ThreadUtils.assertOnUiThread(); |
| + if (mController != null) { // The native side doesn't check if printing is enabled |
|
Bernhard Bauer
2014/12/15 09:38:02
Nit: Two spaces before comments.
dgn
2014/12/15 10:27:06
Done.
|
| + mController.startPendingPrint(this); |
| + } else { |
| + // Printing disabled. Notify the native side to stop waiting. |
| + showSystemDialogDone(); |
| + } |
| + } |
| + |
| + @CalledByNative |
| public static void pdfWritingDone(int fd, boolean success) { |
| ThreadUtils.assertOnUiThread(); |
| // TODO(cimamoglu): Do something when fd == -1. |
| @@ -129,7 +140,14 @@ public class PrintingContext implements PrintingContextInterface { |
| } |
| } |
| + @Override |
| + public void showSystemDialogDone() { |
| + nativeShowSystemDialogDone(mNativeObject); |
| + } |
| + |
| private native void nativeAskUserForSettingsReply( |
| long nativePrintingContextAndroid, |
| boolean success); |
| + |
| + private native void nativeShowSystemDialogDone(long nativePrintingContextAndroid); |
| } |