Index: ui/keyboard/keyboard_util.cc |
diff --git a/ui/keyboard/keyboard_util.cc b/ui/keyboard/keyboard_util.cc |
index 93ac035cf6eca35910eb2e62313e1a84320b197e..3d1f6f18fc31596c1dda08abb3b1309fa4cb5ff9 100644 |
--- a/ui/keyboard/keyboard_util.cc |
+++ b/ui/keyboard/keyboard_util.cc |
@@ -165,14 +165,8 @@ void SetKeyboardShowOverride(KeyboardShowOverride override) { |
} |
bool IsInputViewEnabled() { |
- if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
- switches::kEnableInputView)) |
- return true; |
- if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
- switches::kDisableInputView)) |
- return false; |
- // Default value if no command line flags specified. |
- return true; |
+ return !base::CommandLine::ForCurrentProcess()->HasSwitch( |
+ switches::kDisableInputView); |
} |
bool IsExperimentalInputViewEnabled() { |
@@ -181,30 +175,23 @@ bool IsExperimentalInputViewEnabled() { |
} |
bool IsFloatingVirtualKeyboardEnabled() { |
- std::string floating_virtual_keyboard_switch = |
- base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
- switches::kFloatingVirtualKeyboard); |
- return floating_virtual_keyboard_switch == |
- switches::kFloatingVirtualKeyboardEnabled; |
+ return base::CommandLine::ForCurrentProcess()->HasSwitch( |
+ switches::kEnableFloatingVirtualKeyboard); |
} |
bool IsGestureTypingEnabled() { |
- return base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
- switches::kGestureTyping) != switches::kGestureTypingDisabled; |
+ return !base::CommandLine::ForCurrentProcess()->HasSwitch( |
+ switches::kDisableGestureTyping); |
} |
bool IsGestureEditingEnabled() { |
- std::string keyboard_switch = |
- base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
- switches::kGestureEditing); |
- return keyboard_switch != switches::kGestureEditingDisabled; |
+ return !base::CommandLine::ForCurrentProcess()->HasSwitch( |
+ switches::kDisableGestureEditing); |
} |
bool IsSmartDeployEnabled() { |
- std::string keyboard_switch = |
- base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
- switches::kSmartVirtualKeyboard); |
- return keyboard_switch != switches::kSmartVirtualKeyboardDisabled; |
+ return !base::CommandLine::ForCurrentProcess()->HasSwitch( |
+ switches::kDisableSmartVirtualKeyboard); |
} |
bool IsVoiceInputEnabled() { |