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

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

Issue 6334152: Clean up RTL methods.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/ui/views/frame/browser_view_layout.h" 5 #include "chrome/browser/ui/views/frame/browser_view_layout.h"
6 6
7 #include "chrome/browser/sidebar/sidebar_manager.h" 7 #include "chrome/browser/sidebar/sidebar_manager.h"
8 #include "chrome/browser/ui/find_bar/find_bar.h" 8 #include "chrome/browser/ui/find_bar/find_bar.h"
9 #include "chrome/browser/ui/find_bar/find_bar_controller.h" 9 #include "chrome/browser/ui/find_bar/find_bar_controller.h"
10 #include "chrome/browser/ui/view_ids.h" 10 #include "chrome/browser/ui/view_ids.h"
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 active_bookmark_bar_ = NULL; 245 active_bookmark_bar_ = NULL;
246 break; 246 break;
247 } 247 }
248 } 248 }
249 249
250 void BrowserViewLayout::Layout(views::View* host) { 250 void BrowserViewLayout::Layout(views::View* host) {
251 vertical_layout_rect_ = browser_view_->GetContentsBounds(); 251 vertical_layout_rect_ = browser_view_->GetContentsBounds();
252 int top = LayoutTabStrip(); 252 int top = LayoutTabStrip();
253 if (browser_view_->IsTabStripVisible() && !browser_view_->UseVerticalTabs()) { 253 if (browser_view_->IsTabStripVisible() && !browser_view_->UseVerticalTabs()) {
254 tabstrip_->SetBackgroundOffset(gfx::Point( 254 tabstrip_->SetBackgroundOffset(gfx::Point(
255 tabstrip_->MirroredX() + browser_view_->MirroredX(), 255 tabstrip_->GetMirroredX() + browser_view_->GetMirroredX(),
256 browser_view_->frame()->GetHorizontalTabStripVerticalOffset(false))); 256 browser_view_->frame()->GetHorizontalTabStripVerticalOffset(false)));
257 } 257 }
258 top = LayoutToolbar(top); 258 top = LayoutToolbar(top);
259 top = LayoutBookmarkAndInfoBars(top); 259 top = LayoutBookmarkAndInfoBars(top);
260 int bottom = LayoutDownloadShelf(browser_view_->height()); 260 int bottom = LayoutDownloadShelf(browser_view_->height());
261 int active_top_margin = GetTopMarginForActiveContent(); 261 int active_top_margin = GetTopMarginForActiveContent();
262 top -= active_top_margin; 262 top -= active_top_margin;
263 contents_container_->SetActiveTopMargin(active_top_margin); 263 contents_container_->SetActiveTopMargin(active_top_margin);
264 LayoutTabContents(top, bottom); 264 LayoutTabContents(top, bottom);
265 // This must be done _after_ we lay out the TabContents since this 265 // This must be done _after_ we lay out the TabContents since this
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 bottom -= height; 515 bottom -= height;
516 } 516 }
517 return bottom; 517 return bottom;
518 } 518 }
519 519
520 bool BrowserViewLayout::InfobarVisible() const { 520 bool BrowserViewLayout::InfobarVisible() const {
521 // NOTE: Can't check if the size IsEmpty() since it's always 0-width. 521 // NOTE: Can't check if the size IsEmpty() since it's always 0-width.
522 return browser()->SupportsWindowFeature(Browser::FEATURE_INFOBAR) && 522 return browser()->SupportsWindowFeature(Browser::FEATURE_INFOBAR) &&
523 (infobar_container_->GetPreferredSize().height() != 0); 523 (infobar_container_->GetPreferredSize().height() != 0);
524 } 524 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.cc ('k') | chrome/browser/ui/views/frame/opaque_browser_frame_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698