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

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

Issue 10821002: Makes the min window size include the OTR image and caption buttons on (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup Created 8 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
Index: chrome/browser/ui/views/frame/glass_browser_frame_view.cc
diff --git a/chrome/browser/ui/views/frame/glass_browser_frame_view.cc b/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
index de5f7c4cc70e986d06d862fbc0947bf40a6104e7..ae6197a689832e683be342f6b09a2ee897d2a8df 100644
--- a/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
+++ b/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
@@ -113,14 +113,15 @@ gfx::Rect GlassBrowserFrameView::GetBoundsForTabStrip(
int tabstrip_width = minimize_button_offset - tabstrip_x -
(frame()->IsMaximized() ?
kNewTabCaptionMaximizedSpacing : kNewTabCaptionRestoredSpacing);
- return gfx::Rect(tabstrip_x, GetHorizontalTabStripVerticalOffset(false),
+ return gfx::Rect(tabstrip_x, GetTabStripInsets(false).top,
std::max(0, tabstrip_width),
tabstrip->GetPreferredSize().height());
}
-int GlassBrowserFrameView::GetHorizontalTabStripVerticalOffset(
- bool restored) const {
- return NonClientTopBorderHeight(restored);
+BrowserNonClientFrameView::TabStripInsets
+GlassBrowserFrameView::GetTabStripInsets(bool restored) const {
+ // TODO: include OTR and caption.
+ return TabStripInsets(NonClientTopBorderHeight(restored), 0, 0);
}
void GlassBrowserFrameView::UpdateThrobber(bool running) {
@@ -296,7 +297,7 @@ void GlassBrowserFrameView::PaintToolbarBackground(gfx::Canvas* canvas) {
int y = toolbar_bounds.y();
int dest_y = y + (kFrameShadowThickness * 2);
canvas->TileImageInt(*theme_toolbar, x,
- dest_y - GetHorizontalTabStripVerticalOffset(false), x,
+ dest_y - GetTabStripInsets(false).top, x,
dest_y, w, theme_toolbar->height());
// Draw rounded corners for the tab.
@@ -413,7 +414,7 @@ void GlassBrowserFrameView::LayoutAvatar() {
if (base::i18n::IsRTL())
avatar_x += width() - frame()->GetMinimizeButtonOffset();
- int avatar_bottom = GetHorizontalTabStripVerticalOffset(false) +
+ int avatar_bottom = GetTabStripInsets(false).top +
browser_view()->GetTabStripHeight() - kAvatarBottomSpacing;
int avatar_restored_y = avatar_bottom - incognito_icon.height();
int avatar_y = frame()->IsMaximized() ?
« no previous file with comments | « chrome/browser/ui/views/frame/glass_browser_frame_view.h ('k') | chrome/browser/ui/views/frame/opaque_browser_frame_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698