blob: 38f99e3a8efea95038291dac91c3a0288dffd1be [file] [log] [blame]
[email protected]dbd4b1d2012-12-14 04:28:341// 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
3// found in the LICENSE file.
4
[email protected]41c4c70d2012-12-21 01:22:225#ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_DELEGATE_H_
6#define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_DELEGATE_H_
[email protected]dbd4b1d2012-12-14 04:28:347
8#include "base/string16.h"
9
10// An interface for interaction with AutofillPopupController. Will be notified
11// of events by the controller.
12class AutofillPopupDelegate {
13 public:
14 // Called when the autofill suggestion indicated by |unique_id| has been
15 // temporarily selected (e.g., hovered).
[email protected]41c4c70d2012-12-21 01:22:2216 virtual void SelectAutofillSuggestion(int unique_id) = 0;
[email protected]dbd4b1d2012-12-14 04:28:3417
[email protected]41c4c70d2012-12-21 01:22:2218 // Inform the delegate that a row in the popup has been chosen.
19 // TODO(estade): does this really need to return a value?
[email protected]dbd4b1d2012-12-14 04:28:3420 virtual bool DidAcceptAutofillSuggestion(const string16& value,
21 int unique_id,
22 unsigned index) = 0;
23
24 // Remove the given Autocomplete entry from the DB.
25 virtual void RemoveAutocompleteEntry(const string16& value) = 0;
26
27 // Remove the given Autofill profile or credit credit.
28 virtual void RemoveAutofillProfileOrCreditCard(int unique_id) = 0;
29
30 // Informs the delegate that the Autofill previewed form should be cleared.
31 virtual void ClearPreviewedForm() = 0;
32
33 // Called to inform the delegate the controller is experiencing destruction.
34 virtual void ControllerDestroyed() = 0;
35};
36
[email protected]41c4c70d2012-12-21 01:22:2237#endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_DELEGATE_H_