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

Unified Diff: chrome/browser/ui/views/browser_dialogs_views_mac.cc

Issue 2882533003: [Mac] Hover/Active Omnibox Icon States for Secondary UI MD (Closed)
Patch Set: Added comments Created 3 years, 7 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/browser_dialogs_views_mac.cc
diff --git a/chrome/browser/ui/views/browser_dialogs_views_mac.cc b/chrome/browser/ui/views/browser_dialogs_views_mac.cc
index 71d024f29eda106b73282e804e822817d7eec44d..e0817563944a45ee5948606cf0959034acd0dcf9 100644
--- a/chrome/browser/ui/views/browser_dialogs_views_mac.cc
+++ b/chrome/browser/ui/views/browser_dialogs_views_mac.cc
@@ -8,6 +8,7 @@
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_dialogs.h"
#include "chrome/browser/ui/cocoa/bubble_anchor_helper_views.h"
+#include "chrome/browser/ui/content_settings/content_setting_bubble_model.h"
#include "chrome/browser/ui/views/bookmarks/bookmark_bubble_view.h"
#include "chrome/browser/ui/views/content_setting_bubble_contents.h"
#include "chrome/browser/ui/views/location_bar/zoom_bubble_view.h"
@@ -41,9 +42,10 @@ void ShowPageInfoBubbleViewsAtPoint(
return;
}
- PageInfoBubbleView::ShowBubble(nullptr, gfx::Rect(anchor_point, gfx::Size()),
- profile, web_contents, virtual_url,
- security_info);
+ views::BubbleDialogDelegateView* bubble = PageInfoBubbleView::ShowBubble(
+ nullptr, gfx::Rect(anchor_point, gfx::Size()), profile, web_contents,
+ virtual_url, security_info);
+ KeepBubbleAnchored(bubble, GetPageInfoDecoration(bubble));
}
void ShowBookmarkBubbleViewsAtPoint(const gfx::Point& anchor_point,
@@ -59,6 +61,11 @@ void ShowBookmarkBubbleViewsAtPoint(const gfx::Point& anchor_point,
BookmarkBubbleView::ShowBubble(
nullptr, gfx::Rect(anchor_point, gfx::Size()), parent, observer,
std::move(delegate), browser->profile(), virtual_url, already_bookmarked);
+
+ views::BubbleDialogDelegateView* bubble =
+ BookmarkBubbleView::bookmark_bubble();
+ if (bubble)
tapted 2017/05/16 07:39:37 is there a known case where this is null? (comment
spqchan 2017/05/17 01:39:40 Whoops, no. I removed it
+ KeepBubbleAnchored(bubble, GetStarDecoration(bubble));
}
void ShowZoomBubbleViewsAtPoint(content::WebContents* web_contents,
@@ -103,6 +110,7 @@ void ContentSettingBubbleViewsBridge::Show(gfx::NativeView parent_view,
contents->set_parent_window(parent_view);
contents->SetAnchorRect(gfx::Rect(anchor, gfx::Size()));
views::BubbleDialogDelegateView::CreateBubble(contents)->Show();
+ KeepBubbleAnchored(contents, model->decoration());
}
void ShowUpdateChromeDialogViews(gfx::NativeWindow parent) {

Powered by Google App Engine
This is Rietveld 408576698