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

Side by Side Diff: chrome/browser/views/frame/browser_view_layout.cc

Issue 3137019: Fix numerous alignment problems, both horizontal and vertical, in drawing the... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/views/frame/browser_view_layout.h" 5 #include "chrome/browser/views/frame/browser_view_layout.h"
6 6
7 #include "chrome/browser/find_bar.h" 7 #include "chrome/browser/find_bar.h"
8 #include "chrome/browser/find_bar_controller.h" 8 #include "chrome/browser/find_bar_controller.h"
9 #include "chrome/browser/view_ids.h" 9 #include "chrome/browser/view_ids.h"
10 #include "chrome/browser/views/bookmark_bar_view.h" 10 #include "chrome/browser/views/bookmark_bar_view.h"
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 active_bookmark_bar_ = NULL; 232 active_bookmark_bar_ = NULL;
233 break; 233 break;
234 } 234 }
235 } 235 }
236 236
237 void BrowserViewLayout::Layout(views::View* host) { 237 void BrowserViewLayout::Layout(views::View* host) {
238 vertical_layout_rect_ = browser_view_->GetLocalBounds(true); 238 vertical_layout_rect_ = browser_view_->GetLocalBounds(true);
239 int top = LayoutTabStrip(); 239 int top = LayoutTabStrip();
240 if (browser_view_->IsTabStripVisible() && !browser_view_->UseVerticalTabs()) { 240 if (browser_view_->IsTabStripVisible() && !browser_view_->UseVerticalTabs()) {
241 tabstrip_->SetBackgroundOffset(gfx::Point( 241 tabstrip_->SetBackgroundOffset(gfx::Point(
242 tabstrip_->x() - browser_view_->GetToolbarBounds().x(), 242 tabstrip_->MirroredX() + browser_view_->MirroredX(),
243 tabstrip_->y())); 243 browser_view_->frame()->GetHorizontalTabStripVerticalOffset(false)));
244 } 244 }
245 top = LayoutToolbar(top); 245 top = LayoutToolbar(top);
246 top = LayoutBookmarkAndInfoBars(top); 246 top = LayoutBookmarkAndInfoBars(top);
247 int bottom = LayoutDownloadShelf(browser_view_->height()); 247 int bottom = LayoutDownloadShelf(browser_view_->height());
248 LayoutTabContents(top, bottom); 248 LayoutTabContents(top, bottom);
249 // This must be done _after_ we lay out the TabContents since this 249 // This must be done _after_ we lay out the TabContents since this
250 // code calls back into us to find the bounding box the find bar 250 // code calls back into us to find the bounding box the find bar
251 // must be laid out within, and that code depends on the 251 // must be laid out within, and that code depends on the
252 // TabContentsContainer's bounds being up to date. 252 // TabContentsContainer's bounds being up to date.
253 if (browser()->HasFindBarController()) { 253 if (browser()->HasFindBarController()) {
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 bottom -= height; 373 bottom -= height;
374 } 374 }
375 return bottom; 375 return bottom;
376 } 376 }
377 377
378 bool BrowserViewLayout::InfobarVisible() const { 378 bool BrowserViewLayout::InfobarVisible() const {
379 // NOTE: Can't check if the size IsEmpty() since it's always 0-width. 379 // NOTE: Can't check if the size IsEmpty() since it's always 0-width.
380 return browser()->SupportsWindowFeature(Browser::FEATURE_INFOBAR) && 380 return browser()->SupportsWindowFeature(Browser::FEATURE_INFOBAR) &&
381 (infobar_container_->GetPreferredSize().height() != 0); 381 (infobar_container_->GetPreferredSize().height() != 0);
382 } 382 }
OLDNEW
« no previous file with comments | « chrome/browser/views/frame/browser_view.cc ('k') | chrome/browser/views/frame/glass_browser_frame_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698