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

Unified Diff: printing/android/java/src/org/chromium/printing/SystemPrintManagerDelegate.java

Issue 63483007: Refactor Android printing code to make it more testable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved isPrintingController into PrintingControllerImpl, cleaned tiny bits Created 7 years, 1 month 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: printing/android/java/src/org/chromium/printing/SystemPrintManagerDelegate.java
diff --git a/printing/android/java/src/org/chromium/printing/SystemPrintManagerDelegate.java b/printing/android/java/src/org/chromium/printing/SystemPrintManagerDelegate.java
new file mode 100644
index 0000000000000000000000000000000000000000..c1eba29f20c7bf85c654ee69a1ec168007b3fe2b
--- /dev/null
+++ b/printing/android/java/src/org/chromium/printing/SystemPrintManagerDelegate.java
@@ -0,0 +1,27 @@
+// 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;
+import android.print.PrintManager;
+
+/**
+ * An implementation of {@link PrintManagerDelegate} using the Android framework print manager.
+ */
+public class SystemPrintManagerDelegate implements PrintManagerDelegate {
whywhat 2013/11/19 15:39:32 Why System? What other implementation do you expec
cimamoglu1 2013/11/19 17:40:33 Done.
+ private final PrintManager mPrintManager;
bulach 2013/11/19 15:32:22 indentation
cimamoglu1 2013/11/19 17:40:33 Done.
+
+ public SystemPrintManagerDelegate(PrintManager printManager) {
+ mPrintManager = printManager;
+ }
+
+ @Override
+ public void print(String printJobName, PrintDocumentAdapter documentAdapter,
+ PrintAttributes attributes) {
+ mPrintManager.print(printJobName, documentAdapter, attributes);
+ }
+
+}

Powered by Google App Engine
This is Rietveld 408576698