OLD | NEW |
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 "chrome/browser/ui/passwords/manage_passwords_bubble.h" | 8 #include "chrome/browser/ui/passwords/manage_passwords_bubble.h" |
9 #include "components/autofill/core/common/password_form.h" | 9 #include "components/autofill/core/common/password_form.h" |
10 #include "components/password_manager/core/browser/password_manager_metrics_util
.h" | 10 #include "components/password_manager/core/browser/password_manager_metrics_util
.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 class ManagePasswordsBubbleModel : public content::WebContentsObserver { | 23 class ManagePasswordsBubbleModel : public content::WebContentsObserver { |
24 public: | 24 public: |
25 enum PasswordAction { REMOVE_PASSWORD, ADD_PASSWORD }; | 25 enum PasswordAction { REMOVE_PASSWORD, ADD_PASSWORD }; |
26 | 26 |
27 // Creates a ManagePasswordsBubbleModel, which holds a raw pointer to the | 27 // Creates a ManagePasswordsBubbleModel, which holds a raw pointer to the |
28 // WebContents in which it lives. Defaults to a display disposition of | 28 // WebContents in which it lives. Defaults to a display disposition of |
29 // AUTOMATIC_WITH_PASSWORD_PENDING, and a dismissal reason of NOT_DISPLAYED. | 29 // AUTOMATIC_WITH_PASSWORD_PENDING, and a dismissal reason of NOT_DISPLAYED. |
30 // The bubble's state is updated from the ManagePasswordsUIController | 30 // The bubble's state is updated from the ManagePasswordsUIController |
31 // associated with |web_contents| upon creation. | 31 // associated with |web_contents| upon creation. |
32 explicit ManagePasswordsBubbleModel(content::WebContents* web_contents); | 32 explicit ManagePasswordsBubbleModel(content::WebContents* web_contents); |
33 virtual ~ManagePasswordsBubbleModel(); | 33 ~ManagePasswordsBubbleModel() override; |
34 | 34 |
35 // Called by the view code when the bubble is shown. | 35 // Called by the view code when the bubble is shown. |
36 void OnBubbleShown(ManagePasswordsBubble::DisplayReason reason); | 36 void OnBubbleShown(ManagePasswordsBubble::DisplayReason reason); |
37 | 37 |
38 // Called by the view code when the bubble is hidden. | 38 // Called by the view code when the bubble is hidden. |
39 void OnBubbleHidden(); | 39 void OnBubbleHidden(); |
40 | 40 |
41 // Called by the view code when the "Nope" button in clicked by the user. | 41 // Called by the view code when the "Nope" button in clicked by the user. |
42 void OnNopeClicked(); | 42 void OnNopeClicked(); |
43 | 43 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 base::string16 save_confirmation_text_; | 111 base::string16 save_confirmation_text_; |
112 gfx::Range save_confirmation_link_range_; | 112 gfx::Range save_confirmation_link_range_; |
113 | 113 |
114 password_manager::metrics_util::UIDisplayDisposition display_disposition_; | 114 password_manager::metrics_util::UIDisplayDisposition display_disposition_; |
115 password_manager::metrics_util::UIDismissalReason dismissal_reason_; | 115 password_manager::metrics_util::UIDismissalReason dismissal_reason_; |
116 | 116 |
117 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsBubbleModel); | 117 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsBubbleModel); |
118 }; | 118 }; |
119 | 119 |
120 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_MODEL_H_ | 120 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_MODEL_H_ |
OLD | NEW |