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

Side by Side Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 801753002: infobars: Fix static initializer created in r308046. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: self review Created 6 years 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/infobar_container_delegate.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/frame/browser_view.h" 5 #include "chrome/browser/ui/views/frame/browser_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 1887 matching lines...) Expand 10 before | Expand all | Expand 10 after
1898 1898
1899 /////////////////////////////////////////////////////////////////////////////// 1899 ///////////////////////////////////////////////////////////////////////////////
1900 // BrowserView, OmniboxPopupModelObserver overrides: 1900 // BrowserView, OmniboxPopupModelObserver overrides:
1901 void BrowserView::OnOmniboxPopupShownOrHidden() { 1901 void BrowserView::OnOmniboxPopupShownOrHidden() {
1902 SetMaxTopArrowHeight(GetMaxTopInfoBarArrowHeight(), infobar_container_); 1902 SetMaxTopArrowHeight(GetMaxTopInfoBarArrowHeight(), infobar_container_);
1903 } 1903 }
1904 1904
1905 /////////////////////////////////////////////////////////////////////////////// 1905 ///////////////////////////////////////////////////////////////////////////////
1906 // BrowserView, InfoBarContainerDelegate overrides: 1906 // BrowserView, InfoBarContainerDelegate overrides:
1907 1907
1908 const int InfoBarContainerDelegate::kSeparatorLineHeight =
1909 views::NonClientFrameView::kClientEdgeThickness;
1910 const int InfoBarContainerDelegate::kDefaultArrowTargetHeight = 9;
1911
1912 SkColor BrowserView::GetInfoBarSeparatorColor() const { 1908 SkColor BrowserView::GetInfoBarSeparatorColor() const {
1913 // NOTE: Keep this in sync with ToolbarView::OnPaint()! 1909 // NOTE: Keep this in sync with ToolbarView::OnPaint()!
1914 return (IsTabStripVisible() || !frame_->ShouldUseNativeFrame()) ? 1910 return (IsTabStripVisible() || !frame_->ShouldUseNativeFrame()) ?
1915 ThemeProperties::GetDefaultColor( 1911 ThemeProperties::GetDefaultColor(
1916 ThemeProperties::COLOR_TOOLBAR_SEPARATOR) : 1912 ThemeProperties::COLOR_TOOLBAR_SEPARATOR) :
1917 SK_ColorBLACK; 1913 SK_ColorBLACK;
1918 } 1914 }
1919 1915
1920 void BrowserView::InfoBarContainerStateChanged(bool is_animating) { 1916 void BrowserView::InfoBarContainerStateChanged(bool is_animating) {
1921 ToolbarSizeChanged(is_animating); 1917 ToolbarSizeChanged(is_animating);
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after
2528 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) { 2524 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) {
2529 gfx::Point icon_bottom( 2525 gfx::Point icon_bottom(
2530 toolbar_->location_bar()->GetLocationBarAnchorPoint()); 2526 toolbar_->location_bar()->GetLocationBarAnchorPoint());
2531 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom); 2527 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom);
2532 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(nullptr)); 2528 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(nullptr));
2533 ConvertPointToTarget(infobar_container_, this, &infobar_top); 2529 ConvertPointToTarget(infobar_container_, this, &infobar_top);
2534 top_arrow_height = infobar_top.y() - icon_bottom.y(); 2530 top_arrow_height = infobar_top.y() - icon_bottom.y();
2535 } 2531 }
2536 return top_arrow_height; 2532 return top_arrow_height;
2537 } 2533 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/infobar_container_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698