| OLD | NEW |
| (Empty) |
| 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. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_UI_ANDROID_AUTOFILL_AUTOFILL_DIALOG_RESULT_H_ | |
| 6 #define CHROME_BROWSER_UI_ANDROID_AUTOFILL_AUTOFILL_DIALOG_RESULT_H_ | |
| 7 | |
| 8 #include <jni.h> | |
| 9 | |
| 10 #include <memory> | |
| 11 #include <string> | |
| 12 | |
| 13 #include "base/macros.h" | |
| 14 #include "base/strings/string16.h" | |
| 15 | |
| 16 namespace autofill { | |
| 17 namespace wallet { | |
| 18 class FullWallet; | |
| 19 } | |
| 20 } | |
| 21 | |
| 22 namespace autofill { | |
| 23 | |
| 24 // A result of the non-cancelled Java-side AutofillDialog invocation. | |
| 25 // Passed to the AutofillDialogControllerAndroid in dialogContinue. | |
| 26 class AutofillDialogResult { | |
| 27 public: | |
| 28 // Converts the requested information to wallet::FullWallet. | |
| 29 // The dialog stores the requested information in the same format | |
| 30 // regardless if the information was obtained from Autofill or Google Wallet. | |
| 31 static std::unique_ptr<wallet::FullWallet> ConvertFromJava(JNIEnv* env, | |
| 32 jobject wallet); | |
| 33 | |
| 34 // Returns the email address to be associated with this request, | |
| 35 // or an empty string. | |
| 36 static base::string16 GetWalletEmail(JNIEnv* env, jobject wallet); | |
| 37 | |
| 38 // Returns the Google Transaction ID to be associated with this request, | |
| 39 // or an empty string. | |
| 40 static std::string GetWalletGoogleTransactionId(JNIEnv* env, jobject wallet); | |
| 41 | |
| 42 // Establishes JNI bindings. | |
| 43 static bool RegisterAutofillDialogResult(JNIEnv* env); | |
| 44 | |
| 45 private: | |
| 46 DISALLOW_COPY_AND_ASSIGN(AutofillDialogResult); | |
| 47 }; | |
| 48 | |
| 49 } // namespace autofill | |
| 50 | |
| 51 #endif // CHROME_BROWSER_UI_ANDROID_AUTOFILL_AUTOFILL_DIALOG_RESULT_H_ | |
| OLD | NEW |