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

Side by Side Diff: components/autofill/core/browser/autofill_external_delegate.cc

Issue 802553003: Autofill dropdown icons: (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ownership Created 6 years 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
« no previous file with comments | « components/OWNERS ('k') | components/resources/autofill_scaled_resources.grdp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "components/autofill/core/browser/autofill_external_delegate.h" 5 #include "components/autofill/core/browser/autofill_external_delegate.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 104
105 // Add a separator to go between the values and menu items. 105 // Add a separator to go between the values and menu items.
106 values.push_back(base::string16()); 106 values.push_back(base::string16());
107 labels.push_back(base::string16()); 107 labels.push_back(base::string16());
108 icons.push_back(base::string16()); 108 icons.push_back(base::string16());
109 ids.push_back(POPUP_ITEM_ID_SEPARATOR); 109 ids.push_back(POPUP_ITEM_ID_SEPARATOR);
110 110
111 if (manager_->ShouldShowScanCreditCard(query_form_, query_field_)) { 111 if (manager_->ShouldShowScanCreditCard(query_form_, query_field_)) {
112 values.push_back(l10n_util::GetStringUTF16(IDS_AUTOFILL_SCAN_CREDIT_CARD)); 112 values.push_back(l10n_util::GetStringUTF16(IDS_AUTOFILL_SCAN_CREDIT_CARD));
113 labels.push_back(base::string16()); 113 labels.push_back(base::string16());
114 icons.push_back(base::string16()); 114 icons.push_back(base::ASCIIToUTF16("scanCreditCardIcon"));
115 ids.push_back(POPUP_ITEM_ID_SCAN_CREDIT_CARD); 115 ids.push_back(POPUP_ITEM_ID_SCAN_CREDIT_CARD);
116 } 116 }
117 117
118 // Only include "Autofill Options" special menu item if we have Autofill 118 // Only include "Autofill Options" special menu item if we have Autofill
119 // suggestions. 119 // suggestions.
120 has_suggestion_ = false; 120 has_suggestion_ = false;
121 for (size_t i = 0; i < ids.size(); ++i) { 121 for (size_t i = 0; i < ids.size(); ++i) {
122 if (ids[i] > 0) { 122 if (ids[i] > 0) {
123 has_suggestion_ = true; 123 has_suggestion_ = true;
124 break; 124 break;
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 POPUP_ITEM_ID_DATALIST_ENTRY); 433 POPUP_ITEM_ID_DATALIST_ENTRY);
434 } 434 }
435 435
436 #if defined(OS_MACOSX) && !defined(OS_IOS) 436 #if defined(OS_MACOSX) && !defined(OS_IOS)
437 void AutofillExternalDelegate::PingRenderer() { 437 void AutofillExternalDelegate::PingRenderer() {
438 driver_->PingRenderer(); 438 driver_->PingRenderer();
439 } 439 }
440 #endif // defined(OS_MACOSX) && !defined(OS_IOS) 440 #endif // defined(OS_MACOSX) && !defined(OS_IOS)
441 441
442 } // namespace autofill 442 } // namespace autofill
OLDNEW
« no previous file with comments | « components/OWNERS ('k') | components/resources/autofill_scaled_resources.grdp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698