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

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

Issue 2733283002: Require explicit selection of traits for LazyInstance (Closed)
Patch Set: l10n again 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> 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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698