1 // Copyright 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/app_list/app_list_switches.h"
7 #include "base/command_line.h"
12 // If set, folder will be disabled in app list UI.
13 const char kDisableFolderUI[] = "disable-app-list-folder-ui";
15 // If set, the voice search is disabled in app list UI.
16 const char kDisableVoiceSearch[] = "disable-app-list-voice-search";
18 // If set, the app info context menu item is available in the app list UI.
19 const char kEnableAppInfo[] = "enable-app-list-app-info";
21 // If set, the experimental app list will be used.
22 const char kEnableExperimentalAppList[] = "enable-experimental-app-list";
24 // If set, the experimental app list position will be used.
25 const char kEnableExperimentalAppListPosition[] =
26 "enable-experimental-app-list-position";
28 // If set, it will always listen to the audio locally and open the app-list
29 // when the hotword is recognized.
30 const char kEnableHotwordAlwaysOn[] = "enable-app-list-hotword-always-on";
32 // Folder UI is enabled by default.
33 bool IsFolderUIEnabled() {
34 return !CommandLine::ForCurrentProcess()->HasSwitch(kDisableFolderUI);
37 bool IsVoiceSearchEnabled() {
38 // Speech recognition in AppList is only for ChromeOS right now.
39 #if defined(OS_CHROMEOS)
40 return !CommandLine::ForCurrentProcess()->HasSwitch(kDisableVoiceSearch);
46 bool IsHotwordAlwaysOnEnabled() {
47 #if defined(OS_CHROMEOS)
48 return IsVoiceSearchEnabled() &&
49 CommandLine::ForCurrentProcess()->HasSwitch(kEnableHotwordAlwaysOn);
55 bool IsAppInfoEnabled() {
56 return CommandLine::ForCurrentProcess()->HasSwitch(kEnableAppInfo);
59 bool IsExperimentalAppListEnabled() {
60 return CommandLine::ForCurrentProcess()->HasSwitch(
61 kEnableExperimentalAppList);
64 bool IsExperimentalAppListPositionEnabled() {
65 return CommandLine::ForCurrentProcess()->HasSwitch(
66 kEnableExperimentalAppListPosition) ||
67 IsExperimentalAppListEnabled();
70 } // namespace switches
71 } // namespace app_list