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

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

Issue 2934503002: Remove references to ui/views/layout/layout_constants.h (Closed)
Patch Set: Created 3 years, 6 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 #include "chrome/browser/ui/views/harmony/harmony_layout_provider.h" 5 #include "chrome/browser/ui/views/harmony/harmony_layout_provider.h"
6 6
7 gfx::Insets HarmonyLayoutProvider::GetInsetsMetric(int metric) const { 7 gfx::Insets HarmonyLayoutProvider::GetInsetsMetric(int metric) const {
8 DCHECK_LT(metric, views::VIEWS_INSETS_MAX); 8 DCHECK_LT(metric, views::VIEWS_INSETS_MAX);
9 switch (metric) { 9 switch (metric) {
10 case views::INSETS_VECTOR_IMAGE_BUTTON: 10 case views::INSETS_VECTOR_IMAGE_BUTTON:
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 case views::DISTANCE_BUTTON_MAX_LINKABLE_WIDTH: 54 case views::DISTANCE_BUTTON_MAX_LINKABLE_WIDTH:
55 return kHarmonyLayoutUnit * 7; 55 return kHarmonyLayoutUnit * 7;
56 case DISTANCE_RELATED_LABEL_HORIZONTAL: 56 case DISTANCE_RELATED_LABEL_HORIZONTAL:
57 return kHarmonyLayoutUnit; 57 return kHarmonyLayoutUnit;
58 case DISTANCE_SUBSECTION_HORIZONTAL_INDENT: 58 case DISTANCE_SUBSECTION_HORIZONTAL_INDENT:
59 return 0; 59 return 0;
60 case DISTANCE_UNRELATED_CONTROL_HORIZONTAL: 60 case DISTANCE_UNRELATED_CONTROL_HORIZONTAL:
61 return kHarmonyLayoutUnit; 61 return kHarmonyLayoutUnit;
62 case DISTANCE_UNRELATED_CONTROL_HORIZONTAL_LARGE: 62 case DISTANCE_UNRELATED_CONTROL_HORIZONTAL_LARGE:
63 return kHarmonyLayoutUnit; 63 return kHarmonyLayoutUnit;
64 case DISTANCE_UNRELATED_CONTROL_VERTICAL: 64 case views::DISTANCE_UNRELATED_CONTROL_VERTICAL:
65 return kHarmonyLayoutUnit; 65 return kHarmonyLayoutUnit;
66 case DISTANCE_UNRELATED_CONTROL_VERTICAL_LARGE: 66 case DISTANCE_UNRELATED_CONTROL_VERTICAL_LARGE:
67 return kHarmonyLayoutUnit; 67 return kHarmonyLayoutUnit;
68 } 68 }
69 NOTREACHED(); 69 NOTREACHED();
70 return 0; 70 return 0;
71 } 71 }
72 72
73 views::GridLayout::Alignment 73 views::GridLayout::Alignment
74 HarmonyLayoutProvider::GetControlLabelGridAlignment() const { 74 HarmonyLayoutProvider::GetControlLabelGridAlignment() const {
(...skipping 19 matching lines...) Expand all
94 } 94 }
95 95
96 return ((min_width + kHarmonyLayoutUnit - 1) / kHarmonyLayoutUnit) * 96 return ((min_width + kHarmonyLayoutUnit - 1) / kHarmonyLayoutUnit) *
97 kHarmonyLayoutUnit; 97 kHarmonyLayoutUnit;
98 } 98 }
99 99
100 const views::TypographyProvider& HarmonyLayoutProvider::GetTypographyProvider() 100 const views::TypographyProvider& HarmonyLayoutProvider::GetTypographyProvider()
101 const { 101 const {
102 return typography_provider_; 102 return typography_provider_;
103 } 103 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/harmony/chrome_layout_provider.cc ('k') | chrome/browser/ui/views/login_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698