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

Side by Side Diff: chrome/browser/ui/passwords/manage_passwords_ui_controller.h

Issue 2036323002: Implement the UI logic behind the Sign In promo in the password bubble (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments Created 4 years, 6 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 void OnNopeUpdateClicked() override; 96 void OnNopeUpdateClicked() override;
97 void NeverSavePassword() override; 97 void NeverSavePassword() override;
98 void SavePassword() override; 98 void SavePassword() override;
99 void UpdatePassword(const autofill::PasswordForm& password_form) override; 99 void UpdatePassword(const autofill::PasswordForm& password_form) override;
100 void ChooseCredential( 100 void ChooseCredential(
101 autofill::PasswordForm form, 101 autofill::PasswordForm form,
102 password_manager::CredentialType credential_type) override; 102 password_manager::CredentialType credential_type) override;
103 void NavigateToExternalPasswordManager() override; 103 void NavigateToExternalPasswordManager() override;
104 void NavigateToSmartLockHelpPage() override; 104 void NavigateToSmartLockHelpPage() override;
105 void NavigateToPasswordManagerSettingsPage() override; 105 void NavigateToPasswordManagerSettingsPage() override;
106 void NavigateToChromeSignIn() override;
106 void OnDialogHidden() override; 107 void OnDialogHidden() override;
107 108
108 protected: 109 protected:
109 explicit ManagePasswordsUIController( 110 explicit ManagePasswordsUIController(
110 content::WebContents* web_contents); 111 content::WebContents* web_contents);
111 112
112 // The pieces of saving and blacklisting passwords that interact with 113 // The pieces of saving and blacklisting passwords that interact with
113 // FormManager, split off into internal functions for testing/mocking. 114 // FormManager, split off into internal functions for testing/mocking.
114 virtual void SavePasswordInternal(); 115 virtual void SavePasswordInternal();
115 virtual void UpdatePasswordInternal( 116 virtual void UpdatePasswordInternal(
(...skipping 26 matching lines...) Expand all
142 143
143 private: 144 private:
144 friend class content::WebContentsUserData<ManagePasswordsUIController>; 145 friend class content::WebContentsUserData<ManagePasswordsUIController>;
145 146
146 enum BubbleStatus { 147 enum BubbleStatus {
147 NOT_SHOWN, 148 NOT_SHOWN,
148 // The bubble is to be popped up in the next call to 149 // The bubble is to be popped up in the next call to
149 // UpdateBubbleAndIconVisibility(). 150 // UpdateBubbleAndIconVisibility().
150 SHOULD_POP_UP, 151 SHOULD_POP_UP,
151 SHOWN, 152 SHOWN,
153 // Same as SHOWN but the icon is to be updated when the bubble is closed.
154 SHOWN_PENDING_ICON_UPDATE,
152 }; 155 };
153 156
154 // Shows the password bubble without user interaction. 157 // Shows the password bubble without user interaction.
155 void ShowBubbleWithoutUserInteraction(); 158 void ShowBubbleWithoutUserInteraction();
156 159
157 // Closes the account chooser gracefully so the callback is called. Then sets 160 // Closes the account chooser gracefully so the callback is called. Then sets
158 // the state to MANAGE_STATE. 161 // the state to MANAGE_STATE.
159 void DestroyAccountChooser(); 162 void DestroyAccountChooser();
160 163
161 // content::WebContentsObserver: 164 // content::WebContentsObserver:
162 void WebContentsDestroyed() override; 165 void WebContentsDestroyed() override;
163 166
164 // The wrapper around current state and data. 167 // The wrapper around current state and data.
165 ManagePasswordsState passwords_data_; 168 ManagePasswordsState passwords_data_;
166 169
167 // The controller for the blocking dialogs. 170 // The controller for the blocking dialogs.
168 std::unique_ptr<PasswordDialogControllerImpl> dialog_controller_; 171 std::unique_ptr<PasswordDialogControllerImpl> dialog_controller_;
169 172
170 BubbleStatus bubble_status_; 173 BubbleStatus bubble_status_;
171 174
172 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsUIController); 175 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsUIController);
173 }; 176 };
174 177
175 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_ 178 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698