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

Side by Side Diff: ui/android/java/src/org/chromium/ui/autofill/AutofillSuggestion.java

Issue 1134793004: Autofill item deletion on android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clean up Created 5 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.ui.autofill; 5 package org.chromium.ui.autofill;
6 6
7 import org.chromium.ui.DropdownItem; 7 import org.chromium.ui.DropdownItem;
8 8
9 /** 9 /**
10 * Autofill suggestion container used to store information needed for each Autof ill popup entry. 10 * Autofill suggestion container used to store information needed for each Autof ill popup entry.
11 */ 11 */
12 public class AutofillSuggestion implements DropdownItem { 12 public class AutofillSuggestion implements DropdownItem {
13 private final String mLabel; 13 private final String mLabel;
14 private final String mSublabel; 14 private final String mSublabel;
15 private final int mIconId; 15 private final int mIconId;
16 private final int mSuggestionId; 16 private final int mSuggestionId;
17 private boolean mDeletable;
Ted C 2015/05/14 21:56:40 final
Evan Stade 2015/05/14 23:12:06 Done.
17 18
18 /** 19 /**
19 * Constructs a Autofill suggestion container. 20 * Constructs a Autofill suggestion container.
20 * @param name The name of the Autofill suggestion. 21 * @param name The name of the Autofill suggestion.
21 * @param label The describing label of the Autofill suggestion. 22 * @param label The describing label of the Autofill suggestion.
22 * @param suggestionId The type of suggestion. 23 * @param suggestionId The type of suggestion.
24 * @param deletable Whether the item can be deleted by the user.
23 */ 25 */
24 public AutofillSuggestion(String name, String label, int iconId, int suggest ionId) { 26 public AutofillSuggestion(
27 String name, String label, int iconId, int suggestionId, boolean del etable) {
25 mLabel = name; 28 mLabel = name;
26 mSublabel = label; 29 mSublabel = label;
27 mIconId = iconId; 30 mIconId = iconId;
28 mSuggestionId = suggestionId; 31 mSuggestionId = suggestionId;
32 mDeletable = deletable;
29 } 33 }
30 34
31 @Override 35 @Override
32 public String getLabel() { 36 public String getLabel() {
33 return mLabel; 37 return mLabel;
34 } 38 }
35 39
36 @Override 40 @Override
37 public String getSublabel() { 41 public String getSublabel() {
38 return mSublabel; 42 return mSublabel;
(...skipping 10 matching lines...) Expand all
49 } 53 }
50 54
51 @Override 55 @Override
52 public boolean isGroupHeader() { 56 public boolean isGroupHeader() {
53 return false; 57 return false;
54 } 58 }
55 59
56 public int getSuggestionId() { 60 public int getSuggestionId() {
57 return mSuggestionId; 61 return mSuggestionId;
58 } 62 }
63
64 public boolean isDeletable() {
65 return mDeletable;
66 }
59 } 67 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698