| Index: chrome/browser/ui/cocoa/location_bar/content_setting_decoration.mm
|
| diff --git a/chrome/browser/ui/cocoa/location_bar/content_setting_decoration.mm b/chrome/browser/ui/cocoa/location_bar/content_setting_decoration.mm
|
| index 194bed68d3b4d1bac49b43708b19a2d7da7002a7..159d07df0ec15b72dda0a653e0188b5b2aa8c491 100644
|
| --- a/chrome/browser/ui/cocoa/location_bar/content_setting_decoration.mm
|
| +++ b/chrome/browser/ui/cocoa/location_bar/content_setting_decoration.mm
|
| @@ -12,6 +12,7 @@
|
| #include "chrome/browser/content_settings/tab_specific_content_settings.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| #include "chrome/browser/ui/browser_content_setting_bubble_model_delegate.h"
|
| +#include "chrome/browser/ui/browser_dialogs.h"
|
| #include "chrome/browser/ui/browser_list.h"
|
| #import "chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.h"
|
| #include "chrome/browser/ui/cocoa/last_active_browser_cocoa.h"
|
| @@ -24,6 +25,7 @@
|
| #include "ui/base/cocoa/appkit_utils.h"
|
| #include "ui/base/l10n/l10n_util.h"
|
| #include "ui/gfx/image/image.h"
|
| +#include "ui/gfx/mac/coordinate_conversion.h"
|
| #include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h"
|
|
|
| using content::WebContents;
|
| @@ -275,10 +277,19 @@ bool ContentSettingDecoration::OnMousePressed(NSRect frame, NSPoint location) {
|
| browser->content_setting_bubble_model_delegate(),
|
| web_contents,
|
| profile_);
|
| - [ContentSettingBubbleController showForModel:model
|
| - webContents:web_contents
|
| - parentWindow:[field window]
|
| - anchoredAt:anchor];
|
| +
|
| + if (chrome::ToolkitViewsDialogsEnabled()) {
|
| + gfx::Point origin = gfx::ScreenPointFromNSPoint(anchor);
|
| + chrome::ContentSettingBubbleViewsBridge::Show(
|
| + [web_contents->GetTopLevelNativeWindow() contentView],
|
| + model, web_contents, origin);
|
| + } else {
|
| + [ContentSettingBubbleController showForModel:model
|
| + webContents:web_contents
|
| + parentWindow:[field window]
|
| + anchoredAt:anchor];
|
| + }
|
| +
|
| return true;
|
| }
|
|
|
|
|