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

Side by Side Diff: ui/base/material_design/material_design_controller.cc

Issue 1759483005: [MD] turn on MD by default for desktop linux (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 <string> 5 #include <string>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "ui/base/material_design/material_design_controller.h" 9 #include "ui/base/material_design/material_design_controller.h"
10 #include "ui/base/ui_base_switches.h" 10 #include "ui/base/ui_base_switches.h"
(...skipping 26 matching lines...) Expand all
37 #if defined(OS_CHROMEOS) 37 #if defined(OS_CHROMEOS)
38 // TODO(tdanderson): Enable hybrid by default for touchscreen devices. 38 // TODO(tdanderson): Enable hybrid by default for touchscreen devices.
39 // See crbug.com/588880. 39 // See crbug.com/588880.
40 const std::string board = base::SysInfo::GetLsbReleaseBoard(); 40 const std::string board = base::SysInfo::GetLsbReleaseBoard();
41 if (base::StartsWith(board, "link", base::CompareCase::SENSITIVE) || 41 if (base::StartsWith(board, "link", base::CompareCase::SENSITIVE) ||
42 base::StartsWith(board, "veyron_minnie", base::CompareCase::SENSITIVE) || 42 base::StartsWith(board, "veyron_minnie", base::CompareCase::SENSITIVE) ||
43 base::StartsWith(board, "samus", base::CompareCase::SENSITIVE)) { 43 base::StartsWith(board, "samus", base::CompareCase::SENSITIVE)) {
44 return Mode::MATERIAL_HYBRID; 44 return Mode::MATERIAL_HYBRID;
45 } 45 }
46 return Mode::MATERIAL_NORMAL; 46 return Mode::MATERIAL_NORMAL;
47 #elif defined(OS_LINUX)
48 return Mode::MATERIAL_NORMAL;
47 #else 49 #else
48 return Mode::NON_MATERIAL; 50 return Mode::NON_MATERIAL;
49 #endif // defined(OS_CHROMEOS) 51 #endif // defined(OS_CHROMEOS)
50 } 52 }
51 53
52 void MaterialDesignController::InitializeMode() { 54 void MaterialDesignController::InitializeMode() {
53 #if !defined(ENABLE_TOPCHROME_MD) 55 #if !defined(ENABLE_TOPCHROME_MD)
54 SetMode(Mode::NON_MATERIAL); 56 SetMode(Mode::NON_MATERIAL);
55 #else 57 #else
56 const std::string switch_value = 58 const std::string switch_value =
(...skipping 22 matching lines...) Expand all
79 MaterialDesignController::Mode::NON_MATERIAL); 81 MaterialDesignController::Mode::NON_MATERIAL);
80 is_mode_initialized_ = false; 82 is_mode_initialized_ = false;
81 } 83 }
82 84
83 void MaterialDesignController::SetMode(MaterialDesignController::Mode mode) { 85 void MaterialDesignController::SetMode(MaterialDesignController::Mode mode) {
84 mode_ = mode; 86 mode_ = mode;
85 is_mode_initialized_ = true; 87 is_mode_initialized_ = true;
86 } 88 }
87 89
88 } // namespace ui 90 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698