| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/infobars/autofill_save_card_infobar.h" | 5 #include "chrome/browser/ui/android/infobars/autofill_save_card_infobar.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
| 10 #include "base/android/jni_string.h" | 10 #include "base/android/jni_string.h" |
| 11 #include "base/memory/ptr_util.h" | 11 #include "base/memory/ptr_util.h" |
| 12 #include "chrome/browser/android/resource_mapper.h" | 12 #include "chrome/browser/android/resource_mapper.h" |
| 13 #include "chrome/browser/infobars/infobar_service.h" | 13 #include "chrome/browser/infobars/infobar_service.h" |
| 14 #include "components/autofill/core/browser/autofill_save_card_infobar_delegate_m
obile.h" | 14 #include "components/autofill/core/browser/autofill_save_card_infobar_delegate_m
obile.h" |
| 15 #include "components/autofill/core/browser/autofill_save_card_infobar_mobile.h" | 15 #include "components/autofill/core/browser/autofill_save_card_infobar_mobile.h" |
| 16 #include "components/autofill/core/browser/legal_message_line.h" | 16 #include "components/autofill/core/browser/legal_message_line.h" |
| 17 #include "jni/AutofillSaveCardInfoBar_jni.h" | 17 #include "jni/AutofillSaveCardInfoBar_jni.h" |
| 18 #include "ui/gfx/android/java_bitmap.h" | 18 #include "ui/gfx/android/java_bitmap.h" |
| 19 #include "ui/gfx/image/image.h" | 19 #include "ui/gfx/image/image.h" |
| 20 #include "url/gurl.h" | 20 #include "url/gurl.h" |
| 21 | 21 |
| 22 using base::android::ScopedJavaLocalRef; |
| 23 |
| 22 namespace autofill { | 24 namespace autofill { |
| 23 | 25 |
| 24 std::unique_ptr<infobars::InfoBar> CreateSaveCardInfoBarMobile( | 26 std::unique_ptr<infobars::InfoBar> CreateSaveCardInfoBarMobile( |
| 25 std::unique_ptr<AutofillSaveCardInfoBarDelegateMobile> delegate) { | 27 std::unique_ptr<AutofillSaveCardInfoBarDelegateMobile> delegate) { |
| 26 return base::WrapUnique(new AutofillSaveCardInfoBar(std::move(delegate))); | 28 return base::WrapUnique(new AutofillSaveCardInfoBar(std::move(delegate))); |
| 27 } | 29 } |
| 28 | 30 |
| 29 } // namespace autofill | 31 } // namespace autofill |
| 30 | 32 |
| 31 AutofillSaveCardInfoBar::AutofillSaveCardInfoBar( | 33 AutofillSaveCardInfoBar::AutofillSaveCardInfoBar( |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 } | 91 } |
| 90 | 92 |
| 91 return java_delegate; | 93 return java_delegate; |
| 92 } | 94 } |
| 93 | 95 |
| 94 autofill::AutofillSaveCardInfoBarDelegateMobile* | 96 autofill::AutofillSaveCardInfoBarDelegateMobile* |
| 95 AutofillSaveCardInfoBar::GetSaveCardDelegate() { | 97 AutofillSaveCardInfoBar::GetSaveCardDelegate() { |
| 96 return static_cast<autofill::AutofillSaveCardInfoBarDelegateMobile*>( | 98 return static_cast<autofill::AutofillSaveCardInfoBarDelegateMobile*>( |
| 97 GetDelegate()); | 99 GetDelegate()); |
| 98 } | 100 } |
| OLD | NEW |