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

Unified Diff: ui/base/material_design/material_design_controller.cc

Issue 1720273002: Set material hybrid by default on ChromeOS touch devices (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/material_design/material_design_controller.cc
diff --git a/ui/base/material_design/material_design_controller.cc b/ui/base/material_design/material_design_controller.cc
index baf4fa19dd1a6c432d185496e2509f1fd81fe719..4ed14b5f5f0c10a1b82a94516848d3731f200dcb 100644
--- a/ui/base/material_design/material_design_controller.cc
+++ b/ui/base/material_design/material_design_controller.cc
@@ -7,6 +7,7 @@
#include "base/command_line.h"
#include "base/logging.h"
#include "ui/base/material_design/material_design_controller.h"
+#include "ui/base/touch/touch_device.h"
#include "ui/base/ui_base_switches.h"
namespace ui {
@@ -30,6 +31,8 @@ bool MaterialDesignController::IsModeMaterial() {
MaterialDesignController::Mode MaterialDesignController::DefaultMode() {
#if defined(OS_CHROMEOS)
+ if (GetTouchScreensAvailability() == TouchScreensAvailability::ENABLED)
tdanderson 2016/02/22 23:47:40 Doesn't look like this will work as-is, since the
+ return Mode::MATERIAL_HYBRID;
return Mode::MATERIAL_NORMAL;
#else
return Mode::NON_MATERIAL;
« 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