OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/android/password_ui_view_android.h" | 5 #include "chrome/browser/android/password_ui_view_android.h" |
6 | 6 |
7 #include "base/android/jni_string.h" | 7 #include "base/android/jni_string.h" |
8 #include "base/android/jni_weak_ref.h" | 8 #include "base/android/jni_weak_ref.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 | 30 |
31 PasswordUIViewAndroid::~PasswordUIViewAndroid() {} | 31 PasswordUIViewAndroid::~PasswordUIViewAndroid() {} |
32 | 32 |
33 void PasswordUIViewAndroid::Destroy(JNIEnv*, jobject) { delete this; } | 33 void PasswordUIViewAndroid::Destroy(JNIEnv*, jobject) { delete this; } |
34 | 34 |
35 Profile* PasswordUIViewAndroid::GetProfile() { | 35 Profile* PasswordUIViewAndroid::GetProfile() { |
36 return ProfileManager::GetLastUsedProfile(); | 36 return ProfileManager::GetLastUsedProfile(); |
37 } | 37 } |
38 | 38 |
39 void PasswordUIViewAndroid::ShowPassword( | 39 void PasswordUIViewAndroid::ShowPassword( |
40 size_t index, const base::string16& password_value) { | 40 size_t index, |
| 41 const std::string& origin_url, |
| 42 const std::string& username, |
| 43 const base::string16& password_value) { |
41 NOTIMPLEMENTED(); | 44 NOTIMPLEMENTED(); |
42 } | 45 } |
43 | 46 |
44 void PasswordUIViewAndroid::SetPasswordList( | 47 void PasswordUIViewAndroid::SetPasswordList( |
45 const ScopedVector<autofill::PasswordForm>& password_list, | 48 const ScopedVector<autofill::PasswordForm>& password_list, |
46 bool show_passwords) { | 49 bool show_passwords) { |
47 // Android just ignores the |show_passwords| argument. | 50 // Android just ignores the |show_passwords| argument. |
48 JNIEnv* env = base::android::AttachCurrentThread(); | 51 JNIEnv* env = base::android::AttachCurrentThread(); |
49 ScopedJavaLocalRef<jobject> ui_controller = weak_java_ui_controller_.get(env); | 52 ScopedJavaLocalRef<jobject> ui_controller = weak_java_ui_controller_.get(env); |
50 if (!ui_controller.is_null()) { | 53 if (!ui_controller.is_null()) { |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 | 130 |
128 // static | 131 // static |
129 static jlong Init(JNIEnv* env, jobject obj) { | 132 static jlong Init(JNIEnv* env, jobject obj) { |
130 PasswordUIViewAndroid* controller = new PasswordUIViewAndroid(env, obj); | 133 PasswordUIViewAndroid* controller = new PasswordUIViewAndroid(env, obj); |
131 return reinterpret_cast<intptr_t>(controller); | 134 return reinterpret_cast<intptr_t>(controller); |
132 } | 135 } |
133 | 136 |
134 bool PasswordUIViewAndroid::RegisterPasswordUIViewAndroid(JNIEnv* env) { | 137 bool PasswordUIViewAndroid::RegisterPasswordUIViewAndroid(JNIEnv* env) { |
135 return RegisterNativesImpl(env); | 138 return RegisterNativesImpl(env); |
136 } | 139 } |
OLD | NEW |