| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "ui/base/ui_base_switches_util.h" | 5 #include "ui/base/ui_base_switches_util.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "ui/base/ui_base_switches.h" | 8 #include "ui/base/ui_base_switches.h" |
| 9 | 9 |
| 10 using base::CommandLine; | 10 using base::CommandLine; |
| 11 | 11 |
| 12 namespace switches { | 12 namespace switches { |
| 13 | 13 |
| 14 bool IsTextInputFocusManagerEnabled() { | 14 bool IsTextInputFocusManagerEnabled() { |
| 15 return CommandLine::ForCurrentProcess()->HasSwitch( | 15 return CommandLine::ForCurrentProcess()->HasSwitch( |
| 16 switches::kEnableTextInputFocusManager); | 16 switches::kEnableTextInputFocusManager); |
| 17 } | 17 } |
| 18 | 18 |
| 19 bool IsTouchDragDropEnabled() { | 19 bool IsTouchDragDropEnabled() { |
| 20 #if defined(OS_CHROMEOS) | 20 #if defined(OS_CHROMEOS) |
| 21 return !CommandLine::ForCurrentProcess()->HasSwitch( | 21 return !CommandLine::ForCurrentProcess()->HasSwitch( |
| 22 switches::kDisableTouchDragDrop); | 22 switches::kDisableTouchDragDrop); |
| 23 #else | 23 #else |
| 24 return CommandLine::ForCurrentProcess()->HasSwitch( | 24 return CommandLine::ForCurrentProcess()->HasSwitch( |
| 25 switches::kEnableTouchDragDrop); | 25 switches::kEnableTouchDragDrop); |
| 26 #endif | 26 #endif |
| 27 } | 27 } |
| 28 | 28 |
| 29 bool IsTouchEditingEnabled() { | 29 bool IsTouchEditingEnabled() { |
| 30 #if defined(USE_AURA) | |
| 31 return !CommandLine::ForCurrentProcess()->HasSwitch( | |
| 32 switches::kDisableTouchEditing); | |
| 33 #else | |
| 34 return CommandLine::ForCurrentProcess()->HasSwitch( | 30 return CommandLine::ForCurrentProcess()->HasSwitch( |
| 35 switches::kEnableTouchEditing); | 31 switches::kEnableTouchEditing); |
| 36 #endif | |
| 37 } | 32 } |
| 38 | 33 |
| 39 bool IsTouchFeedbackEnabled() { | 34 bool IsTouchFeedbackEnabled() { |
| 40 static bool touch_feedback_enabled = CommandLine::ForCurrentProcess()-> | 35 static bool touch_feedback_enabled = CommandLine::ForCurrentProcess()-> |
| 41 HasSwitch(switches::kEnableTouchFeedback); | 36 HasSwitch(switches::kEnableTouchFeedback); |
| 42 return touch_feedback_enabled; | 37 return touch_feedback_enabled; |
| 43 } | 38 } |
| 44 | 39 |
| 45 } // namespace switches | 40 } // namespace switches |
| OLD | NEW |