| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/save_password_infobar.h" | 5 #include "chrome/browser/ui/android/infobars/save_password_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 "jni/SavePasswordInfoBar_jni.h" | 12 #include "jni/SavePasswordInfoBar_jni.h" |
| 13 | 13 |
| 14 using base::android::JavaParamRef; |
| 15 |
| 14 SavePasswordInfoBar::SavePasswordInfoBar( | 16 SavePasswordInfoBar::SavePasswordInfoBar( |
| 15 std::unique_ptr<SavePasswordInfoBarDelegate> delegate) | 17 std::unique_ptr<SavePasswordInfoBarDelegate> delegate) |
| 16 : ConfirmInfoBar(std::move(delegate)) {} | 18 : ConfirmInfoBar(std::move(delegate)) {} |
| 17 | 19 |
| 18 SavePasswordInfoBar::~SavePasswordInfoBar() { | 20 SavePasswordInfoBar::~SavePasswordInfoBar() { |
| 19 } | 21 } |
| 20 | 22 |
| 21 base::android::ScopedJavaLocalRef<jobject> | 23 base::android::ScopedJavaLocalRef<jobject> |
| 22 SavePasswordInfoBar::CreateRenderInfoBar(JNIEnv* env) { | 24 SavePasswordInfoBar::CreateRenderInfoBar(JNIEnv* env) { |
| 23 using base::android::ConvertUTF16ToJavaString; | 25 using base::android::ConvertUTF16ToJavaString; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 43 | 45 |
| 44 void SavePasswordInfoBar::OnLinkClicked(JNIEnv* env, | 46 void SavePasswordInfoBar::OnLinkClicked(JNIEnv* env, |
| 45 const JavaParamRef<jobject>& obj) { | 47 const JavaParamRef<jobject>& obj) { |
| 46 GetDelegate()->LinkClicked(NEW_FOREGROUND_TAB); | 48 GetDelegate()->LinkClicked(NEW_FOREGROUND_TAB); |
| 47 } | 49 } |
| 48 | 50 |
| 49 std::unique_ptr<infobars::InfoBar> CreateSavePasswordInfoBar( | 51 std::unique_ptr<infobars::InfoBar> CreateSavePasswordInfoBar( |
| 50 std::unique_ptr<SavePasswordInfoBarDelegate> delegate) { | 52 std::unique_ptr<SavePasswordInfoBarDelegate> delegate) { |
| 51 return base::WrapUnique(new SavePasswordInfoBar(std::move(delegate))); | 53 return base::WrapUnique(new SavePasswordInfoBar(std::move(delegate))); |
| 52 } | 54 } |
| OLD | NEW |