Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / ui / android / java / src / org / chromium / ui / autofill / AutofillSuggestion.java
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
3 // found in the LICENSE file.
4
5 package org.chromium.ui.autofill;
6
7 import org.chromium.ui.DropdownItem;
8
9 /**
10  * Autofill suggestion container used to store information needed for each Autofill popup entry.
11  */
12 public class AutofillSuggestion implements DropdownItem {
13     final String mLabel;
14     final String mSublabel;
15     final int mUniqueId;
16
17     /**
18      * Constructs a Autofill suggestion container.
19      * @param name The name of the Autofill suggestion.
20      * @param label The describing label of the Autofill suggestion.
21      * @param uniqueId The unique id used to identify the Autofill suggestion.
22      */
23     public AutofillSuggestion(String name, String label, int uniqueId) {
24         mLabel = name;
25         mSublabel = label;
26         mUniqueId = uniqueId;
27     }
28
29     @Override
30     public String getLabel() {
31         return mLabel;
32     }
33
34     @Override
35     public String getSublabel() {
36         return mSublabel;
37     }
38
39     @Override
40     public boolean isEnabled() {
41         return true;
42     }
43
44     @Override
45     public boolean isGroupHeader() {
46         return false;
47     }
48
49     public int getUniqueId() {
50         return mUniqueId;
51     }
52 }