| 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 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 return kFindBarVerticalOffset[mode]; | 39 return kFindBarVerticalOffset[mode]; |
| 40 case LOCATION_BAR_BORDER_THICKNESS: | 40 case LOCATION_BAR_BORDER_THICKNESS: |
| 41 return kLocationBarBorderThickness[mode]; | 41 return kLocationBarBorderThickness[mode]; |
| 42 case LOCATION_BAR_BUBBLE_FONT_VERTICAL_PADDING: | 42 case LOCATION_BAR_BUBBLE_FONT_VERTICAL_PADDING: |
| 43 return kLocationBarBubbleFontVerticalPadding[mode]; | 43 return kLocationBarBubbleFontVerticalPadding[mode]; |
| 44 case LOCATION_BAR_BUBBLE_HORIZONTAL_PADDING: | 44 case LOCATION_BAR_BUBBLE_HORIZONTAL_PADDING: |
| 45 return kLocationBarBubbleHorizontalPadding[mode]; | 45 return kLocationBarBubbleHorizontalPadding[mode]; |
| 46 case LOCATION_BAR_BUBBLE_VERTICAL_PADDING: | 46 case LOCATION_BAR_BUBBLE_VERTICAL_PADDING: |
| 47 return kLocationBarBubbleVerticalPadding[mode]; | 47 return kLocationBarBubbleVerticalPadding[mode]; |
| 48 case LOCATION_BAR_BUBBLE_ANCHOR_VERTICAL_INSET: | 48 case LOCATION_BAR_BUBBLE_ANCHOR_VERTICAL_INSET: |
| 49 if (ui::MaterialDesignController::IsSecondaryUiMaterial()) |
| 50 return 1; |
| 49 return kLocationBarBubbleAnchorVerticalInset[mode]; | 51 return kLocationBarBubbleAnchorVerticalInset[mode]; |
| 50 case LOCATION_BAR_HEIGHT: | 52 case LOCATION_BAR_HEIGHT: |
| 51 return kLocationBarHeight[mode]; | 53 return kLocationBarHeight[mode]; |
| 52 case LOCATION_BAR_HORIZONTAL_PADDING: | 54 case LOCATION_BAR_HORIZONTAL_PADDING: |
| 53 return kLocationBarHorizontalPadding[mode]; | 55 return kLocationBarHorizontalPadding[mode]; |
| 54 case LOCATION_BAR_VERTICAL_PADDING: | 56 case LOCATION_BAR_VERTICAL_PADDING: |
| 55 return kLocationBarVerticalPadding[mode]; | 57 return kLocationBarVerticalPadding[mode]; |
| 56 case OMNIBOX_FONT_PIXEL_SIZE: | 58 case OMNIBOX_FONT_PIXEL_SIZE: |
| 57 return kOmniboxFontPixelSize[mode]; | 59 return kOmniboxFontPixelSize[mode]; |
| 58 case TABSTRIP_NEW_TAB_BUTTON_OVERLAP: | 60 case TABSTRIP_NEW_TAB_BUTTON_OVERLAP: |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 const int kNewTabButtonHeight[] = {18, 18, 21}; | 124 const int kNewTabButtonHeight[] = {18, 18, 21}; |
| 123 | 125 |
| 124 const int mode = ui::MaterialDesignController::GetMode(); | 126 const int mode = ui::MaterialDesignController::GetMode(); |
| 125 switch (size) { | 127 switch (size) { |
| 126 case NEW_TAB_BUTTON: | 128 case NEW_TAB_BUTTON: |
| 127 return gfx::Size(kNewTabButtonWidth[mode], kNewTabButtonHeight[mode]); | 129 return gfx::Size(kNewTabButtonWidth[mode], kNewTabButtonHeight[mode]); |
| 128 } | 130 } |
| 129 NOTREACHED(); | 131 NOTREACHED(); |
| 130 return gfx::Size(); | 132 return gfx::Size(); |
| 131 } | 133 } |
| OLD | NEW |