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

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

Issue 2033713002: Implement the Chrome Sign-in promo bubble for password manager on Views. (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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_BUBBLE_MODEL_H_ 5 #ifndef CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_MODEL_H_
6 #define CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_MODEL_H_ 6 #define CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_MODEL_H_
7 7
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 66
67 // Called by the view code when the auto-signin toast is about to close due to 67 // Called by the view code when the auto-signin toast is about to close due to
68 // timeout. 68 // timeout.
69 void OnAutoSignInToastTimeout(); 69 void OnAutoSignInToastTimeout();
70 70
71 // Called by the view code to delete or add a password form to the 71 // Called by the view code to delete or add a password form to the
72 // PasswordStore. 72 // PasswordStore.
73 void OnPasswordAction(const autofill::PasswordForm& password_form, 73 void OnPasswordAction(const autofill::PasswordForm& password_form,
74 PasswordAction action); 74 PasswordAction action);
75 75
76 // Called by the view when the "Sign in" button in the promo bubble is
77 // clicked.
78 void OnSignInToChromeClicked();
79
80 // Called by the view when the "No thanks" button in the promo bubble is
81 // clicked.
82 void OnSkipSignInClicked();
83
76 password_manager::ui::State state() const { return state_; } 84 password_manager::ui::State state() const { return state_; }
77 85
78 const base::string16& title() const { return title_; } 86 const base::string16& title() const { return title_; }
79 const autofill::PasswordForm& pending_password() const { 87 const autofill::PasswordForm& pending_password() const {
80 return pending_password_; 88 return pending_password_;
81 } 89 }
82 // Returns the available credentials which match the current site. 90 // Returns the available credentials which match the current site.
83 const ScopedVector<const autofill::PasswordForm>& local_credentials() const { 91 const ScopedVector<const autofill::PasswordForm>& local_credentials() const {
84 return local_credentials_; 92 return local_credentials_;
85 } 93 }
(...skipping 12 matching lines...) Expand all
98 Profile* GetProfile() const; 106 Profile* GetProfile() const;
99 107
100 // Returns true iff the multiple account selection prompt for account update 108 // Returns true iff the multiple account selection prompt for account update
101 // should be presented. 109 // should be presented.
102 bool ShouldShowMultipleAccountUpdateUI() const; 110 bool ShouldShowMultipleAccountUpdateUI() const;
103 111
104 // True if the save bubble should display the warm welcome for Google Smart 112 // True if the save bubble should display the warm welcome for Google Smart
105 // Lock. 113 // Lock.
106 bool ShouldShowGoogleSmartLockWelcome() const; 114 bool ShouldShowGoogleSmartLockWelcome() const;
107 115
116 // Returns true and updates the internal state iff the Save bubble should
117 // switch to the Chrome Sign In promo after the password was saved. Otherwise,
118 // returns false and leaves the current state.
119 bool ReplaceToShowSignInPromoIfNeeded();
120
108 void SetClockForTesting(std::unique_ptr<base::Clock> clock); 121 void SetClockForTesting(std::unique_ptr<base::Clock> clock);
109 122
110 private: 123 private:
111 enum UserBehaviorOnUpdateBubble { 124 enum UserBehaviorOnUpdateBubble {
112 UPDATE_CLICKED, 125 UPDATE_CLICKED,
113 NOPE_CLICKED, 126 NOPE_CLICKED,
114 NO_INTERACTION 127 NO_INTERACTION
115 }; 128 };
116 class InteractionKeeper; 129 class InteractionKeeper;
117 // Updates |title_| and |title_brand_link_range_| for the 130 // Updates |title_| and |title_brand_link_range_| for the
(...skipping 17 matching lines...) Expand all
135 base::string16 save_confirmation_text_; 148 base::string16 save_confirmation_text_;
136 gfx::Range save_confirmation_link_range_; 149 gfx::Range save_confirmation_link_range_;
137 150
138 // Responsible for recording all the interactions required. 151 // Responsible for recording all the interactions required.
139 std::unique_ptr<InteractionKeeper> interaction_keeper_; 152 std::unique_ptr<InteractionKeeper> interaction_keeper_;
140 153
141 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsBubbleModel); 154 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsBubbleModel);
142 }; 155 };
143 156
144 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_MODEL_H_ 157 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_MODEL_H_
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/ui/passwords/manage_passwords_bubble_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698