OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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/app_list/app_list_switches.h" | 5 #include "ui/app_list/app_list_switches.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 | 8 |
9 namespace app_list { | 9 namespace app_list { |
10 namespace switches { | 10 namespace switches { |
11 | 11 |
12 // If set, folder will be disabled in app list UI. | 12 // If set, folder will be disabled in app list UI. |
13 const char kDisableFolderUI[] = "disable-app-list-folder-ui"; | 13 const char kDisableFolderUI[] = "disable-app-list-folder-ui"; |
14 | 14 |
15 // If set, the voice search is disabled in app list UI. | 15 // If set, the voice search is disabled in app list UI. |
16 const char kDisableVoiceSearch[] = "disable-app-list-voice-search"; | 16 const char kDisableVoiceSearch[] = "disable-app-list-voice-search"; |
17 | 17 |
18 // If set, the app info context menu item is available in the app list UI. | 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"; | 19 const char kEnableAppInfo[] = "enable-app-list-app-info"; |
20 | 20 |
21 // If set, the experimental app list will be used. | 21 // If set, the experimental app list will be used. |
22 const char kEnableExperimentalAppList[] = "enable-experimental-app-list"; | 22 const char kEnableExperimentalAppList[] = "enable-experimental-app-list"; |
23 | 23 |
24 // If set, the experimental app list position will be used. | 24 // If set, the experimental app list position will be used. |
25 const char kEnableExperimentalAppListPosition[] = | 25 const char kEnableExperimentalAppListPosition[] = |
26 "enable-experimental-app-list-position"; | 26 "enable-experimental-app-list-position"; |
27 | 27 |
| 28 // If set, folders will be enabled in the app list UI. |
| 29 const char kEnableFolderUI[] = "enable-app-list-folder-ui"; |
| 30 |
28 // If set, it will always listen to the audio locally and open the app-list | 31 // If set, it will always listen to the audio locally and open the app-list |
29 // when the hotword is recognized. | 32 // when the hotword is recognized. |
30 const char kEnableHotwordAlwaysOn[] = "enable-app-list-hotword-always-on"; | 33 const char kEnableHotwordAlwaysOn[] = "enable-app-list-hotword-always-on"; |
31 | 34 |
32 // Folder UI is enabled by default. | |
33 bool IsFolderUIEnabled() { | 35 bool IsFolderUIEnabled() { |
34 #if !defined(OS_MACOSX) | 36 #if defined(OS_CHROMEOS) |
| 37 // The folder UI is enabled by default on ChromeOS. |
35 return !CommandLine::ForCurrentProcess()->HasSwitch(kDisableFolderUI); | 38 return !CommandLine::ForCurrentProcess()->HasSwitch(kDisableFolderUI); |
36 #else | 39 #else |
37 return false; | 40 // The folder UI is disabled by default for Max, Windows and Linux. |
| 41 return CommandLine::ForCurrentProcess()->HasSwitch(kEnableFolderUI); |
38 #endif | 42 #endif |
39 } | 43 } |
40 | 44 |
41 bool IsVoiceSearchEnabled() { | 45 bool IsVoiceSearchEnabled() { |
42 // Speech recognition in AppList is only for ChromeOS right now. | 46 // Speech recognition in AppList is only for ChromeOS right now. |
43 #if defined(OS_CHROMEOS) | 47 #if defined(OS_CHROMEOS) |
44 return !CommandLine::ForCurrentProcess()->HasSwitch(kDisableVoiceSearch); | 48 return !CommandLine::ForCurrentProcess()->HasSwitch(kDisableVoiceSearch); |
45 #else | 49 #else |
46 return false; | 50 return false; |
47 #endif | 51 #endif |
(...skipping 18 matching lines...) Expand all Loading... |
66 } | 70 } |
67 | 71 |
68 bool IsExperimentalAppListPositionEnabled() { | 72 bool IsExperimentalAppListPositionEnabled() { |
69 return CommandLine::ForCurrentProcess()->HasSwitch( | 73 return CommandLine::ForCurrentProcess()->HasSwitch( |
70 kEnableExperimentalAppListPosition) || | 74 kEnableExperimentalAppListPosition) || |
71 IsExperimentalAppListEnabled(); | 75 IsExperimentalAppListEnabled(); |
72 } | 76 } |
73 | 77 |
74 } // namespace switches | 78 } // namespace switches |
75 } // namespace app_list | 79 } // namespace app_list |
OLD | NEW |