Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(861)

Side by Side Diff: chrome/browser/password_manager/account_chooser_dialog_android.cc

Issue 2248873002: Convert WindowOpenDisposition to an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698