| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 #ifndef CHROME_BROWSER_UI_VIEWS_HARMONY_HARMONY_LAYOUT_PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_HARMONY_HARMONY_LAYOUT_PROVIDER_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_HARMONY_HARMONY_LAYOUT_PROVIDER_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_HARMONY_HARMONY_LAYOUT_PROVIDER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "chrome/browser/ui/views/harmony/chrome_layout_provider.h" | 9 #include "chrome/browser/ui/views/harmony/chrome_layout_provider.h" |
| 10 #include "chrome/browser/ui/views/harmony/harmony_typography_provider.h" | 10 #include "chrome/browser/ui/views/harmony/harmony_typography_provider.h" |
| 11 | 11 |
| 12 class HarmonyLayoutProvider : public ChromeLayoutProvider { | 12 class HarmonyLayoutProvider : public ChromeLayoutProvider { |
| 13 public: | 13 public: |
| 14 // The Harmony layout unit. All distances are in terms of this unit. | 14 // The Harmony layout unit. All distances are in terms of this unit. |
| 15 static constexpr int kHarmonyLayoutUnit = 16; | 15 static constexpr int kHarmonyLayoutUnit = 16; |
| 16 | 16 |
| 17 HarmonyLayoutProvider() {} | 17 HarmonyLayoutProvider() {} |
| 18 ~HarmonyLayoutProvider() override {} | 18 ~HarmonyLayoutProvider() override {} |
| 19 | 19 |
| 20 gfx::Insets GetInsetsMetric(int metric) const override; | 20 gfx::Insets GetInsetsMetric(int metric) const override; |
| 21 int GetDistanceMetric(int metric) const override; | 21 int GetDistanceMetric(int metric) const override; |
| 22 views::GridLayout::Alignment GetControlLabelGridAlignment() const override; | 22 views::GridLayout::Alignment GetControlLabelGridAlignment() const override; |
| 23 bool UseExtraDialogPadding() const override; | 23 bool UseExtraDialogPadding() const override; |
| 24 bool ShouldShowWindowIcon() const override; | 24 bool ShouldShowWindowIcon() const override; |
| 25 bool IsHarmonyMode() const override; | 25 bool IsHarmonyMode() const override; |
| 26 int GetDialogPreferredWidth(DialogWidth width) const override; | |
| 27 const views::TypographyProvider& GetTypographyProvider() const override; | 26 const views::TypographyProvider& GetTypographyProvider() const override; |
| 27 int GetSnappedDialogWidth(int min_width) const override; |
| 28 | 28 |
| 29 private: | 29 private: |
| 30 const HarmonyTypographyProvider typography_provider_; | 30 const HarmonyTypographyProvider typography_provider_; |
| 31 | 31 |
| 32 DISALLOW_COPY_AND_ASSIGN(HarmonyLayoutProvider); | 32 DISALLOW_COPY_AND_ASSIGN(HarmonyLayoutProvider); |
| 33 }; | 33 }; |
| 34 | 34 |
| 35 #endif // CHROME_BROWSER_UI_VIEWS_HARMONY_HARMONY_LAYOUT_PROVIDER_H_ | 35 #endif // CHROME_BROWSER_UI_VIEWS_HARMONY_HARMONY_LAYOUT_PROVIDER_H_ |
| OLD | NEW |