| 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 #ifndef CHROME_BROWSER_UI_VIEWS_HARMONY_HARMONY_LAYOUT_DELEGATE_H_ | |
| 6 #define CHROME_BROWSER_UI_VIEWS_HARMONY_HARMONY_LAYOUT_DELEGATE_H_ | |
| 7 | |
| 8 #include "chrome/browser/ui/views/harmony/harmony_typography_provider.h" | |
| 9 #include "chrome/browser/ui/views/harmony/layout_delegate.h" | |
| 10 | |
| 11 class HarmonyLayoutDelegate : public LayoutDelegate { | |
| 12 public: | |
| 13 // The Harmony layout unit. All distances are in terms of this unit. | |
| 14 static constexpr int kHarmonyLayoutUnit = 16; | |
| 15 | |
| 16 HarmonyLayoutDelegate() {} | |
| 17 ~HarmonyLayoutDelegate() override {} | |
| 18 | |
| 19 // Returns the singleton HarmonyLayoutDelegate instance. | |
| 20 static HarmonyLayoutDelegate* Get(); | |
| 21 | |
| 22 // views::LayoutDelegate: | |
| 23 int GetMetric(Metric metric) const override; | |
| 24 views::GridLayout::Alignment GetControlLabelGridAlignment() const override; | |
| 25 bool UseExtraDialogPadding() const override; | |
| 26 bool IsHarmonyMode() const override; | |
| 27 int GetDialogPreferredWidth(DialogWidth width) const override; | |
| 28 bool ShouldShowWindowIcon() const override; | |
| 29 const views::TypographyProvider& GetTypographyProvider() const override; | |
| 30 | |
| 31 private: | |
| 32 const HarmonyTypographyProvider typography_provider_; | |
| 33 | |
| 34 DISALLOW_COPY_AND_ASSIGN(HarmonyLayoutDelegate); | |
| 35 }; | |
| 36 | |
| 37 #endif // CHROME_BROWSER_UI_VIEWS_HARMONY_HARMONY_LAYOUT_DELEGATE_H_ | |
| OLD | NEW |