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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/TabBase.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: Add license to PrintingControllerFactory 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
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/printing/PrintingControllerFactory.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/TabBase.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/TabBase.java b/chrome/android/java/src/org/chromium/chrome/browser/TabBase.java
index 75cfa085d154f91f69e4b9c11caafa06664d97e2..741f1ee3da29989d1a9e8a3e7061eb1e405483c3 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/TabBase.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/TabBase.java
@@ -309,7 +309,6 @@ public abstract class TabBase implements NavigationClient {
}
/**
- *
* @return The infobar container.
*/
public final InfoBarContainer getInfoBarContainer() {
@@ -323,6 +322,16 @@ public abstract class TabBase implements NavigationClient {
protected abstract AutoLoginProcessor createAutoLoginProcessor();
/**
+ * Prints the current page.
+ *
+ * @return Whether the printing process is started successfully.
+ **/
+ public boolean print() {
+ assert mNativeTabAndroid != 0;
+ return nativePrint(mNativeTabAndroid);
+ }
+
+ /**
* Reloads the current page content if it is a {@link ContentView}.
*/
public void reload() {
@@ -771,4 +780,5 @@ public abstract class TabBase implements NavigationClient {
private native int nativeGetSecurityLevel(int nativeTabAndroid);
private native void nativeSetActiveNavigationEntryTitleForUrl(int nativeTabAndroid, String url,
String title);
+ private native boolean nativePrint(int nativeTabAndroid);
}
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/printing/PrintingControllerFactory.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698