| 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..1087915fe95a22dbe51eddd6dc88cb68bba6cd91 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);
|
|
|
| @@ -123,6 +124,12 @@ void ManagePasswordsBubbleCocoa::Show(content::WebContents* webContents,
|
| }
|
| BrowserWindowController* bwc =
|
| [BrowserWindowController browserWindowControllerForWindow:window];
|
| + if (ui::MaterialDesignController::IsSecondaryUiMaterial()) {
|
| + NSPoint anchor_point = [bwc bookmarkBubblePoint];
|
| + ShowViewsManagePasswordsBubbleOnCocoaBrowser(anchor_point, webContents,
|
| + user_action);
|
| + return;
|
| + }
|
| bubble_ = new ManagePasswordsBubbleCocoa(
|
| webContents, user_action ? ManagePasswordsBubbleModel::USER_ACTION
|
| : ManagePasswordsBubbleModel::AUTOMATIC,
|
| @@ -130,3 +137,9 @@ void ManagePasswordsBubbleCocoa::Show(content::WebContents* webContents,
|
|
|
| bubble_->Show(user_action);
|
| }
|
| +
|
| +// static
|
| +void ManagePasswordsBubbleCocoa::CloseCurrentBubble() {
|
| + if (ui::MaterialDesignController::IsSecondaryUiMaterial())
|
| + CloseViewsManagePasswordsBubbleOnCocoaBrowser();
|
| +}
|
|
|