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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/autofill/PasswordGeneration.java

Issue 606153002: [android] Password generation UI for android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Unify default text color. Use integers instead of enums. Simplify delegate. Created 6 years, 2 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
Index: chrome/android/java/src/org/chromium/chrome/browser/autofill/PasswordGeneration.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/autofill/PasswordGeneration.java b/chrome/android/java/src/org/chromium/chrome/browser/autofill/PasswordGeneration.java
new file mode 100644
index 0000000000000000000000000000000000000000..4f903638991f865ec074d4b6a61657b913569062
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/autofill/PasswordGeneration.java
@@ -0,0 +1,90 @@
+// Copyright 2014 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.chrome.browser.autofill;
+
+/**
+ * Describes the state of the password generation popup.
+ */
+public class PasswordGeneration {
aurimas (slooooooooow) 2014/10/16 23:30:01 I would just delete this class altogether and pass
please use gerrit instead 2014/10/17 05:19:00 Great idea! Done.
+ private final boolean mRtl;
+ private final int mMinimumWidth;
+ private final boolean mPasswordDisplayed;
+ private final String mPassword;
+ private final String mSuggestionTitle;
+ private final String mExplanationText;
+ private final int mExplanationTextLinkRangeStart;
+ private final int mExplanationTextLinkRangeEnd;
+
+ public PasswordGeneration(boolean isRtl, int minimumWidth, boolean passwordDisplayed,
+ String password, String suggestionTitle, String explanationText,
+ int explanationTextLinkRangeStart, int explanationTextLinkRangeEnd) {
+ mRtl = isRtl;
+ mMinimumWidth = minimumWidth;
+ mPasswordDisplayed = passwordDisplayed;
+ mPassword = password;
+ mSuggestionTitle = suggestionTitle;
+ mExplanationText = explanationText;
+ mExplanationTextLinkRangeStart = explanationTextLinkRangeStart;
+ mExplanationTextLinkRangeEnd = explanationTextLinkRangeEnd;
+ }
+
+ /**
+ * Returns true of the popup is RTL.
+ */
+ public boolean isRtl() {
+ return mRtl;
+ }
+
+ /**
+ * Returns the minimum width of the popup.
+ */
+ public int getMinimumWidth() {
+ return mMinimumWidth;
+ }
+
+ /**
+ * If true, then the generated password should be displayed.
+ */
+ public boolean isPasswordDisplayed() {
+ return mPasswordDisplayed;
+ }
+
+ /**
+ * Returns the suggested auto-generated password.
+ */
+ public String getPassword() {
+ return mPassword;
+ }
+
+ /**
+ * Returns the translated text for the title of the popup.
+ */
+ public String getSuggestionTitle() {
+ return mSuggestionTitle;
+ }
+
+ /**
+ * Returns the translated text of the explanation of the popup.
+ */
+ public String getExplanationText() {
+ return mExplanationText;
+ }
+
+ /**
+ * Returns the start of the range in the explanation text that should be a link to the saved
+ * password.
+ */
+ public int getExplanationTextLinkRangeStart() {
+ return mExplanationTextLinkRangeStart;
+ }
+
+ /**
+ * Returns the end of the range in the explanation text that should be a link to the saved
+ * passwords.
+ */
+ public int getExplanationTextLinkRangeEnd() {
+ return mExplanationTextLinkRangeEnd;
+ }
+ }

Powered by Google App Engine
This is Rietveld 408576698