diff options
author | gnanasekar.s@samsung.com <gnanasekar.s@samsung.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-19 19:54:39 +0000 |
---|---|---|
committer | gnanasekar.s@samsung.com <gnanasekar.s@samsung.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-19 19:54:39 +0000 |
commit | 293f6b0a606e106e80f0dc39d8bc52bf22183fe2 (patch) | |
tree | b3dedafcd07606908e5b3798f9d39807d3ae7f69 /components | |
parent | 2450c61bdedd68a8eb9bdf57435b9ea5a4e9dbad (diff) | |
download | chromium_src-293f6b0a606e106e80f0dc39d8bc52bf22183fe2.zip chromium_src-293f6b0a606e106e80f0dc39d8bc52bf22183fe2.tar.gz chromium_src-293f6b0a606e106e80f0dc39d8bc52bf22183fe2.tar.bz2 |
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
Diffstat (limited to 'components')
6 files changed, 128 insertions, 108 deletions
diff --git a/components/autofill/core/browser/DEPS b/components/autofill/core/browser/DEPS index f453f30..5a08c6e 100644 --- a/components/autofill/core/browser/DEPS +++ b/components/autofill/core/browser/DEPS @@ -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 = { diff --git a/components/autofill/core/browser/autofill_external_delegate.cc b/components/autofill/core/browser/autofill_external_delegate.cc index c436756..e4a5c03 100644 --- a/components/autofill/core/browser/autofill_external_delegate.cc +++ b/components/autofill/core/browser/autofill_external_delegate.cc @@ -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 diff --git a/components/autofill/core/browser/autofill_external_delegate_unittest.cc b/components/autofill/core/browser/autofill_external_delegate_unittest.cc index ad86d83..d7b673f 100644 --- a/components/autofill/core/browser/autofill_external_delegate_unittest.cc +++ b/components/autofill/core/browser/autofill_external_delegate_unittest.cc @@ -10,6 +10,7 @@ #include "base/strings/utf_string_conversions.h" #include "chrome/test/base/testing_profile.h" #include "components/autofill/core/browser/autofill_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" @@ -18,11 +19,9 @@ #include "components/autofill/core/common/password_form_fill_data.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/gfx/rect.h" using base::ASCIIToUTF16; -using blink::WebAutofillClient; using testing::_; namespace autofill { @@ -141,15 +140,18 @@ TEST_F(AutofillExternalDelegateUnitTest, TestExternalDelegateVirtualCalls) { IssueOnQuery(kQueryId); // The enums must be cast to ints to prevent compile errors on linux_rel. - EXPECT_CALL(manager_delegate_, - ShowAutofillPopup( - _, _, _, _, _, - testing::ElementsAre( - kAutofillProfileId, - static_cast<int>(WebAutofillClient::MenuItemIDSeparator), - static_cast<int>( - WebAutofillClient::MenuItemIDAutofillOptions)), - _)); + EXPECT_CALL( + manager_delegate_, + ShowAutofillPopup(_, + _, + _, + _, + _, + testing::ElementsAre( + kAutofillProfileId, + static_cast<int>(POPUP_ITEM_ID_SEPARATOR), + static_cast<int>(POPUP_ITEM_ID_AUTOFILL_OPTIONS)), + _)); // This should call ShowAutofillPopup. std::vector<base::string16> autofill_item; @@ -186,18 +188,20 @@ TEST_F(AutofillExternalDelegateUnitTest, ExternalDelegateDataList) { data_list_items); // The enums must be cast to ints to prevent compile errors on linux_rel. - EXPECT_CALL(manager_delegate_, - ShowAutofillPopup( - _, _, _, _, _, - testing::ElementsAre( - static_cast<int>( - WebAutofillClient::MenuItemIDDataListEntry), - static_cast<int>(WebAutofillClient::MenuItemIDSeparator), - kAutofillProfileId, - static_cast<int>(WebAutofillClient::MenuItemIDSeparator), - static_cast<int>( - WebAutofillClient::MenuItemIDAutofillOptions)), - _)); + EXPECT_CALL( + manager_delegate_, + ShowAutofillPopup(_, + _, + _, + _, + _, + testing::ElementsAre( + static_cast<int>(POPUP_ITEM_ID_DATALIST_ENTRY), + static_cast<int>(POPUP_ITEM_ID_SEPARATOR), + kAutofillProfileId, + static_cast<int>(POPUP_ITEM_ID_SEPARATOR), + static_cast<int>(POPUP_ITEM_ID_AUTOFILL_OPTIONS)), + _)); // This should call ShowAutofillPopup. std::vector<base::string16> autofill_item; @@ -213,13 +217,16 @@ TEST_F(AutofillExternalDelegateUnitTest, ExternalDelegateDataList) { // Try calling OnSuggestionsReturned with no Autofill values and ensure // the datalist items are still shown. // The enum must be cast to an int to prevent compile errors on linux_rel. - EXPECT_CALL(manager_delegate_, - ShowAutofillPopup( - _, _, _, _, _, - testing::ElementsAre( - static_cast<int>( - WebAutofillClient::MenuItemIDDataListEntry)), - _)); + EXPECT_CALL( + manager_delegate_, + ShowAutofillPopup( + _, + _, + _, + _, + _, + testing::ElementsAre(static_cast<int>(POPUP_ITEM_ID_DATALIST_ENTRY)), + _)); autofill_item = std::vector<base::string16>(); autofill_ids = std::vector<int>(); @@ -246,18 +253,20 @@ TEST_F(AutofillExternalDelegateUnitTest, UpdateDataListWhileShowingPopup) { data_list_items); // The enums must be cast to ints to prevent compile errors on linux_rel. - EXPECT_CALL(manager_delegate_, - ShowAutofillPopup( - _, _, _, _, _, - testing::ElementsAre( - static_cast<int>( - WebAutofillClient::MenuItemIDDataListEntry), - static_cast<int>(WebAutofillClient::MenuItemIDSeparator), - kAutofillProfileId, - static_cast<int>(WebAutofillClient::MenuItemIDSeparator), - static_cast<int>( - WebAutofillClient::MenuItemIDAutofillOptions)), - _)); + EXPECT_CALL( + manager_delegate_, + ShowAutofillPopup(_, + _, + _, + _, + _, + testing::ElementsAre( + static_cast<int>(POPUP_ITEM_ID_DATALIST_ENTRY), + static_cast<int>(POPUP_ITEM_ID_SEPARATOR), + kAutofillProfileId, + static_cast<int>(POPUP_ITEM_ID_SEPARATOR), + static_cast<int>(POPUP_ITEM_ID_AUTOFILL_OPTIONS)), + _)); // Ensure the popup is displayed. std::vector<base::string16> autofill_item; @@ -293,19 +302,22 @@ TEST_F(AutofillExternalDelegateUnitTest, AutofillWarnings) { IssueOnQuery(kQueryId); // The enums must be cast to ints to prevent compile errors on linux_rel. - EXPECT_CALL(manager_delegate_, - ShowAutofillPopup( - _, _, _, _, _, - testing::ElementsAre( - static_cast<int>( - WebAutofillClient::MenuItemIDWarningMessage)), - _)); + EXPECT_CALL( + manager_delegate_, + ShowAutofillPopup( + _, + _, + _, + _, + _, + testing::ElementsAre(static_cast<int>(POPUP_ITEM_ID_WARNING_MESSAGE)), + _)); // This should call ShowAutofillPopup. std::vector<base::string16> autofill_item; autofill_item.push_back(base::string16()); std::vector<int> autofill_ids; - autofill_ids.push_back(WebAutofillClient::MenuItemIDWarningMessage); + autofill_ids.push_back(POPUP_ITEM_ID_WARNING_MESSAGE); external_delegate_->OnSuggestionsReturned(kQueryId, autofill_item, autofill_item, @@ -333,7 +345,7 @@ TEST_F(AutofillExternalDelegateUnitTest, NoAutofillWarningsWithoutSuggestions) { std::vector<base::string16> autofill_item; autofill_item.push_back(base::string16()); std::vector<int> autofill_ids; - autofill_ids.push_back(WebAutofillClient::MenuItemIDAutocompleteEntry); + autofill_ids.push_back(POPUP_ITEM_ID_AUTOCOMPLETE_ENTRY); external_delegate_->OnSuggestionsReturned(kQueryId, autofill_item, autofill_item, @@ -368,9 +380,7 @@ TEST_F(AutofillExternalDelegateUnitTest, ExternalDelegateClearPreviewedForm) { // Ensure selecting a new password entries or Autofill entries will // cause any previews to get cleared. EXPECT_CALL(*autofill_driver_, RendererShouldClearPreviewedForm()).Times(1); - external_delegate_->DidSelectSuggestion( - WebAutofillClient::MenuItemIDPasswordEntry); - + external_delegate_->DidSelectSuggestion(POPUP_ITEM_ID_PASSWORD_ENTRY); EXPECT_CALL(*autofill_driver_, RendererShouldClearPreviewedForm()).Times(1); EXPECT_CALL(*autofill_driver_, SetRendererActionOnFormDataReception( AutofillDriver::FORM_DATA_ACTION_PREVIEW)); @@ -409,13 +419,16 @@ TEST_F(AutofillExternalDelegateUnitTest, ExternalDelegatePasswordSuggestions) { external_delegate_->AddPasswordFormMapping(field, password_form_fill_data); // The enums must be cast to ints to prevent compile errors on linux_rel. - EXPECT_CALL(manager_delegate_, - ShowAutofillPopup( - _, _, _, _, _, - testing::ElementsAre( - static_cast<int>( - WebAutofillClient::MenuItemIDPasswordEntry)), - _)); + EXPECT_CALL( + manager_delegate_, + ShowAutofillPopup( + _, + _, + _, + _, + _, + testing::ElementsAre(static_cast<int>(POPUP_ITEM_ID_PASSWORD_ENTRY)), + _)); external_delegate_->OnShowPasswordSuggestions(suggestions, realms, @@ -426,9 +439,8 @@ TEST_F(AutofillExternalDelegateUnitTest, ExternalDelegatePasswordSuggestions) { // This should trigger a call to hide the popup since // we've selected an option. - external_delegate_->DidAcceptSuggestion( - suggestions[0], - WebAutofillClient::MenuItemIDPasswordEntry); + external_delegate_->DidAcceptSuggestion(suggestions[0], + POPUP_ITEM_ID_PASSWORD_ENTRY); } // Test that the driver is directed to accept the data list after being notified @@ -438,9 +450,8 @@ TEST_F(AutofillExternalDelegateUnitTest, ExternalDelegateAcceptSuggestion) { base::string16 dummy_string(ASCIIToUTF16("baz qux")); EXPECT_CALL(*autofill_driver_, RendererShouldAcceptDataListSuggestion(dummy_string)); - external_delegate_->DidAcceptSuggestion( - dummy_string, - WebAutofillClient::MenuItemIDDataListEntry); + external_delegate_->DidAcceptSuggestion(dummy_string, + POPUP_ITEM_ID_DATALIST_ENTRY); } // Test that the driver is directed to clear the form after being notified that @@ -449,9 +460,8 @@ TEST_F(AutofillExternalDelegateUnitTest, ExternalDelegateClearForm) { EXPECT_CALL(manager_delegate_, HideAutofillPopup()); EXPECT_CALL(*autofill_driver_, RendererShouldClearFilledForm()); - external_delegate_->DidAcceptSuggestion( - base::string16(), - WebAutofillClient::MenuItemIDClearForm); + external_delegate_->DidAcceptSuggestion(base::string16(), + POPUP_ITEM_ID_CLEAR_FORM); } TEST_F(AutofillExternalDelegateUnitTest, ExternalDelegateHideWarning) { @@ -467,7 +477,7 @@ TEST_F(AutofillExternalDelegateUnitTest, ExternalDelegateHideWarning) { std::vector<base::string16> autofill_items; autofill_items.push_back(base::string16()); std::vector<int> autofill_ids; - autofill_ids.push_back(WebAutofillClient::MenuItemIDAutocompleteEntry); + autofill_ids.push_back(POPUP_ITEM_ID_AUTOCOMPLETE_ENTRY); // Ensure the popup tries to hide itself, since it is not allowed to show // anything. @@ -485,9 +495,8 @@ TEST_F(AutofillExternalDelegateUnitTest, ExternalDelegateSetNodeText) { base::string16 dummy_string(ASCIIToUTF16("baz foo")); EXPECT_CALL(*autofill_driver_, RendererShouldSetNodeText(dummy_string)); - external_delegate_->DidAcceptSuggestion( - dummy_string, - WebAutofillClient::MenuItemIDAutocompleteEntry); + external_delegate_->DidAcceptSuggestion(dummy_string, + POPUP_ITEM_ID_AUTOCOMPLETE_ENTRY); } } // namespace autofill diff --git a/components/autofill/core/browser/autofill_manager.cc b/components/autofill/core/browser/autofill_manager.cc index 5aab9dc..0ff9a81 100644 --- a/components/autofill/core/browser/autofill_manager.cc +++ b/components/autofill/core/browser/autofill_manager.cc @@ -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, diff --git a/components/autofill/core/browser/autofill_manager_unittest.cc b/components/autofill/core/browser/autofill_manager_unittest.cc index aba6c08..9ea7d9a 100644 --- a/components/autofill/core/browser/autofill_manager_unittest.cc +++ b/components/autofill/core/browser/autofill_manager_unittest.cc @@ -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); diff --git a/components/autofill/core/browser/popup_item_ids.h b/components/autofill/core/browser/popup_item_ids.h new file mode 100644 index 0000000..628e000 --- /dev/null +++ b/components/autofill/core/browser/popup_item_ids.h @@ -0,0 +1,24 @@ +// 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_ |