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

Unified Diff: chrome/browser/ui/passwords/manage_passwords_bubble_model.h

Issue 228603003: Password bubble: Move WebContents completely into the UI controller. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/passwords/manage_passwords_bubble_model.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « no previous file | chrome/browser/ui/passwords/manage_passwords_bubble_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698