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

Unified Diff: chrome/browser/ui/views/website_settings/website_settings_popup_view.cc

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: Address comments. 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/views/website_settings/website_settings_popup_view.cc
diff --git a/chrome/browser/ui/views/website_settings/website_settings_popup_view.cc b/chrome/browser/ui/views/website_settings/website_settings_popup_view.cc
index 70c5a52fee1247ecaf37fe9ebbda8243396e057b..ce2835290c5b8bfd5cffda0669e68823393b63e2 100644
--- a/chrome/browser/ui/views/website_settings/website_settings_popup_view.cc
+++ b/chrome/browser/ui/views/website_settings/website_settings_popup_view.cc
@@ -84,10 +84,6 @@ const int kHeaderPaddingTop = 12;
// the popup header.
const int kHeaderRowSpacing = 4;
-// To make the bubble's arrow point directly at the location icon rather than at
-// the Omnibox's edge, inset the bubble's anchor rect by this amount of pixels.
-const int kLocationIconVerticalMargin = 5;
-
// The max possible width of the popup.
const int kMaxPopupWidth = 500;
@@ -236,8 +232,9 @@ void PopupHeaderView::SetIdentityStatus(const base::string16& status,
InternalPageInfoPopupView::InternalPageInfoPopupView(views::View* anchor_view)
: BubbleDelegateView(anchor_view, views::BubbleBorder::TOP_LEFT) {
// Compensate for built-in vertical padding in the anchor view's image.
- set_anchor_view_insets(gfx::Insets(kLocationIconVerticalMargin, 0,
- kLocationIconVerticalMargin, 0));
+ set_anchor_view_insets(
+ gfx::Insets(WebsiteSettingsPopupView::kLocationIconVerticalMargin, 0,
+ WebsiteSettingsPopupView::kLocationIconVerticalMargin, 0));
const int kSpacing = 4;
SetLayoutManager(new views::BoxLayout(views::BoxLayout::kHorizontal, kSpacing,
@@ -269,20 +266,24 @@ void InternalPageInfoPopupView::OnWidgetDestroying(views::Widget* widget) {
// WebsiteSettingsPopupView
////////////////////////////////////////////////////////////////////////////////
+const int WebsiteSettingsPopupView::kLocationIconVerticalMargin = 5;
+
WebsiteSettingsPopupView::~WebsiteSettingsPopupView() {
}
// static
-void WebsiteSettingsPopupView::ShowPopup(views::View* anchor_view,
- Profile* profile,
- content::WebContents* web_contents,
- const GURL& url,
- const content::SSLStatus& ssl) {
+views::BubbleDelegateView* WebsiteSettingsPopupView::ShowPopup(
+ views::View* anchor_view,
+ Profile* profile,
+ content::WebContents* web_contents,
+ const GURL& url,
+ const content::SSLStatus& ssl) {
is_popup_showing = true;
if (InternalChromePage(url)) {
- new InternalPageInfoPopupView(anchor_view);
+ return new InternalPageInfoPopupView(anchor_view);
} else {
- new WebsiteSettingsPopupView(anchor_view, profile, web_contents, url, ssl);
+ return new WebsiteSettingsPopupView(anchor_view, profile, web_contents, url,
+ ssl);
}
}

Powered by Google App Engine
This is Rietveld 408576698