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

Side by Side Diff: chrome/browser/ui/passwords/manage_passwords_bubble_ui_controller.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 unified diff | Download patch | Annotate | Revision Log
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_UI_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_UI_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_UI_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_UI_CONTROLLER_H_
7 7
8 #include "components/password_manager/core/browser/password_form_manager.h" 8 #include "components/password_manager/core/browser/password_form_manager.h"
9 #include "content/public/browser/navigation_details.h" 9 #include "content/public/browser/navigation_details.h"
10 #include "content/public/browser/web_contents_observer.h" 10 #include "content/public/browser/web_contents_observer.h"
11 #include "content/public/browser/web_contents_user_data.h" 11 #include "content/public/browser/web_contents_user_data.h"
12 12
13 class Profile;
14
13 namespace content { 15 namespace content {
14 class WebContents; 16 class WebContents;
15 } 17 }
16 18
17 // Per-tab class to control the Omnibox password icon and bubble. 19 // Per-tab class to control the Omnibox password icon and bubble.
18 class ManagePasswordsBubbleUIController 20 class ManagePasswordsBubbleUIController
19 : public content::WebContentsObserver, 21 : public content::WebContentsObserver,
20 public content::WebContentsUserData<ManagePasswordsBubbleUIController> { 22 public content::WebContentsUserData<ManagePasswordsBubbleUIController> {
21 public: 23 public:
22 virtual ~ManagePasswordsBubbleUIController(); 24 virtual ~ManagePasswordsBubbleUIController();
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 87
86 void set_password_submitted(bool password_submitted) { 88 void set_password_submitted(bool password_submitted) {
87 password_submitted_ = password_submitted; 89 password_submitted_ = password_submitted;
88 } 90 }
89 91
90 bool autofill_blocked() const { return autofill_blocked_; } 92 bool autofill_blocked() const { return autofill_blocked_; }
91 void set_autofill_blocked(bool autofill_blocked) { 93 void set_autofill_blocked(bool autofill_blocked) {
92 autofill_blocked_ = autofill_blocked; 94 autofill_blocked_ = autofill_blocked;
93 } 95 }
94 96
97 Profile* profile() const;
98
99 void NavigateToPasswordManagerSettingsPage() const;
100
95 private: 101 private:
96 friend class content::WebContentsUserData<ManagePasswordsBubbleUIController>; 102 friend class content::WebContentsUserData<ManagePasswordsBubbleUIController>;
97 103
98 explicit ManagePasswordsBubbleUIController( 104 explicit ManagePasswordsBubbleUIController(
99 content::WebContents* web_contents); 105 content::WebContents* web_contents);
100 106
101 // Called when a passwordform is autofilled, when a new passwordform is 107 // Called when a passwordform is autofilled, when a new passwordform is
102 // submitted, or when a navigation occurs to update the visibility of the 108 // submitted, or when a navigation occurs to update the visibility of the
103 // manage passwords icon and bubble. 109 // manage passwords icon and bubble.
104 void UpdateBubbleAndIconVisibility(); 110 void UpdateBubbleAndIconVisibility();
(...skipping 21 matching lines...) Expand all
126 bool password_submitted_; 132 bool password_submitted_;
127 133
128 // Stores whether autofill was blocked due to a user's decision to blacklist 134 // Stores whether autofill was blocked due to a user's decision to blacklist
129 // the current site ("Never save passwords for this site"). 135 // the current site ("Never save passwords for this site").
130 bool autofill_blocked_; 136 bool autofill_blocked_;
131 137
132 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsBubbleUIController); 138 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsBubbleUIController);
133 }; 139 };
134 140
135 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_UI_CONTROLLER_H_ 141 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_UI_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698