| 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 24 matching lines...) Expand all Loading... |
| 35 case LayoutDistanceType::BUTTON_HEDGE_MARGIN_NEW: | 35 case LayoutDistanceType::BUTTON_HEDGE_MARGIN_NEW: |
| 36 return kLayoutUnit; | 36 return kLayoutUnit; |
| 37 } | 37 } |
| 38 NOTREACHED(); | 38 NOTREACHED(); |
| 39 return 0; | 39 return 0; |
| 40 } | 40 } |
| 41 | 41 |
| 42 bool HarmonyLayoutDelegate::UseExtraDialogPadding() const { | 42 bool HarmonyLayoutDelegate::UseExtraDialogPadding() const { |
| 43 return false; | 43 return false; |
| 44 } | 44 } |
| 45 |
| 46 bool HarmonyLayoutDelegate::IsHarmonyMode() const { |
| 47 return true; |
| 48 } |
| 49 |
| 50 int HarmonyLayoutDelegate::GetDialogPreferredWidth(DialogWidthType type) const { |
| 51 switch (type) { |
| 52 case DialogWidthType::SMALL: |
| 53 return 320; |
| 54 case DialogWidthType::MEDIUM: |
| 55 return 448; |
| 56 case DialogWidthType::LARGE: |
| 57 return 512; |
| 58 } |
| 59 NOTREACHED(); |
| 60 return 0; |
| 61 } |
| OLD | NEW |