Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/android/autofill/autofill_dialog_view_android.h" | 5 #include "chrome/browser/ui/android/autofill/autofill_dialog_view_android.h" |
| 6 #include "base/android/jni_android.h" | 6 #include "base/android/jni_android.h" |
| 7 #include "base/android/jni_array.h" | 7 #include "base/android/jni_array.h" |
| 8 #include "base/android/jni_string.h" | 8 #include "base/android/jni_string.h" |
| 9 #include "base/android/scoped_java_ref.h" | 9 #include "base/android/scoped_java_ref.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 30 // AutofillDialogView ---------------------------------------------------------- | 30 // AutofillDialogView ---------------------------------------------------------- |
| 31 | 31 |
| 32 AutofillDialogViewAndroid::AutofillDialogViewAndroid( | 32 AutofillDialogViewAndroid::AutofillDialogViewAndroid( |
| 33 AutofillDialogController* controller) | 33 AutofillDialogController* controller) |
| 34 : controller_(controller) {} | 34 : controller_(controller) {} |
| 35 | 35 |
| 36 AutofillDialogViewAndroid::~AutofillDialogViewAndroid() {} | 36 AutofillDialogViewAndroid::~AutofillDialogViewAndroid() {} |
| 37 | 37 |
| 38 void AutofillDialogViewAndroid::Show() { | 38 void AutofillDialogViewAndroid::Show() { |
| 39 JNIEnv* env = base::android::AttachCurrentThread(); | 39 JNIEnv* env = base::android::AttachCurrentThread(); |
| 40 ScopedJavaLocalRef<jstring> use_billing_for_shipping = | |
|
nilesh
2013/04/09 00:12:54
I like the variable name you have used in java.
us
Yusuf
2013/04/09 00:31:29
Done.
| |
| 41 base::android::ConvertUTF16ToJavaString( | |
| 42 env,controller_->UseBillingForShippingText()); | |
|
aruslan
2013/04/09 00:10:04
space after the comma.
Yusuf
2013/04/09 00:31:29
Done.
| |
| 40 java_object_.Reset(Java_AutofillDialogGlue_create( | 43 java_object_.Reset(Java_AutofillDialogGlue_create( |
| 41 env, | 44 env, |
| 42 reinterpret_cast<jint>(this), | 45 reinterpret_cast<jint>(this), |
| 43 WindowAndroidHelper::FromWebContents(controller_->web_contents())-> | 46 WindowAndroidHelper::FromWebContents(controller_->web_contents())-> |
| 44 GetWindowAndroid()->GetJavaObject().obj())); | 47 GetWindowAndroid()->GetJavaObject().obj(), |
| 48 use_billing_for_shipping.obj())); | |
|
aruslan
2013/04/09 00:10:04
+4 indent
aruslan
2013/04/09 00:10:52
scratch that, long day.
| |
| 45 } | 49 } |
| 46 | 50 |
| 47 void AutofillDialogViewAndroid::Hide() { | 51 void AutofillDialogViewAndroid::Hide() { |
| 48 NOTIMPLEMENTED(); | 52 NOTIMPLEMENTED(); |
| 49 } | 53 } |
| 50 | 54 |
| 51 void AutofillDialogViewAndroid::UpdateNotificationArea() { | 55 void AutofillDialogViewAndroid::UpdateNotificationArea() { |
| 52 JNIEnv* env = base::android::AttachCurrentThread(); | 56 JNIEnv* env = base::android::AttachCurrentThread(); |
| 53 std::vector<DialogNotification> notifications = | 57 std::vector<DialogNotification> notifications = |
| 54 controller_->CurrentNotifications(); | 58 controller_->CurrentNotifications(); |
| (...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 443 env, error_array.obj(), i, invalid_inputs[i], error_text.obj()); | 447 env, error_array.obj(), i, invalid_inputs[i], error_text.obj()); |
| 444 } | 448 } |
| 445 Java_AutofillDialogGlue_updateSectionErrors(env, | 449 Java_AutofillDialogGlue_updateSectionErrors(env, |
| 446 java_object_.obj(), | 450 java_object_.obj(), |
| 447 section, | 451 section, |
| 448 error_array.obj()); | 452 error_array.obj()); |
| 449 return false; | 453 return false; |
| 450 } | 454 } |
| 451 | 455 |
| 452 } // namespace autofill | 456 } // namespace autofill |
| OLD | NEW |