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

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: fix model 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 clicked.
vabr (Chromium) 2016/06/02 13:10:55 nit: clicked -> is clicked (Also below.)
vasilii 2016/06/02 13:36:18 Done.
77 void OnSignInToChromeClicked();
78
79 // Called by the view when the "No thanks" button in the promo bubble clicked.
80 void OnSkipSignInClicked();
81
76 password_manager::ui::State state() const { return state_; } 82 password_manager::ui::State state() const { return state_; }
77 83
78 const base::string16& title() const { return title_; } 84 const base::string16& title() const { return title_; }
79 const autofill::PasswordForm& pending_password() const { 85 const autofill::PasswordForm& pending_password() const {
80 return pending_password_; 86 return pending_password_;
81 } 87 }
82 // Returns the available credentials which match the current site. 88 // Returns the available credentials which match the current site.
83 const ScopedVector<const autofill::PasswordForm>& local_credentials() const { 89 const ScopedVector<const autofill::PasswordForm>& local_credentials() const {
84 return local_credentials_; 90 return local_credentials_;
85 } 91 }
(...skipping 12 matching lines...) Expand all
98 Profile* GetProfile() const; 104 Profile* GetProfile() const;
99 105
100 // Returns true iff the multiple account selection prompt for account update 106 // Returns true iff the multiple account selection prompt for account update
101 // should be presented. 107 // should be presented.
102 bool ShouldShowMultipleAccountUpdateUI() const; 108 bool ShouldShowMultipleAccountUpdateUI() const;
103 109
104 // True if the save bubble should display the warm welcome for Google Smart 110 // True if the save bubble should display the warm welcome for Google Smart
105 // Lock. 111 // Lock.
106 bool ShouldShowGoogleSmartLockWelcome() const; 112 bool ShouldShowGoogleSmartLockWelcome() const;
107 113
114 // Returns true iff the Save bubble should switch to the Chrome Sign In promo.
115 bool ShouldShowSignInPromo();
vabr (Chromium) 2016/06/02 13:10:55 The method has side-effects which are not mentione
vasilii 2016/06/02 13:36:18 Done.
116
108 void SetClockForTesting(std::unique_ptr<base::Clock> clock); 117 void SetClockForTesting(std::unique_ptr<base::Clock> clock);
109 118
110 private: 119 private:
111 enum UserBehaviorOnUpdateBubble { 120 enum UserBehaviorOnUpdateBubble {
112 UPDATE_CLICKED, 121 UPDATE_CLICKED,
113 NOPE_CLICKED, 122 NOPE_CLICKED,
114 NO_INTERACTION 123 NO_INTERACTION
115 }; 124 };
116 class InteractionKeeper; 125 class InteractionKeeper;
117 // Updates |title_| and |title_brand_link_range_| for the 126 // Updates |title_| and |title_brand_link_range_| for the
(...skipping 17 matching lines...) Expand all
135 base::string16 save_confirmation_text_; 144 base::string16 save_confirmation_text_;
136 gfx::Range save_confirmation_link_range_; 145 gfx::Range save_confirmation_link_range_;
137 146
138 // Responsible for recording all the interactions required. 147 // Responsible for recording all the interactions required.
139 std::unique_ptr<InteractionKeeper> interaction_keeper_; 148 std::unique_ptr<InteractionKeeper> interaction_keeper_;
140 149
141 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsBubbleModel); 150 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsBubbleModel);
142 }; 151 };
143 152
144 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_MODEL_H_ 153 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_MODEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698