Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3260)

Unified Diff: chrome/browser/ui/views/harmony/harmony_layout_provider.h

Issue 2758323002: Broke out layout metric information from ViewsDelegate to LayoutProvider (Closed)
Patch Set: Final feedback addressed Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/harmony/harmony_layout_provider.h
diff --git a/chrome/browser/ui/views/harmony/harmony_layout_delegate.h b/chrome/browser/ui/views/harmony/harmony_layout_provider.h
similarity index 52%
rename from chrome/browser/ui/views/harmony/harmony_layout_delegate.h
rename to chrome/browser/ui/views/harmony/harmony_layout_provider.h
index 3fd09073953eb3070b66d32d50d8285ff3316a60..a96c5b2eb186104cb8569ffe406cd15a24bb6dbf 100644
--- a/chrome/browser/ui/views/harmony/harmony_layout_delegate.h
+++ b/chrome/browser/ui/views/harmony/harmony_layout_provider.h
@@ -1,37 +1,35 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
+// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_UI_VIEWS_HARMONY_HARMONY_LAYOUT_DELEGATE_H_
-#define CHROME_BROWSER_UI_VIEWS_HARMONY_HARMONY_LAYOUT_DELEGATE_H_
+#ifndef CHROME_BROWSER_UI_VIEWS_HARMONY_HARMONY_LAYOUT_PROVIDER_H_
+#define CHROME_BROWSER_UI_VIEWS_HARMONY_HARMONY_LAYOUT_PROVIDER_H_
+#include "base/macros.h"
+#include "chrome/browser/ui/views/harmony/chrome_layout_provider.h"
#include "chrome/browser/ui/views/harmony/harmony_typography_provider.h"
-#include "chrome/browser/ui/views/harmony/layout_delegate.h"
-class HarmonyLayoutDelegate : public LayoutDelegate {
+class HarmonyLayoutProvider : public ChromeLayoutProvider {
public:
// The Harmony layout unit. All distances are in terms of this unit.
static constexpr int kHarmonyLayoutUnit = 16;
- HarmonyLayoutDelegate() {}
- ~HarmonyLayoutDelegate() override {}
+ HarmonyLayoutProvider() {}
+ ~HarmonyLayoutProvider() override {}
- // Returns the singleton HarmonyLayoutDelegate instance.
- static HarmonyLayoutDelegate* Get();
-
- // views::LayoutDelegate:
- int GetMetric(Metric metric) const override;
+ gfx::Insets GetInsetsMetric(int metric) const override;
+ int GetDistanceMetric(int metric) const override;
views::GridLayout::Alignment GetControlLabelGridAlignment() const override;
bool UseExtraDialogPadding() const override;
+ bool ShouldShowWindowIcon() const override;
bool IsHarmonyMode() const override;
int GetDialogPreferredWidth(DialogWidth width) const override;
- bool ShouldShowWindowIcon() const override;
const views::TypographyProvider& GetTypographyProvider() const override;
private:
const HarmonyTypographyProvider typography_provider_;
- DISALLOW_COPY_AND_ASSIGN(HarmonyLayoutDelegate);
+ DISALLOW_COPY_AND_ASSIGN(HarmonyLayoutProvider);
};
-#endif // CHROME_BROWSER_UI_VIEWS_HARMONY_HARMONY_LAYOUT_DELEGATE_H_
+#endif // CHROME_BROWSER_UI_VIEWS_HARMONY_HARMONY_LAYOUT_PROVIDER_H_
« no previous file with comments | « chrome/browser/ui/views/harmony/harmony_layout_delegate.cc ('k') | chrome/browser/ui/views/harmony/harmony_layout_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698