Index: chrome/browser/ui/views/toolbar/toolbar_view.cc |
diff --git a/chrome/browser/ui/views/toolbar/toolbar_view.cc b/chrome/browser/ui/views/toolbar/toolbar_view.cc |
index 576cf1cf75b1de4cd3403d2600ba740fb12b9132..a4ec47edafc57c575284e2c89fe88bcf3392221d 100644 |
--- a/chrome/browser/ui/views/toolbar/toolbar_view.cc |
+++ b/chrome/browser/ui/views/toolbar/toolbar_view.cc |
@@ -514,10 +514,10 @@ gfx::Size ToolbarView::GetPreferredSize() { |
} else { |
const int kPopupBottomSpacingGlass = 1; |
const int kPopupBottomSpacingNonGlass = 2; |
- size.Enlarge( |
- 0, |
- PopupTopSpacing() + (GetWidget()->ShouldUseNativeFrame() ? |
- kPopupBottomSpacingGlass : kPopupBottomSpacingNonGlass)); |
+ size.Enlarge(0, |
+ PopupTopSpacing() + (UsingWindowsGlass() |
+ ? kPopupBottomSpacingGlass |
+ : kPopupBottomSpacingNonGlass)); |
} |
return size; |
} |
@@ -656,7 +656,7 @@ void ToolbarView::OnPaint(gfx::Canvas* canvas) { |
// it from the content area. For non-glass, the NonClientView draws the |
// toolbar background below the location bar for us. |
// NOTE: Keep this in sync with BrowserView::GetInfoBarSeparatorColor()! |
- if (GetWidget()->ShouldUseNativeFrame()) |
+ if (UsingWindowsGlass()) |
canvas->FillRect(gfx::Rect(0, height() - 1, width(), 1), SK_ColorBLACK); |
} |
@@ -732,7 +732,14 @@ bool ToolbarView::ShouldShowIncompatibilityWarning() { |
int ToolbarView::PopupTopSpacing() const { |
const int kPopupTopSpacingNonGlass = 3; |
- return GetWidget()->ShouldUseNativeFrame() ? 0 : kPopupTopSpacingNonGlass; |
+ return UsingWindowsGlass() ? 0 : kPopupTopSpacingNonGlass; |
+} |
+ |
+bool ToolbarView::UsingWindowsGlass() const { |
+#if defined(OS_WIN) |
+ return GetWidget()->ShouldUseNativeFrame(); |
+#endif |
+return false; |
} |
void ToolbarView::LoadImages() { |