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

Unified Diff: chrome/browser/ui/cocoa/browser_window_cocoa.mm

Issue 151413008: Move ownership of Password(Generation)Manager to ContentPasswordDriver. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Handle WebContents having no PasswordManagerDelegateImpl attached Created 6 years, 10 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/cocoa/browser_window_cocoa.mm
diff --git a/chrome/browser/ui/cocoa/browser_window_cocoa.mm b/chrome/browser/ui/cocoa/browser_window_cocoa.mm
index 4287c001157e61e8229bba4a18a6b49dcd4a8b16..13627eb01b54d6f80b141b19deef1d84142538d7 100644
--- a/chrome/browser/ui/cocoa/browser_window_cocoa.mm
+++ b/chrome/browser/ui/cocoa/browser_window_cocoa.mm
@@ -17,7 +17,7 @@
#include "chrome/browser/download/download_shelf.h"
#include "chrome/browser/extensions/tab_helper.h"
#include "chrome/browser/fullscreen.h"
-#include "chrome/browser/password_manager/password_manager.h"
+#include "chrome/browser/password_manager/password_manager_delegate_impl.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/shell_integration.h"
#include "chrome/browser/ui/browser.h"
@@ -705,14 +705,15 @@ void BrowserWindowCocoa::ShowPasswordGenerationBubble(
rect.x() + rect.width()/2,
rect.bottom());
- PasswordGenerationBubbleController* controller =
- [[PasswordGenerationBubbleController alloc]
- initWithWindow:browser_->window()->GetNativeWindow()
- anchoredAt:point
- renderViewHost:web_contents->GetRenderViewHost()
- passwordManager:PasswordManager::FromWebContents(web_contents)
- usingGenerator:password_generator
- forForm:form];
+ PasswordGenerationBubbleController* controller = [
+ [PasswordGenerationBubbleController alloc]
+ initWithWindow:browser_->window()->GetNativeWindow()
+ anchoredAt:point
+ renderViewHost:web_contents->GetRenderViewHost()
+ passwordManager:PasswordManagerDelegateImpl::GetManagerFromWebContents(
+ web_contents)
+ usingGenerator:password_generator
+ forForm:form];
[controller showWindow:nil];
}
« no previous file with comments | « chrome/browser/ui/autofill/tab_autofill_manager_delegate.cc ('k') | chrome/browser/ui/gtk/password_generation_bubble_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698