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

Unified Diff: chrome/browser/ui/android/autofill/autofill_popup_view_android.cc

Issue 1570783003: [Autofill] Move functions from the AutofillPopupController to AutofillPopupLayoutModel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: AutofillPopupViewHelper Created 4 years, 11 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/browser/ui/android/autofill/autofill_popup_view_android.cc
diff --git a/chrome/browser/ui/android/autofill/autofill_popup_view_android.cc b/chrome/browser/ui/android/autofill/autofill_popup_view_android.cc
index 15b26c62e11b63f40d7621df52e879ceeaaba7a8..404aca07c29f511488b847789a8fb4909ef39b32 100644
--- a/chrome/browser/ui/android/autofill/autofill_popup_view_android.cc
+++ b/chrome/browser/ui/android/autofill/autofill_popup_view_android.cc
@@ -25,7 +25,8 @@ namespace autofill {
AutofillPopupViewAndroid::AutofillPopupViewAndroid(
AutofillPopupController* controller)
- : controller_(controller),
+ : view_helper_(new AutofillPopupViewHelper(controller)),
+ controller_(controller),
deleting_index_(-1) {}
AutofillPopupViewAndroid::~AutofillPopupViewAndroid() {}
@@ -75,7 +76,7 @@ void AutofillPopupViewAndroid::UpdateBoundsAndRedrawPopup() {
const autofill::Suggestion& suggestion = controller_->GetSuggestionAt(i);
if (!suggestion.icon.empty()) {
android_icon_id = ResourceMapper::MapFromChromiumId(
- controller_->GetIconResourceID(suggestion.icon));
+ view_helper_->GetIconResourceID(suggestion.icon));
}
bool deletable =
@@ -95,6 +96,14 @@ void AutofillPopupViewAndroid::UpdateBoundsAndRedrawPopup() {
env, java_object_.obj(), data_array.obj(), controller_->IsRTL());
}
+int AutofillPopupViewAndroid::LineFromY(int y) {
+ return view_helper_->LineFromY(y);
+}
+
+gfx::Rect AutofillPopupViewAndroid::GetPopupBounds() {
+ return view_helper_->popup_bounds();
+}
+
void AutofillPopupViewAndroid::SuggestionSelected(
JNIEnv* env,
const JavaParamRef<jobject>& obj,

Powered by Google App Engine
This is Rietveld 408576698