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

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: Fix issue Created 5 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
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 33ee5a13f0b62b91d5e3536a09e95e27b1a61112..6bec0f1b2d4bb4bbc32b40a06528ab8b59420258 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -540,10 +540,21 @@ void BrowserView::InitStatusBubble() {
}
void BrowserView::InitPermissionBubbleView() {
- std::string languages =
- browser_->profile()->GetPrefs()->GetString(prefs::kAcceptLanguages);
permission_bubble_view_.reset(new PermissionBubbleViewViews(
groby-ooo-7-16 2015/02/28 00:25:12 I'm still not sure why we need to pre-create |perm
hcarmona 2015/02/28 01:14:16 We can probably update the code to create it only
- GetLocationBarView()->location_icon_view(), languages));
+ browser_->profile()->GetPrefs()->GetString(prefs::kAcceptLanguages)));
+ UpdatePermissionBubbleView();
+}
+
+void BrowserView::UpdatePermissionBubbleView() {
+ if (browser_->SupportsWindowFeature(Browser::FEATURE_LOCATIONBAR)) {
+ permission_bubble_view_->SetAnchor(
+ GetLocationBarView()->location_icon_view(),
+ views::BubbleBorder::TOP_LEFT);
+ } else {
+ permission_bubble_view_->SetAnchor(
+ top_container_,
+ views::BubbleBorder::NONE);
+ }
}
gfx::Rect BrowserView::GetToolbarBounds() const {
@@ -2291,6 +2302,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen,
// order to let the layout occur.
in_process_fullscreen_ = false;
ToolbarSizeChanged(false);
+
+ UpdatePermissionBubbleView();
groby-ooo-7-16 2015/02/28 00:25:12 Doesn't fullscreen mode imply a focus change, and
hcarmona 2015/02/28 01:14:16 The permission bubbles remain visible even when fo
felt 2015/03/03 01:04:35 No, we should not hide or move the permission bubb
}
bool BrowserView::ShouldUseImmersiveFullscreenForUrl(const GURL& url) const {

Powered by Google App Engine
This is Rietveld 408576698