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

Side by Side Diff: chrome/browser/password_manager/auto_signin_first_run_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 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/password_manager/auto_signin_first_run_dialog_android.h " 5 #include "chrome/browser/password_manager/auto_signin_first_run_dialog_android.h "
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_string.h" 8 #include "base/android/jni_string.h"
9 #include "chrome/browser/password_manager/chrome_password_manager_client.h" 9 #include "chrome/browser/password_manager/chrome_password_manager_client.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 Profile::FromBrowserContext(web_contents_->GetBrowserContext()); 93 Profile::FromBrowserContext(web_contents_->GetBrowserContext());
94 password_bubble_experiment::TurnOffAutoSignin(profile->GetPrefs()); 94 password_bubble_experiment::TurnOffAutoSignin(profile->GetPrefs());
95 MarkAutoSignInFirstRunExperienceShown(web_contents_); 95 MarkAutoSignInFirstRunExperienceShown(web_contents_);
96 } 96 }
97 97
98 void AutoSigninFirstRunDialogAndroid::CancelDialog(JNIEnv* env, jobject obj) {} 98 void AutoSigninFirstRunDialogAndroid::CancelDialog(JNIEnv* env, jobject obj) {}
99 99
100 void AutoSigninFirstRunDialogAndroid::OnLinkClicked(JNIEnv* env, jobject obj) { 100 void AutoSigninFirstRunDialogAndroid::OnLinkClicked(JNIEnv* env, jobject obj) {
101 web_contents_->OpenURL(content::OpenURLParams( 101 web_contents_->OpenURL(content::OpenURLParams(
102 GURL(password_manager::kPasswordManagerHelpCenterSmartLock), 102 GURL(password_manager::kPasswordManagerHelpCenterSmartLock),
103 content::Referrer(), NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_LINK, 103 content::Referrer(), WindowOpenDisposition::NEW_FOREGROUND_TAB,
104 false /* is_renderer_initiated */)); 104 ui::PAGE_TRANSITION_LINK, false /* is_renderer_initiated */));
105 } 105 }
106 106
107 void AutoSigninFirstRunDialogAndroid::WebContentsDestroyed() { 107 void AutoSigninFirstRunDialogAndroid::WebContentsDestroyed() {
108 JNIEnv* env = AttachCurrentThread(); 108 JNIEnv* env = AttachCurrentThread();
109 Java_AutoSigninFirstRunDialog_dismissDialog(env, dialog_jobject_); 109 Java_AutoSigninFirstRunDialog_dismissDialog(env, dialog_jobject_);
110 } 110 }
111 111
112 void AutoSigninFirstRunDialogAndroid::WasHidden() { 112 void AutoSigninFirstRunDialogAndroid::WasHidden() {
113 // TODO(https://crbug.com/610700): once bug is fixed, this code should be 113 // TODO(https://crbug.com/610700): once bug is fixed, this code should be
114 // gone. 114 // gone.
115 JNIEnv* env = AttachCurrentThread(); 115 JNIEnv* env = AttachCurrentThread();
116 Java_AutoSigninFirstRunDialog_dismissDialog(env, dialog_jobject_); 116 Java_AutoSigninFirstRunDialog_dismissDialog(env, dialog_jobject_);
117 } 117 }
118 118
119 bool RegisterAutoSigninFirstRunDialogAndroid(JNIEnv* env) { 119 bool RegisterAutoSigninFirstRunDialogAndroid(JNIEnv* env) {
120 return RegisterNativesImpl(env); 120 return RegisterNativesImpl(env);
121 } 121 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698