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

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

Issue 2694893002: Integrate SMS service with Desktop iOS promotion (Closed)
Patch Set: Rename desktop_ios_promotion_view Created 3 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 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 #include <vector> 9 #include <vector>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "base/time/clock.h" 13 #include "base/time/clock.h"
14 #include "components/autofill/core/common/password_form.h" 14 #include "components/autofill/core/common/password_form.h"
15 #include "components/password_manager/core/browser/password_manager_metrics_util .h" 15 #include "components/password_manager/core/browser/password_manager_metrics_util .h"
16 #include "components/password_manager/core/browser/statistics_table.h" 16 #include "components/password_manager/core/browser/statistics_table.h"
17 #include "components/password_manager/core/common/password_manager_ui.h" 17 #include "components/password_manager/core/common/password_manager_ui.h"
18 #include "ui/gfx/range/range.h" 18 #include "ui/gfx/range/range.h"
19 19
20 namespace content { 20 namespace content {
21 class WebContents; 21 class WebContents;
22 } 22 }
23 23
24 class DesktopIOSPromotionController;
24 class PasswordsModelDelegate; 25 class PasswordsModelDelegate;
25 class Profile; 26 class Profile;
26 27
27 // This model provides data for the ManagePasswordsBubble and controls the 28 // This model provides data for the ManagePasswordsBubble and controls the
28 // password management actions. 29 // password management actions.
29 class ManagePasswordsBubbleModel { 30 class ManagePasswordsBubbleModel {
30 public: 31 public:
31 enum PasswordAction { REMOVE_PASSWORD, ADD_PASSWORD }; 32 enum PasswordAction { REMOVE_PASSWORD, ADD_PASSWORD };
32 enum DisplayReason { AUTOMATIC, USER_ACTION }; 33 enum DisplayReason { AUTOMATIC, USER_ACTION };
33 34
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 return save_confirmation_text_; 97 return save_confirmation_text_;
97 } 98 }
98 const gfx::Range& save_confirmation_link_range() const { 99 const gfx::Range& save_confirmation_link_range() const {
99 return save_confirmation_link_range_; 100 return save_confirmation_link_range_;
100 } 101 }
101 102
102 const gfx::Range& title_brand_link_range() const { 103 const gfx::Range& title_brand_link_range() const {
103 return title_brand_link_range_; 104 return title_brand_link_range_;
104 } 105 }
105 106
107 DesktopIOSPromotionController* ios_promotion_controller() const {
108 return ios_promotion_controller_.get();
109 }
110
106 Profile* GetProfile() const; 111 Profile* GetProfile() const;
107 content::WebContents* GetWebContents() const; 112 content::WebContents* GetWebContents() const;
108 113
109 // Returns true iff the multiple account selection prompt for account update 114 // Returns true iff the multiple account selection prompt for account update
110 // should be presented. 115 // should be presented.
111 bool ShouldShowMultipleAccountUpdateUI() const; 116 bool ShouldShowMultipleAccountUpdateUI() const;
112 117
113 // Returns true and updates the internal state iff the Save bubble should 118 // Returns true and updates the internal state iff the Save bubble should
114 // switch to show a promotion after the password was saved. Otherwise, 119 // switch to show a promotion after the password was saved. Otherwise,
115 // returns false and leaves the current state. 120 // returns false and leaves the current state.
(...skipping 22 matching lines...) Expand all
138 // Range of characters in the title that contains the Smart Lock Brand and 143 // Range of characters in the title that contains the Smart Lock Brand and
139 // should point to an article. For the default title the range is empty. 144 // should point to an article. For the default title the range is empty.
140 gfx::Range title_brand_link_range_; 145 gfx::Range title_brand_link_range_;
141 autofill::PasswordForm pending_password_; 146 autofill::PasswordForm pending_password_;
142 bool password_overridden_; 147 bool password_overridden_;
143 std::vector<autofill::PasswordForm> local_credentials_; 148 std::vector<autofill::PasswordForm> local_credentials_;
144 base::string16 manage_link_; 149 base::string16 manage_link_;
145 base::string16 save_confirmation_text_; 150 base::string16 save_confirmation_text_;
146 gfx::Range save_confirmation_link_range_; 151 gfx::Range save_confirmation_link_range_;
147 152
153 // The controller for the desktop ios promotion.
154 std::unique_ptr<DesktopIOSPromotionController> ios_promotion_controller_;
155
148 // Responsible for recording all the interactions required. 156 // Responsible for recording all the interactions required.
149 std::unique_ptr<InteractionKeeper> interaction_keeper_; 157 std::unique_ptr<InteractionKeeper> interaction_keeper_;
150 158
151 // A bridge to ManagePasswordsUIController instance. 159 // A bridge to ManagePasswordsUIController instance.
152 base::WeakPtr<PasswordsModelDelegate> delegate_; 160 base::WeakPtr<PasswordsModelDelegate> delegate_;
153 161
154 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsBubbleModel); 162 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsBubbleModel);
155 }; 163 };
156 164
157 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_MODEL_H_ 165 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_MODEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698