| 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; | 22 using base::android::ScopedJavaLocalRef; |
| 23 | 23 |
| 24 namespace autofill { | 24 namespace autofill { |
| 25 | 25 |
| 26 std::unique_ptr<infobars::InfoBar> CreateSaveCardInfoBarMobile( | 26 std::unique_ptr<infobars::InfoBar> CreateSaveCardInfoBarMobile( |
| 27 std::unique_ptr<AutofillSaveCardInfoBarDelegateMobile> delegate) { | 27 std::unique_ptr<AutofillSaveCardInfoBarDelegateMobile> delegate) { |
| 28 return base::WrapUnique(new AutofillSaveCardInfoBar(std::move(delegate))); | 28 return base::MakeUnique<AutofillSaveCardInfoBar>(std::move(delegate)); |
| 29 } | 29 } |
| 30 | 30 |
| 31 } // namespace autofill | 31 } // namespace autofill |
| 32 | 32 |
| 33 AutofillSaveCardInfoBar::AutofillSaveCardInfoBar( | 33 AutofillSaveCardInfoBar::AutofillSaveCardInfoBar( |
| 34 std::unique_ptr<autofill::AutofillSaveCardInfoBarDelegateMobile> delegate) | 34 std::unique_ptr<autofill::AutofillSaveCardInfoBarDelegateMobile> delegate) |
| 35 : ConfirmInfoBar(std::move(delegate)) {} | 35 : ConfirmInfoBar(std::move(delegate)) {} |
| 36 | 36 |
| 37 AutofillSaveCardInfoBar::~AutofillSaveCardInfoBar() {} | 37 AutofillSaveCardInfoBar::~AutofillSaveCardInfoBar() {} |
| 38 | 38 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 } | 87 } |
| 88 | 88 |
| 89 return java_delegate; | 89 return java_delegate; |
| 90 } | 90 } |
| 91 | 91 |
| 92 autofill::AutofillSaveCardInfoBarDelegateMobile* | 92 autofill::AutofillSaveCardInfoBarDelegateMobile* |
| 93 AutofillSaveCardInfoBar::GetSaveCardDelegate() { | 93 AutofillSaveCardInfoBar::GetSaveCardDelegate() { |
| 94 return static_cast<autofill::AutofillSaveCardInfoBarDelegateMobile*>( | 94 return static_cast<autofill::AutofillSaveCardInfoBarDelegateMobile*>( |
| 95 GetDelegate()); | 95 GetDelegate()); |
| 96 } | 96 } |
| OLD | NEW |