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/update_password_infobar.h" | 5 #include "chrome/browser/ui/android/infobars/update_password_infobar.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
10 #include "base/android/jni_array.h" | 10 #include "base/android/jni_array.h" |
11 #include "base/android/jni_string.h" | 11 #include "base/android/jni_string.h" |
12 #include "chrome/browser/password_manager/update_password_infobar_delegate.h" | 12 #include "chrome/browser/password_manager/update_password_infobar_delegate.h" |
13 #include "components/password_manager/core/common/credential_manager_types.h" | 13 #include "components/password_manager/core/common/credential_manager_types.h" |
14 #include "jni/UpdatePasswordInfoBar_jni.h" | 14 #include "jni/UpdatePasswordInfoBar_jni.h" |
15 | 15 |
16 UpdatePasswordInfoBar::UpdatePasswordInfoBar( | 16 UpdatePasswordInfoBar::UpdatePasswordInfoBar( |
17 scoped_ptr<UpdatePasswordInfoBarDelegate> delegate) | 17 std::unique_ptr<UpdatePasswordInfoBarDelegate> delegate) |
18 : ConfirmInfoBar(std::move(delegate)) {} | 18 : ConfirmInfoBar(std::move(delegate)) {} |
19 | 19 |
20 UpdatePasswordInfoBar::~UpdatePasswordInfoBar() {} | 20 UpdatePasswordInfoBar::~UpdatePasswordInfoBar() {} |
21 | 21 |
22 bool UpdatePasswordInfoBar::Register(JNIEnv* env) { | 22 bool UpdatePasswordInfoBar::Register(JNIEnv* env) { |
23 return RegisterNativesImpl(env); | 23 return RegisterNativesImpl(env); |
24 } | 24 } |
25 | 25 |
26 int UpdatePasswordInfoBar::GetIdOfSelectedUsername() const { | 26 int UpdatePasswordInfoBar::GetIdOfSelectedUsername() const { |
27 return Java_UpdatePasswordInfoBar_getSelectedUsername( | 27 return Java_UpdatePasswordInfoBar_getSelectedUsername( |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 update_password_delegate->is_smartlock_branding_enabled())); | 59 update_password_delegate->is_smartlock_branding_enabled())); |
60 | 60 |
61 java_infobar_.Reset(env, infobar.obj()); | 61 java_infobar_.Reset(env, infobar.obj()); |
62 return infobar; | 62 return infobar; |
63 } | 63 } |
64 | 64 |
65 void UpdatePasswordInfoBar::OnLinkClicked(JNIEnv* env, | 65 void UpdatePasswordInfoBar::OnLinkClicked(JNIEnv* env, |
66 const JavaParamRef<jobject>& obj) { | 66 const JavaParamRef<jobject>& obj) { |
67 GetDelegate()->LinkClicked(NEW_FOREGROUND_TAB); | 67 GetDelegate()->LinkClicked(NEW_FOREGROUND_TAB); |
68 } | 68 } |
OLD | NEW |