Chromium Code Reviews| 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 { |
|
msw
2015/08/11 22:09:11
nit: no else after return
jackhou1
2015/08/17 04:54:19
Done.
|
| - new WebsiteSettingsPopupView(anchor_view, profile, web_contents, url, ssl); |
| + return new WebsiteSettingsPopupView(anchor_view, profile, web_contents, url, |
| + ssl); |
| } |
| } |