Index: chrome/browser/ui/cocoa/passwords/passwords_bubble_cocoa.mm |
diff --git a/chrome/browser/ui/cocoa/passwords/passwords_bubble_cocoa.mm b/chrome/browser/ui/cocoa/passwords/passwords_bubble_cocoa.mm |
index d5e520aa1f95ff367d1f59e4ec006f0767bb715e..9fe797cbcc88a1752403f3dce4434bb112a11ac2 100644 |
--- a/chrome/browser/ui/cocoa/passwords/passwords_bubble_cocoa.mm |
+++ b/chrome/browser/ui/cocoa/passwords/passwords_bubble_cocoa.mm |
@@ -15,6 +15,7 @@ |
#include "chrome/browser/ui/passwords/manage_passwords_icon.h" |
#include "chrome/browser/ui/passwords/passwords_model_delegate.h" |
#include "content/public/browser/web_contents.h" |
+#include "ui/base/material_design/material_design_controller.h" |
typedef void (^Callback)(void); |
@@ -109,6 +110,19 @@ void ManagePasswordsBubbleCocoa::OnClose() { |
// static |
void ManagePasswordsBubbleCocoa::Show(content::WebContents* webContents, |
bool user_action) { |
+ if (ui::MaterialDesignController::IsSecondaryUiMaterial()) { |
tapted
2017/04/11 07:48:58
I think it's fine to move this down to line 140 so
varkha
2017/04/12 01:57:28
Done.
|
+ NSWindow* window = [webContents->GetNativeView() window]; |
+ if (!window) { |
+ // The tab isn't active right now. |
+ return; |
+ } |
+ BrowserWindowController* bwc = |
+ [BrowserWindowController browserWindowControllerForWindow:window]; |
+ NSPoint ns_point = [bwc bookmarkBubblePoint]; |
tapted
2017/04/11 07:48:58
nit: ns_point -> anchor?
varkha
2017/04/12 01:57:28
Done.
|
+ ShowManagePasswordsBubbleOnCocoaBrowser(ns_point, webContents, user_action); |
+ return; |
+ } |
+ |
if (bubble_) { |
// The bubble is currently shown. It's to be reopened with the new content. |
// Disable closing animation so that it's destroyed immediately. |