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

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

Issue 2126353003: [CM API] Account Chooser with Sign in button for single account (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove unnssary checks Created 4 years, 5 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 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_ACCOUNT_CHOOSER_DIALOG_ANDROID_H_ 5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_ACCOUNT_CHOOSER_DIALOG_ANDROID_H_
6 #define CHROME_BROWSER_PASSWORD_MANAGER_ACCOUNT_CHOOSER_DIALOG_ANDROID_H_ 6 #define CHROME_BROWSER_PASSWORD_MANAGER_ACCOUNT_CHOOSER_DIALOG_ANDROID_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 29 matching lines...) Expand all
40 void ShowDialog(); 40 void ShowDialog();
41 41
42 // Closes the dialog and propagates that no credentials was chosen. 42 // Closes the dialog and propagates that no credentials was chosen.
43 void CancelDialog(JNIEnv* env, 43 void CancelDialog(JNIEnv* env,
44 const base::android::JavaParamRef<jobject>& obj); 44 const base::android::JavaParamRef<jobject>& obj);
45 45
46 // Propagates the credentials chosen by the user. 46 // Propagates the credentials chosen by the user.
47 void OnCredentialClicked(JNIEnv* env, 47 void OnCredentialClicked(JNIEnv* env,
48 const base::android::JavaParamRef<jobject>& obj, 48 const base::android::JavaParamRef<jobject>& obj,
49 jint credential_item, 49 jint credential_item,
50 jint credential_type); 50 jint credential_type,
51 jboolean sign_button_clicked);
51 52
52 // Opens new tab with page which explains the Smart Lock branding. 53 // Opens new tab with page which explains the Smart Lock branding.
53 void OnLinkClicked(JNIEnv* env, 54 void OnLinkClicked(JNIEnv* env,
54 const base::android::JavaParamRef<jobject>& obj); 55 const base::android::JavaParamRef<jobject>& obj);
55 56
56 // content::WebContentsObserver overrides: 57 // content::WebContentsObserver overrides:
57 void WebContentsDestroyed() override; 58 void WebContentsDestroyed() override;
58 void WasHidden() override; 59 void WasHidden() override;
59 60
60 private: 61 private:
61 void OnDialogCancel(); 62 void OnDialogCancel();
62 63
63 const std::vector<const autofill::PasswordForm*>& local_credentials_forms() 64 const std::vector<const autofill::PasswordForm*>& local_credentials_forms()
64 const; 65 const;
65 66
66 const std::vector<const autofill::PasswordForm*>& 67 const std::vector<const autofill::PasswordForm*>&
67 federated_credentials_forms() const; 68 federated_credentials_forms() const;
68 69
69 void ChooseCredential(size_t index, password_manager::CredentialType type); 70 void ChooseCredential(size_t index,
71 password_manager::CredentialType type,
72 bool sign_button_clicked);
70 73
71 content::WebContents* web_contents_; 74 content::WebContents* web_contents_;
72 ManagePasswordsState passwords_data_; 75 ManagePasswordsState passwords_data_;
73 GURL origin_; 76 GURL origin_;
74 base::android::ScopedJavaGlobalRef<jobject> dialog_jobject_; 77 base::android::ScopedJavaGlobalRef<jobject> dialog_jobject_;
75 78
76 DISALLOW_COPY_AND_ASSIGN(AccountChooserDialogAndroid); 79 DISALLOW_COPY_AND_ASSIGN(AccountChooserDialogAndroid);
77 }; 80 };
78 81
79 // Native JNI methods 82 // Native JNI methods
80 bool RegisterAccountChooserDialogAndroid(JNIEnv* env); 83 bool RegisterAccountChooserDialogAndroid(JNIEnv* env);
81 84
82 #endif // CHROME_BROWSER_PASSWORD_MANAGER_ACCOUNT_CHOOSER_DIALOG_ANDROID_H_ 85 #endif // CHROME_BROWSER_PASSWORD_MANAGER_ACCOUNT_CHOOSER_DIALOG_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698