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

Unified Diff: content/public/android/java/src/org/chromium/content/browser/DownloadInfo.java

Issue 417263004: Chrome Android PDF Downloads: Pass in HasUserGesture param to Java side. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 months 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 | « content/public/android/java/src/org/chromium/content/browser/DownloadController.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/android/java/src/org/chromium/content/browser/DownloadInfo.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/DownloadInfo.java b/content/public/android/java/src/org/chromium/content/browser/DownloadInfo.java
index cae4fffa4fc68a61f571bfec7ae40e8b62278809..069c6dea7fe13fef13982d189abeebb62861e653 100644
--- a/content/public/android/java/src/org/chromium/content/browser/DownloadInfo.java
+++ b/content/public/android/java/src/org/chromium/content/browser/DownloadInfo.java
@@ -19,6 +19,7 @@ public final class DownloadInfo {
private final long mContentLength;
private final boolean mHasDownloadId;
private final int mDownloadId;
+ private final boolean mHasUserGesture;
private final String mContentDisposition;
private final boolean mIsGETRequest;
private final boolean mIsSuccessful;
@@ -37,6 +38,7 @@ public final class DownloadInfo {
mContentLength = builder.mContentLength;
mHasDownloadId = builder.mHasDownloadId;
mDownloadId = builder.mDownloadId;
+ mHasUserGesture = builder.mHasUserGesture;
mIsSuccessful = builder.mIsSuccessful;
mIsGETRequest = builder.mIsGETRequest;
mContentDisposition = builder.mContentDisposition;
@@ -92,6 +94,10 @@ public final class DownloadInfo {
return mDownloadId;
}
+ public boolean hasUserGesture() {
+ return mHasUserGesture;
+ }
+
public boolean isSuccessful() {
return mIsSuccessful;
}
@@ -124,6 +130,7 @@ public final class DownloadInfo {
private boolean mIsGETRequest;
private boolean mHasDownloadId;
private int mDownloadId;
+ private boolean mHasUserGesture;
private boolean mIsSuccessful;
private String mContentDisposition;
private int mPercentCompleted = -1;
@@ -189,6 +196,11 @@ public final class DownloadInfo {
return this;
}
+ public Builder setHasUserGesture(boolean hasUserGesture) {
+ mHasUserGesture = hasUserGesture;
+ return this;
+ }
+
public Builder setIsSuccessful(boolean isSuccessful) {
mIsSuccessful = isSuccessful;
return this;
@@ -233,6 +245,7 @@ public final class DownloadInfo {
.setContentLength(downloadInfo.getContentLength())
.setHasDownloadId(downloadInfo.hasDownloadId())
.setDownloadId(downloadInfo.getDownloadId())
+ .setHasUserGesture(downloadInfo.hasUserGesture())
.setContentDisposition(downloadInfo.getContentDisposition())
.setIsGETRequest(downloadInfo.isGETRequest())
.setIsSuccessful(downloadInfo.isSuccessful())
« no previous file with comments | « content/public/android/java/src/org/chromium/content/browser/DownloadController.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698