| OLD | NEW |
| 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 "base/trace_event/trace_event.h" | 9 #include "base/trace_event/trace_event.h" |
| 10 #include "ui/base/material_design/material_design_controller.h" | 10 #include "ui/base/material_design/material_design_controller.h" |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 if (fd >= 0) { | 100 if (fd >= 0) { |
| 101 if (devinfo.Initialize(fd, path) && devinfo.HasTouchscreen()) { | 101 if (devinfo.Initialize(fd, path) && devinfo.HasTouchscreen()) { |
| 102 close(fd); | 102 close(fd); |
| 103 return MATERIAL_HYBRID; | 103 return MATERIAL_HYBRID; |
| 104 } | 104 } |
| 105 close(fd); | 105 close(fd); |
| 106 } | 106 } |
| 107 } | 107 } |
| 108 #endif // defined(USE_OZONE) | 108 #endif // defined(USE_OZONE) |
| 109 return MATERIAL_NORMAL; | 109 return MATERIAL_NORMAL; |
| 110 #elif defined(OS_LINUX) | 110 #elif defined(OS_LINUX) || defined(OS_MACOSX) |
| 111 return MATERIAL_NORMAL; | 111 return MATERIAL_NORMAL; |
| 112 #else | 112 #else |
| 113 return NON_MATERIAL; | 113 return NON_MATERIAL; |
| 114 #endif // defined(OS_CHROMEOS) | 114 #endif // defined(OS_CHROMEOS) |
| 115 } | 115 } |
| 116 | 116 |
| 117 // static | 117 // static |
| 118 void MaterialDesignController::Uninitialize() { | 118 void MaterialDesignController::Uninitialize() { |
| 119 is_mode_initialized_ = false; | 119 is_mode_initialized_ = false; |
| 120 } | 120 } |
| 121 | 121 |
| 122 // static | 122 // static |
| 123 void MaterialDesignController::SetMode(MaterialDesignController::Mode mode) { | 123 void MaterialDesignController::SetMode(MaterialDesignController::Mode mode) { |
| 124 mode_ = mode; | 124 mode_ = mode; |
| 125 is_mode_initialized_ = true; | 125 is_mode_initialized_ = true; |
| 126 } | 126 } |
| 127 | 127 |
| 128 } // namespace ui | 128 } // namespace ui |
| OLD | NEW |