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

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

Issue 18859004: views impl: hide top infobar arrow when omnibox popup shows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: correct previous comment Created 7 years, 5 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/frame/browser_view.h ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c6b68fe888393d161e63ab9b6b42f2b111f377b1..1746215b0601afa48ab3d0355c1465a3094ccbe7 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -1093,6 +1093,8 @@ void BrowserView::DestroyBrowser() {
// the window now so that we are deleted immediately and aren't left holding
// references to deleted objects.
GetWidget()->RemoveObserver(this);
+ GetLocationBar()->GetLocationEntry()->model()->popup_model()->RemoveObserver(
+ this);
frame_->CloseNow();
}
@@ -1916,6 +1918,12 @@ bool BrowserView::AcceleratorPressed(const ui::Accelerator& accelerator) {
}
///////////////////////////////////////////////////////////////////////////////
+// BrowserView, OmniboxPopupModelObserver overrides:
+void BrowserView::OnOmniboxPopupShownOrHidden() {
+ infobar_container_->SetMaxTopArrowHeight(GetMaxTopInfoBarArrowHeight());
+}
+
+///////////////////////////////////////////////////////////////////////////////
// BrowserView, ImmersiveModeController::Delegate overrides:
BookmarkBarView* BrowserView::GetBookmarkBar() {
@@ -2091,6 +2099,9 @@ void BrowserView::InitViews() {
}
#endif
+ GetLocationBar()->GetLocationEntry()->model()->popup_model()->AddObserver(
+ this);
+
// We're now initialized and ready to process Layout requests.
ignore_layout_ = false;
}
@@ -2759,8 +2770,10 @@ void BrowserView::MakeOverlayContentsActiveContents() {
int BrowserView::GetMaxTopInfoBarArrowHeight() {
int top_arrow_height = 0;
- // Only show the arrows when not in fullscreen and when there's no overlay.
- if (!IsFullscreen() && !overlay_container_->visible()) {
+ // Only show the arrows when not in fullscreen and when there's no overlay
+ // and no omnibox popup.
+ if (!IsFullscreen() && !overlay_container_->visible() &&
+ !GetLocationBar()->GetLocationEntry()->model()->popup_model()->IsOpen()) {
const LocationIconView* location_icon_view =
toolbar_->location_bar()->location_icon_view();
// The +1 in the next line creates a 1-px gap between icon and arrow tip.
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.h ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698