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/password_manager/account_chooser_dialog_android.h" | 5 #include "chrome/browser/password_manager/account_chooser_dialog_android.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" |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 JNIEnv* env, | 192 JNIEnv* env, |
193 const JavaParamRef<jobject>& obj) { | 193 const JavaParamRef<jobject>& obj) { |
194 OnDialogCancel(); | 194 OnDialogCancel(); |
195 } | 195 } |
196 | 196 |
197 void AccountChooserDialogAndroid::OnLinkClicked( | 197 void AccountChooserDialogAndroid::OnLinkClicked( |
198 JNIEnv* env, | 198 JNIEnv* env, |
199 const JavaParamRef<jobject>& obj) { | 199 const JavaParamRef<jobject>& obj) { |
200 web_contents_->OpenURL(content::OpenURLParams( | 200 web_contents_->OpenURL(content::OpenURLParams( |
201 GURL(password_manager::kPasswordManagerHelpCenterSmartLock), | 201 GURL(password_manager::kPasswordManagerHelpCenterSmartLock), |
202 content::Referrer(), NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_LINK, | 202 content::Referrer(), WindowOpenDisposition::NEW_FOREGROUND_TAB, |
203 false /* is_renderer_initiated */)); | 203 ui::PAGE_TRANSITION_LINK, false /* is_renderer_initiated */)); |
204 } | 204 } |
205 | 205 |
206 void AccountChooserDialogAndroid::WebContentsDestroyed() { | 206 void AccountChooserDialogAndroid::WebContentsDestroyed() { |
207 JNIEnv* env = AttachCurrentThread(); | 207 JNIEnv* env = AttachCurrentThread(); |
208 Java_AccountChooserDialog_dismissDialog(env, dialog_jobject_); | 208 Java_AccountChooserDialog_dismissDialog(env, dialog_jobject_); |
209 } | 209 } |
210 | 210 |
211 void AccountChooserDialogAndroid::WasHidden() { | 211 void AccountChooserDialogAndroid::WasHidden() { |
212 // TODO(https://crbug.com/610700): once bug is fixed, this code should be | 212 // TODO(https://crbug.com/610700): once bug is fixed, this code should be |
213 // gone. | 213 // gone. |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 action); | 258 action); |
259 } else { | 259 } else { |
260 password_manager::metrics_util::LogAccountChooserUserActionManyAccounts( | 260 password_manager::metrics_util::LogAccountChooserUserActionManyAccounts( |
261 action); | 261 action); |
262 } | 262 } |
263 } | 263 } |
264 | 264 |
265 bool RegisterAccountChooserDialogAndroid(JNIEnv* env) { | 265 bool RegisterAccountChooserDialogAndroid(JNIEnv* env) { |
266 return RegisterNativesImpl(env); | 266 return RegisterNativesImpl(env); |
267 } | 267 } |
OLD | NEW |