blob: 2dd38557c5cf80fab301984d12a5631c3c9ef4d4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
// Copyright (c) 2010 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.
#ifndef CHROME_BROWSER_AUTOFILL_AUTOFILL_DIALOG_H_
#define CHROME_BROWSER_AUTOFILL_AUTOFILL_DIALOG_H_
#include <vector>
#include "chrome/browser/autofill/autofill_profile.h"
#include "chrome/browser/autofill/credit_card.h"
#include "gfx/native_widget_types.h"
class Profile;
// An interface the AutoFill dialog uses to notify its clients (observers) when
// the user has applied changes to the AutoFill profile data.
class AutoFillDialogObserver {
public:
// The user has confirmed changes by clicking "Apply" or "OK". Any of the
// parameters may be NULL.
virtual void OnAutoFillDialogApply(
std::vector<AutoFillProfile>* profiles,
std::vector<CreditCard>* credit_cards) = 0;
protected:
virtual ~AutoFillDialogObserver() {}
};
// Shows the AutoFill dialog, which allows the user to edit profile information.
// |profile| is profile from which you can get vectors of of autofill profiles
// that contains the current profile information and credit cards.
// The dialog fills out the profile fields using this data. |observer| will be
// notified by OnAutoFillDialogAccept when the user has applied changes.
//
// The PersonalDataManager owns the contents of these vectors. The lifetime of
// the contents is until the PersonalDataManager replaces them with new data
// whenever the web database is updated.
#if defined(OS_MACOSX)
// TODO(dhollowa): update .mm files and remove this.
void ShowAutoFillDialog(AutoFillDialogObserver* observer,
const std::vector<AutoFillProfile*>& profiles,
const std::vector<CreditCard*>& credit_cards,
Profile* profile);
#else
void ShowAutoFillDialog(gfx::NativeWindow parent,
AutoFillDialogObserver* observer,
Profile* profile);
#endif
#endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_DIALOG_H_
|