Refactoring of SessionService into a component part 3.
[chromium-blink-merge.git] / ui / base / ui_base_switches_util.cc
blob58b85c7ab4639bb56a0d943dad2dbc3bea0b4745
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
3 // found in the LICENSE file.
5 #include "ui/base/ui_base_switches_util.h"
7 #include "base/command_line.h"
8 #include "ui/base/ui_base_switches.h"
10 namespace switches {
12 bool IsTextInputFocusManagerEnabled() {
13 return CommandLine::ForCurrentProcess()->HasSwitch(
14 switches::kEnableTextInputFocusManager);
17 bool IsTouchDragDropEnabled() {
18 #if defined(OS_CHROMEOS)
19 return !CommandLine::ForCurrentProcess()->HasSwitch(
20 switches::kDisableTouchDragDrop);
21 #else
22 return CommandLine::ForCurrentProcess()->HasSwitch(
23 switches::kEnableTouchDragDrop);
24 #endif
27 bool IsTouchEditingEnabled() {
28 #if defined(USE_AURA)
29 return !CommandLine::ForCurrentProcess()->HasSwitch(
30 switches::kDisableTouchEditing);
31 #else
32 return CommandLine::ForCurrentProcess()->HasSwitch(
33 switches::kEnableTouchEditing);
34 #endif
37 bool IsTouchFeedbackEnabled() {
38 static bool touch_feedback_enabled = CommandLine::ForCurrentProcess()->
39 HasSwitch(switches::kEnableTouchFeedback);
40 return touch_feedback_enabled;
43 } // namespace switches