| OLD | NEW |
| 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> layout_delegate_ = | 13 static base::LazyInstance<LayoutDelegate>::DestructorAtExit layout_delegate_ = |
| 14 LAZY_INSTANCE_INITIALIZER; | 14 LAZY_INSTANCE_INITIALIZER; |
| 15 | 15 |
| 16 // static | 16 // static |
| 17 LayoutDelegate* LayoutDelegate::Get() { | 17 LayoutDelegate* LayoutDelegate::Get() { |
| 18 return ui::MaterialDesignController::IsSecondaryUiMaterial() | 18 return ui::MaterialDesignController::IsSecondaryUiMaterial() |
| 19 ? HarmonyLayoutDelegate::Get() | 19 ? HarmonyLayoutDelegate::Get() |
| 20 : layout_delegate_.Pointer(); | 20 : layout_delegate_.Pointer(); |
| 21 } | 21 } |
| 22 | 22 |
| 23 int LayoutDelegate::GetMetric(Metric metric) const { | 23 int LayoutDelegate::GetMetric(Metric metric) const { |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 return true; | 68 return true; |
| 69 } | 69 } |
| 70 | 70 |
| 71 bool LayoutDelegate::IsHarmonyMode() const { | 71 bool LayoutDelegate::IsHarmonyMode() const { |
| 72 return false; | 72 return false; |
| 73 } | 73 } |
| 74 | 74 |
| 75 int LayoutDelegate::GetDialogPreferredWidth(DialogWidth width) const { | 75 int LayoutDelegate::GetDialogPreferredWidth(DialogWidth width) const { |
| 76 return 0; | 76 return 0; |
| 77 } | 77 } |
| OLD | NEW |