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

Side by Side Diff: chrome/browser/ui/views/harmony/harmony_layout_delegate.h

Issue 2663013003: Rename various LayoutDelegate types/functions for brevity and consistency. (Closed)
Patch Set: Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 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 "chrome/browser/ui/views/harmony/layout_delegate.h"
9 9
10 class HarmonyLayoutDelegate : public LayoutDelegate { 10 class HarmonyLayoutDelegate : public LayoutDelegate {
11 public: 11 public:
12 // The Harmony layout unit. All distances are in terms of this unit. 12 // The Harmony layout unit. All distances are in terms of this unit.
13 static const int kHarmonyLayoutUnit = 16; 13 static constexpr int kHarmonyLayoutUnit = 16;
14 14
15 HarmonyLayoutDelegate() {} 15 HarmonyLayoutDelegate() {}
16 ~HarmonyLayoutDelegate() override {} 16 ~HarmonyLayoutDelegate() override {}
17 17
18 // Returns the singleton HarmonyLayoutDelegate instance. 18 // Returns the singleton HarmonyLayoutDelegate instance.
19 static HarmonyLayoutDelegate* Get(); 19 static HarmonyLayoutDelegate* Get();
20 20
21 // views::LayoutDelegate: 21 // views::LayoutDelegate:
22 int GetLayoutDistance(LayoutDistanceType type) const override; 22 int GetMetric(Metric metric) const override;
23 views::GridLayout::Alignment GetControlLabelGridAlignment() const override; 23 views::GridLayout::Alignment GetControlLabelGridAlignment() const override;
24 bool UseExtraDialogPadding() const override; 24 bool UseExtraDialogPadding() const override;
25 bool IsHarmonyMode() const override; 25 bool IsHarmonyMode() const override;
26 int GetDialogPreferredWidth(DialogWidthType type) const override; 26 int GetDialogPreferredWidth(DialogWidth width) const override;
27 27
28 private: 28 private:
29 DISALLOW_COPY_AND_ASSIGN(HarmonyLayoutDelegate); 29 DISALLOW_COPY_AND_ASSIGN(HarmonyLayoutDelegate);
30 }; 30 };
31 31
32 #endif // CHROME_BROWSER_UI_VIEWS_HARMONY_HARMONY_LAYOUT_DELEGATE_H_ 32 #endif // CHROME_BROWSER_UI_VIEWS_HARMONY_HARMONY_LAYOUT_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698