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

Unified Diff: chrome/browser/ui/passwords/manage_passwords_bubble_ui_controller.cc

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
Index: chrome/browser/ui/passwords/manage_passwords_bubble_ui_controller.cc
diff --git a/chrome/browser/ui/passwords/manage_passwords_bubble_ui_controller.cc b/chrome/browser/ui/passwords/manage_passwords_bubble_ui_controller.cc
index bf79ffd7c1870e75c319d73a53d4297a233e7cd2..9bfcc33358e2301024fbe089e0994cefb3602d17 100644
--- a/chrome/browser/ui/passwords/manage_passwords_bubble_ui_controller.cc
+++ b/chrome/browser/ui/passwords/manage_passwords_bubble_ui_controller.cc
@@ -5,9 +5,13 @@
#include "chrome/browser/ui/passwords/manage_passwords_bubble_ui_controller.h"
#include "chrome/browser/chrome_notification_types.h"
+#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/browser_window.h"
+#include "chrome/browser/ui/chrome_pages.h"
#include "chrome/browser/ui/omnibox/location_bar.h"
+#include "chrome/common/url_constants.h"
#include "content/public/browser/notification_service.h"
using autofill::PasswordFormMap;
@@ -77,6 +81,10 @@ void ManagePasswordsBubbleUIController::OnBubbleShown() {
unset_manage_passwords_bubble_needs_showing();
}
+Profile* ManagePasswordsBubbleUIController::profile() const {
+ return Profile::FromBrowserContext(web_contents()->GetBrowserContext());
+}
+
void ManagePasswordsBubbleUIController::SavePassword() {
DCHECK(form_manager_.get());
form_manager_->Save();
@@ -99,3 +107,10 @@ void ManagePasswordsBubbleUIController::DidNavigateMainFrame(
password_submitted_ = false;
UpdateBubbleAndIconVisibility();
}
+
+void ManagePasswordsBubbleUIController::NavigateToPasswordManagerSettingsPage()
+ const {
+ chrome::ShowSettingsSubPage(
+ chrome::FindBrowserWithWebContents(web_contents()),
+ chrome::kPasswordManagerSubPage);
+}

Powered by Google App Engine
This is Rietveld 408576698