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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 | 90 |
91 const Suggestion& suggestion = controller_->GetSuggestionAt(i); | 91 const Suggestion& suggestion = controller_->GetSuggestionAt(i); |
92 if (!suggestion.icon.empty()) { | 92 if (!suggestion.icon.empty()) { |
93 android_icon_id = ResourceMapper::MapFromChromiumId( | 93 android_icon_id = ResourceMapper::MapFromChromiumId( |
94 controller_->layout_model().GetIconResourceID(suggestion.icon)); | 94 controller_->layout_model().GetIconResourceID(suggestion.icon)); |
95 } | 95 } |
96 | 96 |
97 bool deletable = | 97 bool deletable = |
98 controller_->GetRemovalConfirmationText(i, nullptr, nullptr); | 98 controller_->GetRemovalConfirmationText(i, nullptr, nullptr); |
99 bool is_label_multiline = | 99 bool is_label_multiline = |
100 suggestion.frontend_id == POPUP_ITEM_ID_WARNING_MESSAGE || | 100 suggestion.frontend_id == |
| 101 POPUP_ITEM_ID_INSECURE_CONTEXT_PAYMENT_DISABLED_MESSAGE || |
101 suggestion.frontend_id == POPUP_ITEM_ID_CREDIT_CARD_SIGNIN_PROMO; | 102 suggestion.frontend_id == POPUP_ITEM_ID_CREDIT_CARD_SIGNIN_PROMO; |
102 Java_AutofillPopupBridge_addToAutofillSuggestionArray( | 103 Java_AutofillPopupBridge_addToAutofillSuggestionArray( |
103 env, data_array, i, value, label, android_icon_id, | 104 env, data_array, i, value, label, android_icon_id, |
104 suggestion.frontend_id, deletable, is_label_multiline); | 105 suggestion.frontend_id, deletable, is_label_multiline); |
105 } | 106 } |
106 | 107 |
107 Java_AutofillPopupBridge_show(env, java_object_, data_array, | 108 Java_AutofillPopupBridge_show(env, java_object_, data_array, |
108 controller_->IsRTL()); | 109 controller_->IsRTL()); |
109 } | 110 } |
110 | 111 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 // static | 167 // static |
167 AutofillPopupView* AutofillPopupView::Create( | 168 AutofillPopupView* AutofillPopupView::Create( |
168 AutofillPopupController* controller) { | 169 AutofillPopupController* controller) { |
169 if (IsKeyboardAccessoryEnabled()) | 170 if (IsKeyboardAccessoryEnabled()) |
170 return new AutofillKeyboardAccessoryView(controller); | 171 return new AutofillKeyboardAccessoryView(controller); |
171 | 172 |
172 return new AutofillPopupViewAndroid(controller); | 173 return new AutofillPopupViewAndroid(controller); |
173 } | 174 } |
174 | 175 |
175 } // namespace autofill | 176 } // namespace autofill |
OLD | NEW |