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

Side by Side Diff: chrome/browser/ui/views/harmony/layout_delegate.cc

Issue 2750063002: views: implement dialog width snapping (Closed)
Patch Set: width -> min_width and improve tests 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 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 #include "chrome/browser/ui/views/harmony/layout_delegate.h" 5 #include "chrome/browser/ui/views/harmony/layout_delegate.h"
6 6
7 #include "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "chrome/browser/ui/views/chrome_views_delegate.h" 9 #include "chrome/browser/ui/views/chrome_views_delegate.h"
10 #include "chrome/browser/ui/views/harmony/chrome_typography.h" 10 #include "chrome/browser/ui/views/harmony/chrome_typography.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 } 85 }
86 86
87 bool LayoutDelegate::ShouldShowWindowIcon() const { 87 bool LayoutDelegate::ShouldShowWindowIcon() const {
88 return true; 88 return true;
89 } 89 }
90 90
91 bool LayoutDelegate::IsHarmonyMode() const { 91 bool LayoutDelegate::IsHarmonyMode() const {
92 return false; 92 return false;
93 } 93 }
94 94
95 int LayoutDelegate::GetDialogPreferredWidth(DialogWidth width) const { 95 int LayoutDelegate::GetSnappedDialogWidth(int min_width) const {
96 return 0; 96 return min_width;
97 } 97 }
98 98
99 const views::TypographyProvider& LayoutDelegate::GetTypographyProvider() const { 99 const views::TypographyProvider& LayoutDelegate::GetTypographyProvider() const {
100 // This is not a data member because then HarmonyLayoutDelegate would inherit 100 // This is not a data member because then HarmonyLayoutDelegate would inherit
101 // it, even when it provides its own. 101 // it, even when it provides its own.
102 CR_DEFINE_STATIC_LOCAL(LegacyTypographyProvider, legacy_provider, ()); 102 CR_DEFINE_STATIC_LOCAL(LegacyTypographyProvider, legacy_provider, ());
103 return legacy_provider; 103 return legacy_provider;
104 } 104 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698