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 "build/build_config.h" | 8 #include "build/build_config.h" |
9 #include "ui/base/ui_base_switches.h" | 9 #include "ui/base/ui_base_switches.h" |
10 | 10 |
11 namespace switches { | 11 namespace switches { |
12 | 12 |
13 bool IsLinkDisambiguationPopupEnabled() { | |
14 #if defined(OS_ANDROID) | |
15 return true; | |
16 #else | |
17 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | |
18 switches::kEnableLinkDisambiguationPopup)) { | |
19 return true; | |
20 } | |
21 return false; | |
22 #endif | |
23 } | |
24 | |
25 bool IsTouchDragDropEnabled() { | 13 bool IsTouchDragDropEnabled() { |
26 #if defined(OS_CHROMEOS) | 14 #if defined(OS_CHROMEOS) |
27 return !base::CommandLine::ForCurrentProcess()->HasSwitch( | 15 return !base::CommandLine::ForCurrentProcess()->HasSwitch( |
28 switches::kDisableTouchDragDrop); | 16 switches::kDisableTouchDragDrop); |
29 #else | 17 #else |
30 return base::CommandLine::ForCurrentProcess()->HasSwitch( | 18 return base::CommandLine::ForCurrentProcess()->HasSwitch( |
31 switches::kEnableTouchDragDrop); | 19 switches::kEnableTouchDragDrop); |
32 #endif | 20 #endif |
33 } | 21 } |
34 | 22 |
35 bool IsTouchFeedbackEnabled() { | 23 bool IsTouchFeedbackEnabled() { |
36 static bool touch_feedback_enabled = | 24 static bool touch_feedback_enabled = |
37 !base::CommandLine::ForCurrentProcess()->HasSwitch( | 25 !base::CommandLine::ForCurrentProcess()->HasSwitch( |
38 switches::kDisableTouchFeedback); | 26 switches::kDisableTouchFeedback); |
39 return touch_feedback_enabled; | 27 return touch_feedback_enabled; |
40 } | 28 } |
41 | 29 |
42 } // namespace switches | 30 } // namespace switches |
OLD | NEW |