| 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 #include "chrome/browser/ui/android/autofill/autofill_popup_view_android.h" | 5 #include "chrome/browser/ui/android/autofill/autofill_popup_view_android.h" |
| 6 | 6 |
| 7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
| 8 #include "base/android/jni_string.h" | 8 #include "base/android/jni_string.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "chrome/browser/android/resource_mapper.h" | 10 #include "chrome/browser/android/resource_mapper.h" |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 env, data_array, i, value, label, android_icon_id, | 111 env, data_array, i, value, label, android_icon_id, |
| 112 controller_->layout_model().IsIconAtStart(suggestion.frontend_id), | 112 controller_->layout_model().IsIconAtStart(suggestion.frontend_id), |
| 113 suggestion.frontend_id, is_deletable, is_label_multiline, | 113 suggestion.frontend_id, is_deletable, is_label_multiline, |
| 114 suggestion.is_value_bold); | 114 suggestion.is_value_bold); |
| 115 } | 115 } |
| 116 | 116 |
| 117 Java_AutofillPopupBridge_show( | 117 Java_AutofillPopupBridge_show( |
| 118 env, java_object_, data_array, controller_->IsRTL(), | 118 env, java_object_, data_array, controller_->IsRTL(), |
| 119 controller_->layout_model().GetBackgroundColor(), | 119 controller_->layout_model().GetBackgroundColor(), |
| 120 controller_->layout_model().GetDividerColor(), | 120 controller_->layout_model().GetDividerColor(), |
| 121 controller_->layout_model().GetDropdownItemHeight()); | 121 controller_->layout_model().GetDropdownItemHeight(), |
| 122 controller_->layout_model().GetMargin()); |
| 122 } | 123 } |
| 123 | 124 |
| 124 void AutofillPopupViewAndroid::SuggestionSelected( | 125 void AutofillPopupViewAndroid::SuggestionSelected( |
| 125 JNIEnv* env, | 126 JNIEnv* env, |
| 126 const JavaParamRef<jobject>& obj, | 127 const JavaParamRef<jobject>& obj, |
| 127 jint list_index) { | 128 jint list_index) { |
| 128 // Race: Hide() may have already run. | 129 // Race: Hide() may have already run. |
| 129 if (controller_) | 130 if (controller_) |
| 130 controller_->AcceptSuggestion(list_index); | 131 controller_->AcceptSuggestion(list_index); |
| 131 } | 132 } |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 // static | 180 // static |
| 180 AutofillPopupView* AutofillPopupView::Create( | 181 AutofillPopupView* AutofillPopupView::Create( |
| 181 AutofillPopupController* controller) { | 182 AutofillPopupController* controller) { |
| 182 if (IsKeyboardAccessoryEnabled()) | 183 if (IsKeyboardAccessoryEnabled()) |
| 183 return new AutofillKeyboardAccessoryView(controller); | 184 return new AutofillKeyboardAccessoryView(controller); |
| 184 | 185 |
| 185 return new AutofillPopupViewAndroid(controller); | 186 return new AutofillPopupViewAndroid(controller); |
| 186 } | 187 } |
| 187 | 188 |
| 188 } // namespace autofill | 189 } // namespace autofill |
| OLD | NEW |