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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_ANDROID_AUTOFILL_AUTOFILL_DIALOG_RESULT_H_
6 #define CHROME_BROWSER_UI_ANDROID_AUTOFILL_AUTOFILL_DIALOG_RESULT_H_
11 #include "base/memory/scoped_ptr.h"
12 #include "base/strings/string16.h"
22 // A result of the non-cancelled Java-side AutofillDialog invocation.
23 // Passed to the AutofillDialogControllerAndroid in dialogContinue.
24 class AutofillDialogResult
{
26 // Converts the requested information to wallet::FullWallet.
27 // The dialog stores the requested information in the same format
28 // regardless if the information was obtained from Autofill or Google Wallet.
29 static scoped_ptr
<wallet::FullWallet
> ConvertFromJava(
30 JNIEnv
* env
, jobject wallet
);
32 // Returns the email address to be associated with this request,
33 // or an empty string.
34 static base::string16
GetWalletEmail(JNIEnv
* env
, jobject wallet
);
36 // Returns the Google Transaction ID to be associated with this request,
37 // or an empty string.
38 static std::string
GetWalletGoogleTransactionId(JNIEnv
* env
, jobject wallet
);
40 // Establishes JNI bindings.
41 static bool RegisterAutofillDialogResult(JNIEnv
* env
);
44 DISALLOW_COPY_AND_ASSIGN(AutofillDialogResult
);
47 } // namespace autofill
49 #endif // CHROME_BROWSER_UI_ANDROID_AUTOFILL_AUTOFILL_DIALOG_RESULT_H_