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

Unified Diff: chrome/browser/ui/views/toolbar/toolbar_view.cc

Issue 136093007: Widget::ShouldUseNativeFrame is now meaningful on Linux. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Big refactor; fix Windows opaque windows when Glass is enabled. Created 6 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/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..c99adac036f32ac27c643fd16f54025e4e07fb58 100644
--- a/chrome/browser/ui/views/toolbar/toolbar_view.cc
+++ b/chrome/browser/ui/views/toolbar/toolbar_view.cc
@@ -516,7 +516,7 @@ gfx::Size ToolbarView::GetPreferredSize() {
const int kPopupBottomSpacingNonGlass = 2;
size.Enlarge(
0,
- PopupTopSpacing() + (GetWidget()->ShouldUseNativeFrame() ?
+ PopupTopSpacing() + (GetWidget()->ShouldWindowContentsBeTransparent() ?
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 (GetWidget()->ShouldWindowContentsBeTransparent())
canvas->FillRect(gfx::Rect(0, height() - 1, width(), 1), SK_ColorBLACK);
}
@@ -732,7 +732,9 @@ bool ToolbarView::ShouldShowIncompatibilityWarning() {
int ToolbarView::PopupTopSpacing() const {
const int kPopupTopSpacingNonGlass = 3;
- return GetWidget()->ShouldUseNativeFrame() ? 0 : kPopupTopSpacingNonGlass;
+ return GetWidget()->ShouldWindowContentsBeTransparent()
+ ? 0
+ : kPopupTopSpacingNonGlass;
}
void ToolbarView::LoadImages() {

Powered by Google App Engine
This is Rietveld 408576698