OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 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 #include <string> |
| 10 |
| 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/strings/string16.h" |
| 13 |
| 14 namespace autofill { |
| 15 namespace wallet { |
| 16 class FullWallet; |
| 17 } |
| 18 } |
| 19 |
| 20 namespace autofill { |
| 21 |
| 22 // A result of the non-cancelled Java-side AutofillDialog invocation. |
| 23 // Passed to the AutofillDialogControllerAndroid in dialogContinue. |
| 24 class AutofillDialogResult { |
| 25 public: |
| 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); |
| 31 |
| 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); |
| 35 |
| 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); |
| 39 |
| 40 // Establishes JNI bindings. |
| 41 static bool RegisterAutofillDialogResult(JNIEnv* env); |
| 42 |
| 43 private: |
| 44 DISALLOW_COPY_AND_ASSIGN(AutofillDialogResult); |
| 45 }; |
| 46 |
| 47 } // namespace autofill |
| 48 |
| 49 #endif // CHROME_BROWSER_UI_ANDROID_AUTOFILL_AUTOFILL_DIALOG_RESULT_H_ |
OLD | NEW |