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

Unified Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 962453002: Update permission bubble anchor when omnibar is hidden (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update Fullscreen Parent Created 5 years, 9 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/frame/browser_view.cc
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index b86f3974716cc936f81e7583c84de815b331955c..1bbb5f49e4dc1acfac3036a3c548c26fb8a76467 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -540,10 +540,26 @@ void BrowserView::InitStatusBubble() {
}
void BrowserView::InitPermissionBubbleView() {
- std::string languages =
- browser_->profile()->GetPrefs()->GetString(prefs::kAcceptLanguages);
permission_bubble_view_.reset(new PermissionBubbleViewViews(
- GetLocationBarView()->location_icon_view(), languages));
+ browser_->profile()->GetPrefs()->GetString(prefs::kAcceptLanguages)));
+ UpdatePermissionBubbleViewAnchor();
+}
+
+void BrowserView::UpdatePermissionBubbleViewAnchor() {
msw 2015/03/11 22:25:30 Other bubbles (bookmark, global error, avatar/prof
groby-ooo-7-16 2015/03/12 00:44:49 Hector: The OSX version manages without modificati
hcarmona 2015/03/12 18:43:33 Is there a specific person I should ping, or shoul
groby-ooo-7-16 2015/03/12 19:27:46 ainslie@ is looking at all things bubble. felt@ ca
+ if (browser_->SupportsWindowFeature(Browser::FEATURE_LOCATIONBAR)) {
+ permission_bubble_view_->SetAnchor(
+ GetLocationBarView()->location_icon_view(),
+ views::BubbleBorder::TOP_LEFT);
+ } else {
+ views::View* view = NULL;
msw 2015/03/11 22:25:30 nit: init |view| to |top_container_| to avoid the
hcarmona 2015/03/12 18:43:33 Done.
+
+ if (IsFullscreenBubbleVisible())
+ view = exclusive_access_bubble_->GetView();
+ else
+ view = top_container_;
+
+ permission_bubble_view_->SetAnchor(view, views::BubbleBorder::NONE);
+ }
}
gfx::Rect BrowserView::GetToolbarBounds() const {
@@ -2291,6 +2307,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen,
// order to let the layout occur.
in_process_fullscreen_ = false;
ToolbarSizeChanged(false);
+
+ UpdatePermissionBubbleViewAnchor();
}
bool BrowserView::ShouldUseImmersiveFullscreenForUrl(const GURL& url) const {

Powered by Google App Engine
This is Rietveld 408576698