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

Unified Diff: chrome/browser/ui/passwords/manage_passwords_ui_controller.h

Issue 928753003: Clean password_manager::ui::State (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge with master Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/passwords/manage_passwords_ui_controller.h
diff --git a/chrome/browser/ui/passwords/manage_passwords_ui_controller.h b/chrome/browser/ui/passwords/manage_passwords_ui_controller.h
index 85afa5635362d85ee7633526312ebb7cebdce312..adc7d60fbe6bff0e946c3b635c5f109cb926a3c2 100644
--- a/chrome/browser/ui/passwords/manage_passwords_ui_controller.h
+++ b/chrome/browser/ui/passwords/manage_passwords_ui_controller.h
@@ -108,6 +108,9 @@ class ManagePasswordsUIController
// Called from the model when the bubble is displayed.
void OnBubbleShown();
+ // Called from the model when the bubble is hidden.
+ void OnBubbleHidden();
+
password_manager::ui::State state() const { return state_; }
ScopedVector<autofill::PasswordForm>& federated_credentials_forms() {
@@ -128,6 +131,8 @@ class ManagePasswordsUIController
const GURL& origin() const { return origin_; }
+ bool IsAutomaticallyOpeningBubble() const { return should_pop_up_bubble_; }
+
protected:
explicit ManagePasswordsUIController(
content::WebContents* web_contents);
@@ -177,8 +182,7 @@ class ManagePasswordsUIController
private:
friend class content::WebContentsUserData<ManagePasswordsUIController>;
- // Shows the password bubble without user interaction. The controller MUST
- // be in PENDING_PASSWORD_AND_BUBBLE_STATE.
+ // Shows the password bubble without user interaction.
void ShowBubbleWithoutUserInteraction();
// content::WebContentsObserver:
@@ -202,9 +206,9 @@ class ManagePasswordsUIController
base::Callback<void(const password_manager::CredentialInfo&)>
credentials_callback_;
- // Contains true is the bubble's appeared during the last call to
+ // Contains true if the bubble is to be popped up in the next call to
// UpdateBubbleAndIconVisibility().
- bool bubble_shown_;
+ bool should_pop_up_bubble_;
// The origin of the form we're currently dealing with; we'll use this to
// determine which PasswordStore changes we should care about when updating
« no previous file with comments | « chrome/browser/ui/passwords/manage_passwords_test.cc ('k') | chrome/browser/ui/passwords/manage_passwords_ui_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698