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