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

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

Issue 27317: Support DWM switching.... (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: '' Created 11 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
« no previous file with comments | « chrome/browser/views/toolbar_view.h ('k') | chrome/views/custom_frame_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/toolbar_view.cc
===================================================================
--- chrome/browser/views/toolbar_view.cc (revision 10688)
+++ chrome/browser/views/toolbar_view.cc (working copy)
@@ -46,7 +46,7 @@
#include "chrome/views/label.h"
#include "chrome/views/non_client_view.h"
#include "chrome/views/tooltip_manager.h"
-#include "chrome/views/widget.h"
+#include "chrome/views/window.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
@@ -353,7 +353,7 @@
// For glass, we need to draw a black line below the location bar to separate
// it from the content area. For non-glass, the NonClientView draws the
// toolbar background below the location bar for us.
- if (win_util::ShouldUseVistaFrame())
+ if (GetWidget()->AsWindow()->UseNativeFrame())
canvas->FillRectInt(SK_ColorBLACK, 0, height() - 1, width(), 1);
}
@@ -496,8 +496,9 @@
return gfx::Size(0, normal_background.height());
}
- int vertical_spacing = PopupTopSpacing() + (win_util::ShouldUseVistaFrame() ?
- kPopupBottomSpacingGlass : kPopupBottomSpacingNonGlass);
+ int vertical_spacing = PopupTopSpacing() +
+ (GetWidget()->AsWindow()->UseNativeFrame() ? kPopupBottomSpacingGlass
+ : kPopupBottomSpacingNonGlass);
return gfx::Size(0, location_bar_->GetPreferredSize().height() +
vertical_spacing);
}
@@ -805,7 +806,8 @@
// static
int BrowserToolbarView::PopupTopSpacing() {
- return win_util::ShouldUseVistaFrame() ? 0 : kPopupTopSpacingNonGlass;
+ return GetWidget()->AsWindow()->UseNativeFrame() ? 0
+ : kPopupTopSpacingNonGlass;
}
void BrowserToolbarView::Observe(NotificationType type,
« no previous file with comments | « chrome/browser/views/toolbar_view.h ('k') | chrome/views/custom_frame_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698