Moving the autofill enum from blink side to browser side

Removing the autofill enum from blink side and moving it to
browser side in components/autofill/core/common/autofill_enums.h.
This patch is only adding of enum in browser side. Removing of
enum from blink side is done in another patch.

BUG=302489
TBR=thakis@chromium.org

Review URL: https://codereview.chromium.org/159853003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@252053 0039d316-1c4b-4281-b951-d872f2087c98
parent 2450c61b
......@@ -99,7 +99,6 @@ include_rules = [
"+third_party/WebKit/public/platform/WebReferrerPolicy.h",
"+third_party/WebKit/public/platform/WebScreenInfo.h",
"+third_party/WebKit/public/platform/WebScreenInfo.h",
"+third_party/WebKit/public/web/WebAutofillClient.h",
"+third_party/WebKit/public/web/WebCache.h",
"+third_party/WebKit/public/web/WebContextMenuData.h",
"+third_party/WebKit/public/web/WebFindOptions.h",
......
......@@ -12,9 +12,9 @@
#include "chrome/browser/ui/autofill/autofill_popup_view.h"
#include "chrome/browser/ui/autofill/popup_constants.h"
#include "components/autofill/core/browser/autofill_popup_delegate.h"
#include "components/autofill/core/browser/popup_item_ids.h"
#include "content/public/browser/native_web_keyboard_event.h"
#include "grit/webkit_resources.h"
#include "third_party/WebKit/public/web/WebAutofillClient.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/events/event.h"
#include "ui/gfx/rect_conversions.h"
......@@ -24,7 +24,6 @@
#include "ui/gfx/vector2d.h"
using base::WeakPtr;
using blink::WebAutofillClient;
namespace autofill {
namespace {
......@@ -189,7 +188,7 @@ void AutofillPopupControllerImpl::UpdateDataListValues(
// Remove all the old data list values, which should always be at the top of
// the list if they are present.
while (!identifiers_.empty() &&
identifiers_[0] == WebAutofillClient::MenuItemIDDataListEntry) {
identifiers_[0] == POPUP_ITEM_ID_DATALIST_ENTRY) {
names_.erase(names_.begin());
subtexts_.erase(subtexts_.begin());
icons_.erase(icons_.begin());
......@@ -199,8 +198,7 @@ void AutofillPopupControllerImpl::UpdateDataListValues(
// If there are no new data list values, exit (clearing the separator if there
// is one).
if (values.empty()) {
if (!identifiers_.empty() &&
identifiers_[0] == WebAutofillClient::MenuItemIDSeparator) {
if (!identifiers_.empty() && identifiers_[0] == POPUP_ITEM_ID_SEPARATOR) {
names_.erase(names_.begin());
subtexts_.erase(subtexts_.begin());
icons_.erase(icons_.begin());
......@@ -217,13 +215,11 @@ void AutofillPopupControllerImpl::UpdateDataListValues(
}
// Add a separator if there are any other values.
if (!identifiers_.empty() &&
identifiers_[0] != WebAutofillClient::MenuItemIDSeparator) {
if (!identifiers_.empty() && identifiers_[0] != POPUP_ITEM_ID_SEPARATOR) {
names_.insert(names_.begin(), base::string16());
subtexts_.insert(subtexts_.begin(), base::string16());
icons_.insert(icons_.begin(), base::string16());
identifiers_.insert(identifiers_.begin(),
WebAutofillClient::MenuItemIDSeparator);
identifiers_.insert(identifiers_.begin(), POPUP_ITEM_ID_SEPARATOR);
}
......@@ -232,9 +228,8 @@ void AutofillPopupControllerImpl::UpdateDataListValues(
// Add the values that are the same for all data list elements.
icons_.insert(icons_.begin(), values.size(), base::string16());
identifiers_.insert(identifiers_.begin(),
values.size(),
WebAutofillClient::MenuItemIDDataListEntry);
identifiers_.insert(
identifiers_.begin(), values.size(), POPUP_ITEM_ID_DATALIST_ENTRY);
UpdateBoundsAndRedrawPopup();
}
......@@ -344,13 +339,12 @@ bool AutofillPopupControllerImpl::CanDelete(size_t index) const {
// TODO(isherman): Native AddressBook suggestions on Mac and Android should
// not be considered to be deleteable.
int id = identifiers_[index];
return id > 0 ||
id == WebAutofillClient::MenuItemIDAutocompleteEntry ||
id == WebAutofillClient::MenuItemIDPasswordEntry;
return id > 0 || id == POPUP_ITEM_ID_AUTOCOMPLETE_ENTRY ||
id == POPUP_ITEM_ID_PASSWORD_ENTRY;
}
bool AutofillPopupControllerImpl::IsWarning(size_t index) const {
return identifiers_[index] == WebAutofillClient::MenuItemIDWarningMessage;
return identifiers_[index] == POPUP_ITEM_ID_WARNING_MESSAGE;
}
gfx::Rect AutofillPopupControllerImpl::GetRowBounds(size_t index) {
......@@ -411,7 +405,7 @@ const std::vector<int>& AutofillPopupControllerImpl::identifiers() const {
#if !defined(OS_ANDROID)
const gfx::FontList& AutofillPopupControllerImpl::GetNameFontListForRow(
size_t index) const {
if (identifiers_[index] == WebAutofillClient::MenuItemIDWarningMessage)
if (identifiers_[index] == POPUP_ITEM_ID_WARNING_MESSAGE)
return warning_font_list_;
return name_font_list_;
......@@ -541,24 +535,22 @@ int AutofillPopupControllerImpl::LineFromY(int y) {
}
int AutofillPopupControllerImpl::GetRowHeightFromId(int identifier) const {
if (identifier == WebAutofillClient::MenuItemIDSeparator)
if (identifier == POPUP_ITEM_ID_SEPARATOR)
return kSeparatorHeight;
return kRowHeight;
}
bool AutofillPopupControllerImpl::CanAccept(int id) {
return id != WebAutofillClient::MenuItemIDSeparator &&
id != WebAutofillClient::MenuItemIDWarningMessage;
return id != POPUP_ITEM_ID_SEPARATOR && id != POPUP_ITEM_ID_WARNING_MESSAGE;
}
bool AutofillPopupControllerImpl::HasSuggestions() {
return identifiers_.size() != 0 &&
(identifiers_[0] > 0 ||
identifiers_[0] ==
WebAutofillClient::MenuItemIDAutocompleteEntry ||
identifiers_[0] == WebAutofillClient::MenuItemIDPasswordEntry ||
identifiers_[0] == WebAutofillClient::MenuItemIDDataListEntry);
(identifiers_[0] > 0 ||
identifiers_[0] == POPUP_ITEM_ID_AUTOCOMPLETE_ENTRY ||
identifiers_[0] == POPUP_ITEM_ID_PASSWORD_ENTRY ||
identifiers_[0] == POPUP_ITEM_ID_DATALIST_ENTRY);
}
void AutofillPopupControllerImpl::SetValues(
......
......@@ -16,12 +16,12 @@
#include "components/autofill/core/browser/autofill_external_delegate.h"
#include "components/autofill/core/browser/autofill_manager.h"
#include "components/autofill/core/browser/autofill_test_utils.h"
#include "components/autofill/core/browser/popup_item_ids.h"
#include "components/autofill/core/browser/test_autofill_external_delegate.h"
#include "components/autofill/core/browser/test_autofill_manager_delegate.h"
#include "grit/webkit_resources.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/WebKit/public/web/WebAutofillClient.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/display.h"
#include "ui/gfx/rect.h"
......@@ -32,7 +32,6 @@ using ::testing::AtLeast;
using ::testing::NiceMock;
using base::ASCIIToUTF16;
using base::WeakPtr;
using blink::WebAutofillClient;
namespace autofill {
namespace {
......@@ -237,7 +236,7 @@ TEST_F(AutofillPopupControllerUnitTest, RemoveLine) {
std::vector<int> autofill_ids;
autofill_ids.push_back(1);
autofill_ids.push_back(1);
autofill_ids.push_back(WebAutofillClient::MenuItemIDAutofillOptions);
autofill_ids.push_back(POPUP_ITEM_ID_AUTOFILL_OPTIONS);
autofill_popup_controller_->Show(names, names, names, autofill_ids);
// Generate a popup, so it can be hidden later. It doesn't matter what the
......@@ -292,8 +291,8 @@ TEST_F(AutofillPopupControllerUnitTest, SkipSeparator) {
std::vector<base::string16> names(3, base::string16());
std::vector<int> autofill_ids;
autofill_ids.push_back(1);
autofill_ids.push_back(WebAutofillClient::MenuItemIDSeparator);
autofill_ids.push_back(WebAutofillClient::MenuItemIDAutofillOptions);
autofill_ids.push_back(POPUP_ITEM_ID_SEPARATOR);
autofill_ids.push_back(POPUP_ITEM_ID_AUTOFILL_OPTIONS);
autofill_popup_controller_->Show(names, names, names, autofill_ids);
autofill_popup_controller_->SetSelectedLine(0);
......@@ -364,8 +363,8 @@ TEST_F(AutofillPopupControllerUnitTest, UpdateDataListValues) {
// Update the expected values.
items.insert(items.begin(), data_list_values[0]);
items.insert(items.begin() + 1, base::string16());
ids.insert(ids.begin(), WebAutofillClient::MenuItemIDDataListEntry);
ids.insert(ids.begin() + 1, WebAutofillClient::MenuItemIDSeparator);
ids.insert(ids.begin(), POPUP_ITEM_ID_DATALIST_ENTRY);
ids.insert(ids.begin() + 1, POPUP_ITEM_ID_SEPARATOR);
EXPECT_EQ(items, autofill_popup_controller_->names());
EXPECT_EQ(ids, autofill_popup_controller_->identifiers());
......@@ -378,7 +377,7 @@ TEST_F(AutofillPopupControllerUnitTest, UpdateDataListValues) {
// Update the expected values.
items.insert(items.begin() + 1, data_list_values[1]);
ids.insert(ids.begin(), WebAutofillClient::MenuItemIDDataListEntry);
ids.insert(ids.begin(), POPUP_ITEM_ID_DATALIST_ENTRY);
EXPECT_EQ(items, autofill_popup_controller_->names());
EXPECT_EQ(ids, autofill_popup_controller_->identifiers());
......@@ -403,7 +402,7 @@ TEST_F(AutofillPopupControllerUnitTest, PopupsWithOnlyDataLists) {
std::vector<base::string16> items;
items.push_back(base::string16());
std::vector<int> ids;
ids.push_back(WebAutofillClient::MenuItemIDDataListEntry);
ids.push_back(POPUP_ITEM_ID_DATALIST_ENTRY);
autofill_popup_controller_->Show(items, items, items, ids);
......
......@@ -9,8 +9,8 @@
#include "chrome/browser/ui/autofill/autofill_popup_controller.h"
#include "chrome/browser/ui/autofill/popup_constants.h"
#include "chrome/browser/ui/cocoa/autofill/autofill_popup_view_bridge.h"
#include "components/autofill/core/browser/popup_item_ids.h"
#include "grit/ui_resources.h"
#include "third_party/WebKit/public/web/WebAutofillClient.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/font_list.h"
#include "ui/gfx/image/image.h"
......@@ -135,8 +135,7 @@ NSColor* SubtextColor() {
if (!NSIntersectsRect(rowBounds, dirtyRect))
continue;
if (controller_->identifiers()[i] ==
blink::WebAutofillClient::MenuItemIDSeparator) {
if (controller_->identifiers()[i] == autofill::POPUP_ITEM_ID_SEPARATOR) {
[self drawSeparatorWithBounds:rowBounds];
} else {
NSString* name = SysUTF16ToNSString(controller_->names()[i]);
......
......@@ -11,8 +11,8 @@
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/ui/autofill/autofill_popup_controller.h"
#include "chrome/browser/ui/gtk/gtk_util.h"
#include "components/autofill/core/browser/popup_item_ids.h"
#include "grit/ui_resources.h"
#include "third_party/WebKit/public/web/WebAutofillClient.h"
#include "ui/base/gtk/gtk_hig_constants.h"
#include "ui/base/gtk/gtk_windowing.h"
#include "ui/base/resource/resource_bundle.h"
......@@ -24,8 +24,6 @@
#include "ui/gfx/pango_util.h"
#include "ui/gfx/text_utils.h"
using blink::WebAutofillClient;
namespace {
const GdkColor kBorderColor = GDK_COLOR_RGB(0xc7, 0xca, 0xce);
......@@ -144,7 +142,7 @@ gboolean AutofillPopupViewGtk::HandleExpose(GtkWidget* widget,
if (!line_rect.Intersects(damage_rect))
continue;
if (controller_->identifiers()[i] == WebAutofillClient::MenuItemIDSeparator)
if (controller_->identifiers()[i] == POPUP_ITEM_ID_SEPARATOR)
DrawSeparator(cr, line_rect);
else
DrawAutofillEntry(cr, i, line_rect);
......
......@@ -5,8 +5,8 @@
#include "chrome/browser/ui/views/autofill/autofill_popup_view_views.h"
#include "chrome/browser/ui/autofill/autofill_popup_controller.h"
#include "components/autofill/core/browser/popup_item_ids.h"
#include "grit/ui_resources.h"
#include "third_party/WebKit/public/web/WebAutofillClient.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/events/keycodes/keyboard_codes.h"
#include "ui/gfx/canvas.h"
......@@ -18,8 +18,6 @@
#include "ui/views/border.h"
#include "ui/views/widget/widget.h"
using blink::WebAutofillClient;
namespace autofill {
AutofillPopupViewViews::AutofillPopupViewViews(
......@@ -54,8 +52,7 @@ void AutofillPopupViewViews::OnPaint(gfx::Canvas* canvas) {
for (size_t i = 0; i < controller_->names().size(); ++i) {
gfx::Rect line_rect = controller_->GetRowBounds(i);
if (controller_->identifiers()[i] ==
WebAutofillClient::MenuItemIDSeparator) {
if (controller_->identifiers()[i] == POPUP_ITEM_ID_SEPARATOR) {
canvas->DrawRect(line_rect, kItemTextColor);
} else {
DrawAutofillEntry(canvas, i, line_rect);
......
......@@ -7,12 +7,6 @@ include_rules = [
"+sql",
"+third_party/libjingle",
"+third_party/libphonenumber", # For phone number i18n.
# TODO(blundell): Bring this list to zero.
#
# Do not add to the list of temporarily-allowed dependencies below,
# and please do not introduce more #includes of these files.
"!third_party/WebKit/public/web/WebAutofillClient.h",
]
specific_include_rules = {
......
......@@ -8,12 +8,10 @@
#include "components/autofill/core/browser/autocomplete_history_manager.h"
#include "components/autofill/core/browser/autofill_driver.h"
#include "components/autofill/core/browser/autofill_manager.h"
#include "components/autofill/core/browser/popup_item_ids.h"
#include "grit/component_strings.h"
#include "third_party/WebKit/public/web/WebAutofillClient.h"
#include "ui/base/l10n/l10n_util.h"
using blink::WebAutofillClient;
namespace autofill {
AutofillExternalDelegate::AutofillExternalDelegate(
......@@ -65,7 +63,7 @@ void AutofillExternalDelegate::OnSuggestionsReturned(
values.push_back(base::string16());
labels.push_back(base::string16());
icons.push_back(base::string16());
ids.push_back(WebAutofillClient::MenuItemIDSeparator);
ids.push_back(POPUP_ITEM_ID_SEPARATOR);
// Only include "Autofill Options" special menu item if we have Autofill
// suggestions.
......@@ -82,7 +80,7 @@ void AutofillExternalDelegate::OnSuggestionsReturned(
// Remove the separator if it is the last element.
DCHECK_GT(ids.size(), 0U);
if (ids.back() == WebAutofillClient::MenuItemIDSeparator) {
if (ids.back() == POPUP_ITEM_ID_SEPARATOR) {
values.pop_back();
labels.pop_back();
icons.pop_back();
......@@ -128,7 +126,7 @@ void AutofillExternalDelegate::OnShowPasswordSuggestions(
std::vector<base::string16> empty(suggestions.size());
std::vector<int> password_ids(suggestions.size(),
WebAutofillClient::MenuItemIDPasswordEntry);
POPUP_ITEM_ID_PASSWORD_ENTRY);
autofill_manager_->delegate()->ShowAutofillPopup(
element_bounds_,
autofill_query_field_.text_direction,
......@@ -174,19 +172,19 @@ void AutofillExternalDelegate::DidSelectSuggestion(int identifier) {
void AutofillExternalDelegate::DidAcceptSuggestion(const base::string16& value,
int identifier) {
if (identifier == WebAutofillClient::MenuItemIDAutofillOptions) {
if (identifier == POPUP_ITEM_ID_AUTOFILL_OPTIONS) {
// User selected 'Autofill Options'.
autofill_manager_->ShowAutofillSettings();
} else if (identifier == WebAutofillClient::MenuItemIDClearForm) {
} else if (identifier == POPUP_ITEM_ID_CLEAR_FORM) {
// User selected 'Clear form'.
autofill_driver_->RendererShouldClearFilledForm();
} else if (identifier == WebAutofillClient::MenuItemIDPasswordEntry) {
} else if (identifier == POPUP_ITEM_ID_PASSWORD_ENTRY) {
bool success = password_autofill_manager_.DidAcceptAutofillSuggestion(
autofill_query_field_, value);
DCHECK(success);
} else if (identifier == WebAutofillClient::MenuItemIDDataListEntry) {
} else if (identifier == POPUP_ITEM_ID_DATALIST_ENTRY) {
autofill_driver_->RendererShouldAcceptDataListSuggestion(value);
} else if (identifier == WebAutofillClient::MenuItemIDAutocompleteEntry) {
} else if (identifier == POPUP_ITEM_ID_AUTOCOMPLETE_ENTRY) {
// User selected an Autocomplete, so we fill directly.
autofill_driver_->RendererShouldSetNodeText(value);
} else {
......@@ -235,7 +233,7 @@ base::WeakPtr<AutofillExternalDelegate> AutofillExternalDelegate::GetWeakPtr() {
void AutofillExternalDelegate::FillAutofillFormData(int unique_id,
bool is_preview) {
// If the selected element is a warning we don't want to do anything.
if (unique_id == WebAutofillClient::MenuItemIDWarningMessage)
if (unique_id == POPUP_ITEM_ID_WARNING_MESSAGE)
return;
AutofillDriver::RendererFormDataAction renderer_action = is_preview ?
......@@ -266,8 +264,7 @@ void AutofillExternalDelegate::ApplyAutofillWarnings(
1, l10n_util::GetStringUTF16(IDS_AUTOFILL_WARNING_FORM_DISABLED));
autofill_labels->assign(1, base::string16());
autofill_icons->assign(1, base::string16());
autofill_unique_ids->assign(1,
WebAutofillClient::MenuItemIDWarningMessage);
autofill_unique_ids->assign(1, POPUP_ITEM_ID_WARNING_MESSAGE);
} else {
autofill_values->clear();
autofill_labels->clear();
......@@ -275,8 +272,7 @@ void AutofillExternalDelegate::ApplyAutofillWarnings(
autofill_unique_ids->clear();
}
} else if (autofill_unique_ids->size() > 1 &&
(*autofill_unique_ids)[0] ==
WebAutofillClient::MenuItemIDWarningMessage) {
(*autofill_unique_ids)[0] == POPUP_ITEM_ID_WARNING_MESSAGE) {
// If we received a warning instead of suggestions from autofill but regular
// suggestions from autocomplete, don't show the autofill warning.
autofill_values->erase(autofill_values->begin());
......@@ -287,8 +283,7 @@ void AutofillExternalDelegate::ApplyAutofillWarnings(
// If we were about to show a warning and we shouldn't, don't.
if (!autofill_unique_ids->empty() &&
(*autofill_unique_ids)[0] ==
WebAutofillClient::MenuItemIDWarningMessage &&
(*autofill_unique_ids)[0] == POPUP_ITEM_ID_WARNING_MESSAGE &&
!display_warning_if_disabled_) {
autofill_values->clear();
autofill_labels->clear();
......@@ -309,7 +304,7 @@ void AutofillExternalDelegate::ApplyAutofillOptions(
l10n_util::GetStringUTF16(IDS_AUTOFILL_CLEAR_FORM_MENU_ITEM));
autofill_labels->push_back(base::string16());
autofill_icons->push_back(base::string16());
autofill_unique_ids->push_back(WebAutofillClient::MenuItemIDClearForm);
autofill_unique_ids->push_back(POPUP_ITEM_ID_CLEAR_FORM);
}
// Append the 'Chrome Autofill options' menu item;
......@@ -317,7 +312,7 @@ void AutofillExternalDelegate::ApplyAutofillOptions(
l10n_util::GetStringUTF16(IDS_AUTOFILL_OPTIONS_POPUP));
autofill_labels->push_back(base::string16());
autofill_icons->push_back(base::string16());
autofill_unique_ids->push_back(WebAutofillClient::MenuItemIDAutofillOptions);
autofill_unique_ids->push_back(POPUP_ITEM_ID_AUTOFILL_OPTIONS);
}
void AutofillExternalDelegate::InsertDataListValues(
......@@ -335,7 +330,7 @@ void AutofillExternalDelegate::InsertDataListValues(
autofill_labels->insert(autofill_labels->begin(), base::string16());
autofill_icons->insert(autofill_icons->begin(), base::string16());
autofill_unique_ids->insert(autofill_unique_ids->begin(),
WebAutofillClient::MenuItemIDSeparator);
POPUP_ITEM_ID_SEPARATOR);
}
// Insert the datalist elements.
......@@ -352,7 +347,7 @@ void AutofillExternalDelegate::InsertDataListValues(
base::string16());
autofill_unique_ids->insert(autofill_unique_ids->begin(),
data_list_values_.size(),
WebAutofillClient::MenuItemIDDataListEntry);
POPUP_ITEM_ID_DATALIST_ENTRY);
}
} // namespace autofill
......@@ -35,6 +35,7 @@
#include "components/autofill/core/browser/personal_data_manager.h"
#include "components/autofill/core/browser/phone_number.h"
#include "components/autofill/core/browser/phone_number_i18n.h"
#include "components/autofill/core/browser/popup_item_ids.h"
#include "components/autofill/core/common/autofill_data_validation.h"
#include "components/autofill/core/common/autofill_pref_names.h"
#include "components/autofill/core/common/autofill_switches.h"
......@@ -44,7 +45,6 @@
#include "components/autofill/core/common/password_form_fill_data.h"
#include "components/user_prefs/pref_registry_syncable.h"
#include "grit/component_strings.h"
#include "third_party/WebKit/public/web/WebAutofillClient.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/rect.h"
#include "url/gurl.h"
......@@ -416,8 +416,7 @@ void AutofillManager::OnQueryFormFieldAutofill(int query_id,
values.assign(1, l10n_util::GetStringUTF16(warning));
labels.assign(1, base::string16());
icons.assign(1, base::string16());
unique_ids.assign(1,
blink::WebAutofillClient::MenuItemIDWarningMessage);
unique_ids.assign(1, POPUP_ITEM_ID_WARNING_MESSAGE);
} else {
bool section_is_autofilled =
SectionIsAutofilled(*form_structure, form,
......
......@@ -33,6 +33,7 @@
#include "components/autofill/core/browser/autofill_test_utils.h"
#include "components/autofill/core/browser/credit_card.h"
#include "components/autofill/core/browser/personal_data_manager.h"
#include "components/autofill/core/browser/popup_item_ids.h"
#include "components/autofill/core/browser/test_autofill_driver.h"
#include "components/autofill/core/browser/test_autofill_external_delegate.h"
#include "components/autofill/core/browser/test_autofill_manager_delegate.h"
......@@ -47,7 +48,6 @@
#include "grit/component_strings.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/WebKit/public/web/WebAutofillClient.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/rect.h"
#include "url/gurl.h"
......@@ -916,8 +916,7 @@ TEST_F(AutofillManagerTest, GetProfileSuggestionsMethodGet) {
};
base::string16 expected_labels[] = {base::string16()};
base::string16 expected_icons[] = {base::string16()};
int expected_unique_ids[] =
{blink::WebAutofillClient::MenuItemIDWarningMessage};
int expected_unique_ids[] = {POPUP_ITEM_ID_WARNING_MESSAGE};
external_delegate_->CheckSuggestions(
kDefaultPageID, arraysize(expected_values), expected_values,
expected_labels, expected_icons, expected_unique_ids);
......
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// This enum defines item identifiers for Autofill popup controller.
#ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_POPUP_ITEM_ID_H_
#define COMPONENTS_AUTOFILL_CORE_BROWSER_POPUP_ITEM_ID_H_
namespace autofill {
enum PopupItemId {
POPUP_ITEM_ID_AUTOCOMPLETE_ENTRY = 0,
POPUP_ITEM_ID_WARNING_MESSAGE = -1,
POPUP_ITEM_ID_PASSWORD_ENTRY = -2,
POPUP_ITEM_ID_SEPARATOR = -3,
POPUP_ITEM_ID_CLEAR_FORM = -4,
POPUP_ITEM_ID_AUTOFILL_OPTIONS = -5,
POPUP_ITEM_ID_DATALIST_ENTRY = -6
};
} // namespace autofill
#endif // COMPONENTS_AUTOFILL_CORE_BROWSER_POPUP_ITEM_ID_H_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment