Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 } |
| OLD | NEW |