| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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.chrome.browser.autofill; | 5 package org.chromium.ui.autofill; |
| 6 | 6 |
| 7 import android.content.Context; | 7 import android.content.Context; |
| 8 import android.graphics.Paint; | 8 import android.graphics.Paint; |
| 9 import android.graphics.Rect; | 9 import android.graphics.Rect; |
| 10 import android.view.LayoutInflater; | 10 import android.view.LayoutInflater; |
| 11 import android.view.View; | 11 import android.view.View; |
| 12 import android.view.View.OnLayoutChangeListener; | 12 import android.view.View.OnLayoutChangeListener; |
| 13 import android.widget.AdapterView; | 13 import android.widget.AdapterView; |
| 14 import android.widget.ListPopupWindow; | 14 import android.widget.ListPopupWindow; |
| 15 import android.widget.TextView; | 15 import android.widget.TextView; |
| 16 | 16 |
| 17 import java.util.ArrayList; | 17 import java.util.ArrayList; |
| 18 | 18 |
| 19 import org.chromium.chrome.R; | 19 import org.chromium.ui.R; |
| 20 import org.chromium.ui.ViewAndroidDelegate; | 20 import org.chromium.ui.ViewAndroidDelegate; |
| 21 | 21 |
| 22 /** | 22 /** |
| 23 * The Autofill suggestion popup that lists relevant suggestions. | 23 * The Autofill suggestion popup that lists relevant suggestions. |
| 24 */ | 24 */ |
| 25 public class AutofillPopup extends ListPopupWindow implements AdapterView.OnItem
ClickListener { | 25 public class AutofillPopup extends ListPopupWindow implements AdapterView.OnItem
ClickListener { |
| 26 | 26 |
| 27 /** | 27 /** |
| 28 * Constants defining types of Autofill suggestion entries. | 28 * Constants defining types of Autofill suggestion entries. |
| 29 * Has to be kept in sync with enum in WebAutofillClient.h | 29 * Has to be kept in sync with enum in WebAutofillClient.h |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 // Adding padding. | 193 // Adding padding. |
| 194 return maxTextWidth + TEXT_PADDING_DP; | 194 return maxTextWidth + TEXT_PADDING_DP; |
| 195 } | 195 } |
| 196 | 196 |
| 197 @Override | 197 @Override |
| 198 public void onItemClick(AdapterView<?> parent, View view, int position, long
id) { | 198 public void onItemClick(AdapterView<?> parent, View view, int position, long
id) { |
| 199 mAutofillCallback.suggestionSelected(position); | 199 mAutofillCallback.suggestionSelected(position); |
| 200 } | 200 } |
| 201 | 201 |
| 202 } | 202 } |
| OLD | NEW |