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

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

Issue 1355893002: Parametrize a variety of constants in preparation for changing them in MD. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase + fix bugs Created 5 years, 3 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/browser_view_layout.cc
diff --git a/chrome/browser/ui/views/frame/browser_view_layout.cc b/chrome/browser/ui/views/frame/browser_view_layout.cc
index 70da6b33bc3c1ba4f630e241c24d518af8033398..a8d1c71940db9671eecdc80bc6967ea6f9f824b6 100644
--- a/chrome/browser/ui/views/frame/browser_view_layout.cc
+++ b/chrome/browser/ui/views/frame/browser_view_layout.cc
@@ -20,6 +20,7 @@
#include "chrome/browser/ui/views/frame/immersive_mode_controller.h"
#include "chrome/browser/ui/views/frame/top_container_view.h"
#include "chrome/browser/ui/views/infobars/infobar_container_view.h"
+#include "chrome/browser/ui/views/layout_constants.h"
#include "chrome/browser/ui/views/tabs/tab_strip.h"
#include "components/web_modal/web_contents_modal_dialog_host.h"
#include "ui/base/hit_test.h"
@@ -114,9 +115,6 @@ class BrowserViewLayout::WebContentsModalDialogHostViews
DISALLOW_COPY_AND_ASSIGN(WebContentsModalDialogHostViews);
};
-// static
-const int BrowserViewLayout::kToolbarTabStripVerticalOverlap = 3;
-
////////////////////////////////////////////////////////////////////////////////
// BrowserViewLayout, public:
@@ -175,7 +173,7 @@ gfx::Size BrowserViewLayout::GetMinimumSize() {
browser()->SupportsWindowFeature(Browser::FEATURE_LOCATIONBAR)) ?
toolbar_->GetMinimumSize() : gfx::Size());
if (tabstrip_size.height() && toolbar_size.height())
- toolbar_size.Enlarge(0, -kToolbarTabStripVerticalOverlap);
+ toolbar_size.Enlarge(0, -GetLayoutConstant(TABSTRIP_TOOLBAR_OVERLAP));
gfx::Size bookmark_bar_size;
if (bookmark_bar_ &&
bookmark_bar_->visible() &&
@@ -401,7 +399,7 @@ int BrowserViewLayout::LayoutToolbar(int top) {
bool toolbar_visible = delegate_->IsToolbarVisible();
int y = top;
y -= (toolbar_visible && delegate_->IsTabStripVisible()) ?
- kToolbarTabStripVerticalOverlap : 0;
+ GetLayoutConstant(TABSTRIP_TOOLBAR_OVERLAP) : 0;
int height = toolbar_visible ? toolbar_->GetPreferredSize().height() : 0;
toolbar_->SetVisible(toolbar_visible);
toolbar_->SetBounds(vertical_layout_rect_.x(), y, browser_view_width, height);

Powered by Google App Engine
This is Rietveld 408576698