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

Side by Side Diff: ui/views/layout/layout_provider.h

Issue 2821413002: views: support dialog width snapping once and for all (Closed)
Patch Set: 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 unified diff | Download patch
OLDNEW
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 UI_VIEWS_LAYOUT_LAYOUT_PROVIDER_H_ 5 #ifndef UI_VIEWS_LAYOUT_LAYOUT_PROVIDER_H_
6 #define UI_VIEWS_LAYOUT_LAYOUT_PROVIDER_H_ 6 #define UI_VIEWS_LAYOUT_LAYOUT_PROVIDER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "ui/gfx/geometry/insets.h" 9 #include "ui/gfx/geometry/insets.h"
10 #include "ui/views/style/typography_provider.h" 10 #include "ui/views/style/typography_provider.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 virtual gfx::Insets GetInsetsMetric(int metric) const; 76 virtual gfx::Insets GetInsetsMetric(int metric) const;
77 77
78 // Returns the distance metric between elements according to the given 78 // Returns the distance metric between elements according to the given
79 // enumeration element. 79 // enumeration element.
80 virtual int GetDistanceMetric(int metric) const; 80 virtual int GetDistanceMetric(int metric) const;
81 81
82 // Returns the TypographyProvider, used to configure text properties such as 82 // Returns the TypographyProvider, used to configure text properties such as
83 // font, weight, color, size, and line height. Never null. 83 // font, weight, color, size, and line height. Never null.
84 virtual const TypographyProvider& GetTypographyProvider() const; 84 virtual const TypographyProvider& GetTypographyProvider() const;
85 85
86 // Returns the actual width to use for a dialog that requires at least
87 // |min_width|.
88 virtual int GetSnappedDialogWidth(int min_width) const;
89
86 private: 90 private:
87 DefaultTypographyProvider typography_provider_; 91 DefaultTypographyProvider typography_provider_;
88 92
89 DISALLOW_COPY_AND_ASSIGN(LayoutProvider); 93 DISALLOW_COPY_AND_ASSIGN(LayoutProvider);
90 }; 94 };
91 95
92 } // namespace views 96 } // namespace views
93 97
94 #endif // UI_VIEWS_LAYOUT_LAYOUT_PROVIDER_H_ 98 #endif // UI_VIEWS_LAYOUT_LAYOUT_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698