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

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

Issue 1280673003: [Mac] Enable MacViews site settings bubble behind --enable-mac-views-dialogs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@enabledialogs
Patch Set: Created 5 years, 4 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 00357d6175ce39282020a2bca4d0a262938cc25e..a5e51cd53b662a54fe79279fbc82b24b428b7a2d 100644
--- a/chrome/browser/ui/cocoa/browser_window_cocoa.mm
+++ b/chrome/browser/ui/cocoa/browser_window_cocoa.mm
@@ -24,6 +24,7 @@
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_command_controller.h"
#include "chrome/browser/ui/browser_commands_mac.h"
+#include "chrome/browser/ui/browser_dialogs.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/browser_window_state.h"
#import "chrome/browser/ui/cocoa/browser/edit_search_engine_cocoa_controller.h"
@@ -699,6 +700,19 @@ void BrowserWindowCocoa::ShowWebsiteSettings(
content::WebContents* web_contents,
const GURL& url,
const content::SSLStatus& ssl) {
+ if (chrome::ToolkitViewsDialogsEnabled()) {
+ LocationBarViewMac* location_bar = [controller_ locationBarBridge];
tapted 2015/08/10 05:44:23 I think this needs to move to website_settings_bub
jackhou1 2015/08/10 09:11:09 Done.
+ NSPoint bubble_point = location_bar->GetPageInfoBubblePoint();
+ NSPoint bubble_point_screen = [window() convertBaseToScreen:bubble_point];
+ gfx::Point bubble_point_views(
+ bubble_point_screen.x,
+ NSMaxY([[window() screen] frame]) - bubble_point_screen.y);
tapted 2015/08/10 05:44:24 I don't think this is right -- flipping always nee
jackhou1 2015/08/10 09:11:09 Done.
+
+ chrome::ShowWebsiteSettingsBubbleViewsAtPoint(
+ bubble_point_views, profile, web_contents, url, ssl, browser_);
tapted 2015/08/10 05:44:23 I think the browser_ argument can be refactored ou
jackhou1 2015/08/10 09:11:09 Done in https://codereview.chromium.org/1268243003
+ return;
+ }
+
WebsiteSettingsUIBridge::Show(window(), profile, web_contents, url, ssl);
}

Powered by Google App Engine
This is Rietveld 408576698