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

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

Issue 2734113006: "Bootstrap" a toolkit-views Typography spec. (Closed)
Patch Set: ExtendableEnum Created 3 years, 9 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/harmony/harmony_layout_delegate.h" 9 #include "chrome/browser/ui/views/harmony/harmony_layout_delegate.h"
10 #include "ui/base/material_design/material_design_controller.h" 10 #include "ui/base/material_design/material_design_controller.h"
11 #include "ui/views/layout/layout_constants.h" 11 #include "ui/views/layout/layout_constants.h"
12 12
13 static base::LazyInstance<LayoutDelegate>::DestructorAtExit layout_delegate_ = 13 static base::LazyInstance<LayoutDelegate>::DestructorAtExit layout_delegate_ =
14 LAZY_INSTANCE_INITIALIZER; 14 LAZY_INSTANCE_INITIALIZER;
15 15
16 const ChromeTextContext::Value ChromeTextContext::DIALOG_TEXT_SMALL;
17 const ChromeTextContext::Value ChromeTextContext::DEPRECATED_SMALL;
18
16 // static 19 // static
17 LayoutDelegate* LayoutDelegate::Get() { 20 LayoutDelegate* LayoutDelegate::Get() {
18 return ui::MaterialDesignController::IsSecondaryUiMaterial() 21 return ui::MaterialDesignController::IsSecondaryUiMaterial()
19 ? HarmonyLayoutDelegate::Get() 22 ? HarmonyLayoutDelegate::Get()
20 : layout_delegate_.Pointer(); 23 : layout_delegate_.Pointer();
21 } 24 }
22 25
23 int LayoutDelegate::GetMetric(Metric metric) const { 26 int LayoutDelegate::GetMetric(Metric metric) const {
24 switch (metric) { 27 switch (metric) {
25 case Metric::BUTTON_HORIZONTAL_PADDING: 28 case Metric::BUTTON_HORIZONTAL_PADDING:
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 return true; 73 return true;
71 } 74 }
72 75
73 bool LayoutDelegate::IsHarmonyMode() const { 76 bool LayoutDelegate::IsHarmonyMode() const {
74 return false; 77 return false;
75 } 78 }
76 79
77 int LayoutDelegate::GetDialogPreferredWidth(DialogWidth width) const { 80 int LayoutDelegate::GetDialogPreferredWidth(DialogWidth width) const {
78 return 0; 81 return 0;
79 } 82 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698