Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "chrome/browser/ui/views/harmony/harmony_layout_delegate.h" | |
| 6 | |
| 7 namespace chrome { | |
| 8 | |
| 9 static HarmonyLayoutDelegate harmony_layout_delegate_; | |
|
sky
2016/11/14 21:49:32
Style guide says static should only be PODs.
Elly Fong-Jones
2016/11/15 17:13:39
Ack. I misread the definition of POD in the C++ sp
| |
| 10 | |
| 11 // static | |
| 12 HarmonyLayoutDelegate* HarmonyLayoutDelegate::Get() { | |
| 13 return &harmony_layout_delegate_; | |
| 14 } | |
| 15 | |
| 16 int HarmonyLayoutDelegate::GetLayoutDistance(LayoutDistanceType type) const { | |
| 17 const int kLayoutUnit = 16; | |
| 18 switch (type) { | |
| 19 case PANEL_VERT_MARGIN: | |
| 20 return kLayoutUnit; | |
| 21 case RELATED_BUTTON_HORIZONTAL_SPACING: | |
| 22 return kLayoutUnit / 2; | |
| 23 case RELATED_CONTROL_HORIZONTAL_SPACING: | |
| 24 return kLayoutUnit; | |
| 25 case RELATED_CONTROL_VERTICAL_SPACING: | |
| 26 return kLayoutUnit / 2; | |
| 27 case UNRELATED_CONTROL_VERTICAL_SPACING: | |
| 28 return kLayoutUnit; | |
| 29 case UNRELATED_CONTROL_LARGE_VERTICAL_SPACING: | |
| 30 return kLayoutUnit; | |
| 31 case BUTTON_VEDGE_MARGIN_NEW: | |
| 32 return kLayoutUnit; | |
| 33 case BUTTON_HEDGE_MARGIN_NEW: | |
| 34 return kLayoutUnit; | |
| 35 } | |
| 36 } | |
| 37 | |
| 38 bool HarmonyLayoutDelegate::UseExtraDialogPadding() const { | |
| 39 return false; | |
| 40 } | |
| 41 | |
| 42 } // namespace chrome | |
| OLD | NEW |