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

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

Issue 2693803002: Fix position of permission bubbles anchored off the padlock. (Closed)
Patch Set: fix ternary if-else (+respond to comments) Created 3 years, 10 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
« no previous file with comments | « chrome/browser/ui/views/website_settings/permission_prompt_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/website_settings/permission_prompt_impl_views.cc
diff --git a/chrome/browser/ui/views/website_settings/permission_prompt_impl_views.cc b/chrome/browser/ui/views/website_settings/permission_prompt_impl_views.cc
index d231511be4b641664816f8d2312fde9ce9b86f09..cf1117e5a9f99f70c81625dc6db92d1f93fbeb2a 100644
--- a/chrome/browser/ui/views/website_settings/permission_prompt_impl_views.cc
+++ b/chrome/browser/ui/views/website_settings/permission_prompt_impl_views.cc
@@ -26,15 +26,11 @@
const int kFullscreenLeftMargin = 40;
views::View* PermissionPromptImpl::GetAnchorView() {
- BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser_);
-
- if (browser_->SupportsWindowFeature(Browser::FEATURE_LOCATIONBAR))
- return browser_view->GetLocationBarView()
- ->location_icon_view()
- ->GetImageView();
+ if (!browser_->SupportsWindowFeature(Browser::FEATURE_LOCATIONBAR))
+ return nullptr; // Fall back to GetAnchorPoint().
- // Fall back to GetAnchorPoint().
- return nullptr;
+ BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser_);
+ return browser_view->GetLocationBarView()->GetSecurityBubbleAnchorView();
}
gfx::Point PermissionPromptImpl::GetAnchorPoint() {
« no previous file with comments | « chrome/browser/ui/views/website_settings/permission_prompt_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698