Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Unified Diff: ui/keyboard/keyboard_util.cc

Issue 1488303005: Replace multi-value keyboard flags with single value flag types. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add new flags to histograms. Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/keyboard/keyboard_switches.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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() {
« no previous file with comments | « ui/keyboard/keyboard_switches.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698