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

Side by Side Diff: chrome/browser/ui/android/autofill/autofill_popup_view_android.cc

Issue 2496683003: Http Bad: Add a PopupItemId to identify http warning message (Closed)
Patch Set: minor change Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 == POPUP_ITEM_ID_WARNING_MESSAGE ||
101 suggestion.frontend_id == POPUP_ITEM_ID_CREDIT_CARD_SIGNIN_PROMO; 101 suggestion.frontend_id == POPUP_ITEM_ID_CREDIT_CARD_SIGNIN_PROMO;
102 bool is_http_warning_message =
103 suggestion.frontend_id == POPUP_ITEM_ID_HTTP_NOT_SECURE_WARNING_MESSAGE;
102 Java_AutofillPopupBridge_addToAutofillSuggestionArray( 104 Java_AutofillPopupBridge_addToAutofillSuggestionArray(
103 env, data_array, i, value, label, android_icon_id, 105 env, data_array, i, value, label, android_icon_id,
104 suggestion.frontend_id, deletable, is_label_multiline); 106 suggestion.frontend_id, deletable, is_label_multiline,
107 is_http_warning_message);
105 } 108 }
106 109
107 Java_AutofillPopupBridge_show(env, java_object_, data_array, 110 Java_AutofillPopupBridge_show(env, java_object_, data_array,
108 controller_->IsRTL()); 111 controller_->IsRTL());
109 } 112 }
110 113
111 void AutofillPopupViewAndroid::SuggestionSelected( 114 void AutofillPopupViewAndroid::SuggestionSelected(
112 JNIEnv* env, 115 JNIEnv* env,
113 const JavaParamRef<jobject>& obj, 116 const JavaParamRef<jobject>& obj,
114 jint list_index) { 117 jint list_index) {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 // static 169 // static
167 AutofillPopupView* AutofillPopupView::Create( 170 AutofillPopupView* AutofillPopupView::Create(
168 AutofillPopupController* controller) { 171 AutofillPopupController* controller) {
169 if (IsKeyboardAccessoryEnabled()) 172 if (IsKeyboardAccessoryEnabled())
170 return new AutofillKeyboardAccessoryView(controller); 173 return new AutofillKeyboardAccessoryView(controller);
171 174
172 return new AutofillPopupViewAndroid(controller); 175 return new AutofillPopupViewAndroid(controller);
173 } 176 }
174 177
175 } // namespace autofill 178 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698