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

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

Issue 2758323002: Broke out layout metric information from ViewsDelegate to LayoutProvider (Closed)
Patch Set: Fix warning which causes one of the bots to fail 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_delegate.h
diff --git a/chrome/browser/ui/views/harmony/harmony_layout_delegate.h b/chrome/browser/ui/views/harmony/harmony_layout_delegate.h
index c750bfffc62dbb7eedceb24c7d8d4588b396fdc0..d5fd331f763f0b411bbd12ba9c429d3b05889b95 100644
--- a/chrome/browser/ui/views/harmony/harmony_layout_delegate.h
+++ b/chrome/browser/ui/views/harmony/harmony_layout_delegate.h
@@ -1,13 +1,18 @@
-// 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_
-#include "chrome/browser/ui/views/harmony/layout_delegate.h"
+#include <memory>
Peter Kasting 2017/04/06 08:13:36 Nit: Why this #include?
kylix_rd 2017/04/06 16:48:19 Probably an over zealous copy operation as I initi
-class HarmonyLayoutDelegate : public LayoutDelegate {
+#include "base/macros.h"
+#include "chrome/browser/ui/views/harmony/chrome_layout_delegate.h"
+#include "ui/gfx/geometry/insets.h"
+#include "ui/views/layout/grid_layout.h"
Peter Kasting 2017/04/06 08:13:36 Nit: insets.h and grid_layout.h shouldn't be neces
kylix_rd 2017/04/06 16:48:19 Good to know. It's a subtle exception to the IWYU
+
+class HarmonyLayoutDelegate : public ChromeLayoutDelegate {
public:
// The Harmony layout unit. All distances are in terms of this unit.
static constexpr int kHarmonyLayoutUnit = 16;
@@ -15,16 +20,13 @@ class HarmonyLayoutDelegate : public LayoutDelegate {
HarmonyLayoutDelegate() {}
~HarmonyLayoutDelegate() override {}
- // Returns the singleton HarmonyLayoutDelegate instance.
- static HarmonyLayoutDelegate* Get();
-
- // views::LayoutDelegate:
- int GetMetric(Metric metric) const override;
+ gfx::Insets GetInsetsMetric(ChromeInsetsMetric metric) const override;
+ int GetDistanceMetric(ChromeDistanceMetric 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;
private:
DISALLOW_COPY_AND_ASSIGN(HarmonyLayoutDelegate);

Powered by Google App Engine
This is Rietveld 408576698