| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/layout_constants.h" | 5 #include "chrome/browser/ui/layout_constants.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 #include "ui/base/material_design/material_design_controller.h" | 9 #include "ui/base/material_design/material_design_controller.h" |
| 10 | 10 |
| 11 int GetLayoutConstant(LayoutConstant constant) { | 11 int GetLayoutConstant(LayoutConstant constant) { |
| 12 const int kFindBarVerticalOffset[] = {1, 6, 6}; | 12 const int kFindBarVerticalOffset[] = {1, 6, 6}; |
| 13 const int kIconLabelViewInternalPadding[] = {3, 2, 2}; | 13 const int kIconLabelViewInternalPadding[] = {3, 2, 2}; |
| 14 const int kIconLabelViewTrailingPadding[] = {2, 8, 8}; | 14 const int kIconLabelViewTrailingPadding[] = {2, 8, 8}; |
| 15 const int kLocationBarBorderThickness[] = {2, 1, 1}; | 15 const int kLocationBarBorderThickness[] = {2, 1, 1}; |
| 16 const int kLocationBarBubbleHorizontalPadding[] = {1, 4, 4}; | 16 const int kLocationBarBubbleHorizontalPadding[] = {1, 4, 4}; |
| 17 const int kLocationBarBubbleVerticalPadding[] = {1, 4, 4}; | 17 const int kLocationBarBubbleVerticalPadding[] = {1, 4, 4}; |
| 18 const int kLocationBarHeight[] = {27, 28, 32}; | 18 const int kLocationBarHeight[] = {27, 28, 32}; |
| 19 const int kLocationBarHorizontalPadding[] = {3, 6, 6}; | 19 const int kLocationBarHorizontalPadding[] = {3, 6, 6}; |
| 20 const int kLocationBarVerticalPadding[] = {2, 2, 2}; | 20 const int kLocationBarVerticalPadding[] = {0, 1, 1}; |
| 21 const int kOmniboxDropdownBorderInterior[] = {6, 0, 0}; | 21 const int kOmniboxDropdownBorderInterior[] = {6, 0, 0}; |
| 22 const int kOmniboxFontPixelSize[] = {16, 14, 14}; | 22 const int kOmniboxFontPixelSize[] = {16, 14, 14}; |
| 23 const int kTabCloseButtonTrailingPaddingOverlap[] = {2, 0, 0}; | 23 const int kTabCloseButtonTrailingPaddingOverlap[] = {2, 0, 0}; |
| 24 const int kTabFaviconTitleSpacing[] = {4, 6, 6}; | 24 const int kTabFaviconTitleSpacing[] = {4, 6, 6}; |
| 25 const int kTabHeight[] = {29, 29, 33}; | 25 const int kTabHeight[] = {29, 29, 33}; |
| 26 const int kTabPinnedContentWidth[] = {25, 23, 23}; | 26 const int kTabPinnedContentWidth[] = {25, 23, 23}; |
| 27 #if defined(OS_MACOSX) | 27 #if defined(OS_MACOSX) |
| 28 const int kTabTopExclusionHeight[] = {0, 0, 0}; | 28 const int kTabTopExclusionHeight[] = {0, 0, 0}; |
| 29 const int kTabstripNewTabButtonOverlap[] = {8, 5, 6}; | 29 const int kTabstripNewTabButtonOverlap[] = {8, 5, 6}; |
| 30 const int kTabstripTabOverlap[] = {19, 16, 16}; | 30 const int kTabstripTabOverlap[] = {19, 16, 16}; |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 const int kNewTabButtonHeight[] = {18, 18, 21}; | 150 const int kNewTabButtonHeight[] = {18, 18, 21}; |
| 151 | 151 |
| 152 const int mode = ui::MaterialDesignController::GetMode(); | 152 const int mode = ui::MaterialDesignController::GetMode(); |
| 153 switch (size) { | 153 switch (size) { |
| 154 case NEW_TAB_BUTTON: | 154 case NEW_TAB_BUTTON: |
| 155 return gfx::Size(kNewTabButtonWidth[mode], kNewTabButtonHeight[mode]); | 155 return gfx::Size(kNewTabButtonWidth[mode], kNewTabButtonHeight[mode]); |
| 156 } | 156 } |
| 157 NOTREACHED(); | 157 NOTREACHED(); |
| 158 return gfx::Size(); | 158 return gfx::Size(); |
| 159 } | 159 } |
| OLD | NEW |