Chromium Code Reviews| Index: chrome/browser/ui/passwords/manage_passwords_bubble_model.h |
| diff --git a/chrome/browser/ui/passwords/manage_passwords_bubble_model.h b/chrome/browser/ui/passwords/manage_passwords_bubble_model.h |
| index 60173a9474a89c2c29823c484a8a957eab29fa9e..b5caaf47f206e0b4a804e26688aa9c89c0d37459 100644 |
| --- a/chrome/browser/ui/passwords/manage_passwords_bubble_model.h |
| +++ b/chrome/browser/ui/passwords/manage_passwords_bubble_model.h |
| @@ -5,8 +5,8 @@ |
| #ifndef CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_MODEL_H_ |
| #define CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_MODEL_H_ |
| +#include "chrome/browser/ui/passwords/manage_passwords_bubble_ui_controller.h" |
| #include "components/autofill/core/common/password_form.h" |
| -#include "content/public/browser/web_contents_observer.h" |
| class ManagePasswordsIconController; |
| @@ -16,9 +16,10 @@ class WebContents; |
| // This model provides data for the ManagePasswordsBubble and controls the |
| // password management actions. |
| -class ManagePasswordsBubbleModel : public content::WebContentsObserver { |
| +class ManagePasswordsBubbleModel { |
| public: |
| - explicit ManagePasswordsBubbleModel(content::WebContents* web_contents); |
| + explicit ManagePasswordsBubbleModel( |
| + ManagePasswordsBubbleUIController* ui_controller); |
|
markusheintz_
2014/04/10 13:26:31
Instead of passing the UI controller to the model
|
| virtual ~ManagePasswordsBubbleModel(); |
| enum ManagePasswordsBubbleState { |
| @@ -62,7 +63,7 @@ class ManagePasswordsBubbleModel : public content::WebContentsObserver { |
| return manage_passwords_bubble_state() == PASSWORD_TO_BE_SAVED; |
| } |
| - bool password_submitted() { return password_submitted_; } |
| + bool password_submitted() { return ui_controller_->password_submitted(); } |
| const base::string16& title() { return title_; } |
| const autofill::PasswordForm& pending_credentials() { |
| return pending_credentials_; |
| @@ -71,11 +72,7 @@ class ManagePasswordsBubbleModel : public content::WebContentsObserver { |
| const base::string16& manage_link() { return manage_link_; } |
| private: |
| - // content::WebContentsObserver |
| - virtual void WebContentsDestroyed( |
| - content::WebContents* web_contents) OVERRIDE; |
| - |
| - content::WebContents* web_contents_; |
| + ManagePasswordsBubbleUIController* ui_controller_; |
| ManagePasswordsBubbleState manage_passwords_bubble_state_; |
| bool password_submitted_; |
| base::string16 title_; |