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

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

Issue 2821413002: views: support dialog width snapping once and for all (Closed)
Patch Set: fix failing unittest 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
« no previous file with comments | « ui/views/bubble/bubble_frame_view_unittest.cc ('k') | ui/views/layout/layout_provider.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 virtual gfx::Insets GetInsetsMetric(int metric) const; 78 virtual gfx::Insets GetInsetsMetric(int metric) const;
79 79
80 // Returns the distance metric between elements according to the given 80 // Returns the distance metric between elements according to the given
81 // enumeration element. 81 // enumeration element.
82 virtual int GetDistanceMetric(int metric) const; 82 virtual int GetDistanceMetric(int metric) const;
83 83
84 // Returns the TypographyProvider, used to configure text properties such as 84 // Returns the TypographyProvider, used to configure text properties such as
85 // font, weight, color, size, and line height. Never null. 85 // font, weight, color, size, and line height. Never null.
86 virtual const TypographyProvider& GetTypographyProvider() const; 86 virtual const TypographyProvider& GetTypographyProvider() const;
87 87
88 // Returns the actual width to use for a dialog that requires at least
89 // |min_width|.
90 virtual int GetSnappedDialogWidth(int min_width) const;
91
88 private: 92 private:
89 DefaultTypographyProvider typography_provider_; 93 DefaultTypographyProvider typography_provider_;
90 94
91 DISALLOW_COPY_AND_ASSIGN(LayoutProvider); 95 DISALLOW_COPY_AND_ASSIGN(LayoutProvider);
92 }; 96 };
93 97
94 } // namespace views 98 } // namespace views
95 99
96 #endif // UI_VIEWS_LAYOUT_LAYOUT_PROVIDER_H_ 100 #endif // UI_VIEWS_LAYOUT_LAYOUT_PROVIDER_H_
OLDNEW
« no previous file with comments | « ui/views/bubble/bubble_frame_view_unittest.cc ('k') | ui/views/layout/layout_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698