| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/harmony/harmony_layout_delegate.h" | 5 #include "chrome/browser/ui/views/harmony/harmony_layout_delegate.h" |
| 6 | 6 |
| 7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 | 9 |
| 10 static base::LazyInstance<HarmonyLayoutDelegate> harmony_layout_delegate_ = | 10 static base::LazyInstance<HarmonyLayoutDelegate> harmony_layout_delegate_ = |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 case Metric::SUBSECTION_HORIZONTAL_INDENT: | 44 case Metric::SUBSECTION_HORIZONTAL_INDENT: |
| 45 return 0; | 45 return 0; |
| 46 case Metric::UNRELATED_CONTROL_HORIZONTAL_SPACING: | 46 case Metric::UNRELATED_CONTROL_HORIZONTAL_SPACING: |
| 47 return kHarmonyLayoutUnit; | 47 return kHarmonyLayoutUnit; |
| 48 case Metric::UNRELATED_CONTROL_HORIZONTAL_SPACING_LARGE: | 48 case Metric::UNRELATED_CONTROL_HORIZONTAL_SPACING_LARGE: |
| 49 return kHarmonyLayoutUnit; | 49 return kHarmonyLayoutUnit; |
| 50 case Metric::UNRELATED_CONTROL_VERTICAL_SPACING: | 50 case Metric::UNRELATED_CONTROL_VERTICAL_SPACING: |
| 51 return kHarmonyLayoutUnit; | 51 return kHarmonyLayoutUnit; |
| 52 case Metric::UNRELATED_CONTROL_VERTICAL_SPACING_LARGE: | 52 case Metric::UNRELATED_CONTROL_VERTICAL_SPACING_LARGE: |
| 53 return kHarmonyLayoutUnit; | 53 return kHarmonyLayoutUnit; |
| 54 case Metric::BUTTON_MAX_SHARED_WIDTH: |
| 55 return kHarmonyLayoutUnit * 8; |
| 54 } | 56 } |
| 55 NOTREACHED(); | 57 NOTREACHED(); |
| 56 return 0; | 58 return 0; |
| 57 } | 59 } |
| 58 | 60 |
| 59 views::GridLayout::Alignment | 61 views::GridLayout::Alignment |
| 60 HarmonyLayoutDelegate::GetControlLabelGridAlignment() const { | 62 HarmonyLayoutDelegate::GetControlLabelGridAlignment() const { |
| 61 return views::GridLayout::LEADING; | 63 return views::GridLayout::LEADING; |
| 62 } | 64 } |
| 63 | 65 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 74 case DialogWidth::SMALL: | 76 case DialogWidth::SMALL: |
| 75 return 320; | 77 return 320; |
| 76 case DialogWidth::MEDIUM: | 78 case DialogWidth::MEDIUM: |
| 77 return 448; | 79 return 448; |
| 78 case DialogWidth::LARGE: | 80 case DialogWidth::LARGE: |
| 79 return 512; | 81 return 512; |
| 80 } | 82 } |
| 81 NOTREACHED(); | 83 NOTREACHED(); |
| 82 return 0; | 84 return 0; |
| 83 } | 85 } |
| OLD | NEW |