Index: printing/android/java/src/org/chromium/printing/PrintManagerDelegate.java |
diff --git a/printing/android/java/src/org/chromium/printing/PrintManagerDelegate.java b/printing/android/java/src/org/chromium/printing/PrintManagerDelegate.java |
new file mode 100644 |
index 0000000000000000000000000000000000000000..6e2cb67e9af2535db49649130494e7772440db0a |
--- /dev/null |
+++ b/printing/android/java/src/org/chromium/printing/PrintManagerDelegate.java |
@@ -0,0 +1,23 @@ |
+// Copyright 2013 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+package org.chromium.printing; |
+ |
+import android.print.PrintAttributes; |
+import android.print.PrintDocumentAdapter; |
+ |
+/** |
+ * Defines an interface for the Android system printing service, for easier testing. |
+ * We can't simply extend from {@link android.print.PrintManager}, since it's a final class. |
+ */ |
+public interface PrintManagerDelegate { |
+ |
+ /** |
+ * Same as {@link android.print.PrintManager#print}, except this doesn't return a |
+ * {@link android.print.PrintJob} since the clients don't need it. |
+ */ |
+ void print(String printJobName, |
+ PrintDocumentAdapter documentAdapter, |
+ PrintAttributes attributes); |
+} |