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

Side by Side Diff: ui/app_list/app_list_switches.cc

Issue 217423002: Removes Experimental hotword-always-on feature. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 8 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/app_list/app_list_switches.h ('k') | ui/app_list/views/app_list_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // Disables syncing of the app list independent of extensions. 12 // Disables syncing of the app list independent of extensions.
13 const char kDisableSyncAppList[] = "disable-sync-app-list"; 13 const char kDisableSyncAppList[] = "disable-sync-app-list";
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, 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";
31
32 // Enables syncing of the app list independent of extensions. 28 // Enables syncing of the app list independent of extensions.
33 const char kEnableSyncAppList[] = "enable-sync-app-list"; 29 const char kEnableSyncAppList[] = "enable-sync-app-list";
34 30
35 bool IsAppListSyncEnabled() { 31 bool IsAppListSyncEnabled() {
36 #if defined(OS_CHROMEOS) 32 #if defined(OS_CHROMEOS)
37 return !CommandLine::ForCurrentProcess()->HasSwitch(kDisableSyncAppList); 33 return !CommandLine::ForCurrentProcess()->HasSwitch(kDisableSyncAppList);
38 #else 34 #else
39 return CommandLine::ForCurrentProcess()->HasSwitch(kEnableSyncAppList); 35 return CommandLine::ForCurrentProcess()->HasSwitch(kEnableSyncAppList);
40 #endif 36 #endif
41 } 37 }
42 38
43 bool IsFolderUIEnabled() { 39 bool IsFolderUIEnabled() {
44 #if defined(OS_MACOSX) 40 #if defined(OS_MACOSX)
45 return false; // Folder UI not implemented for OSX 41 return false; // Folder UI not implemented for OSX
46 #endif 42 #endif
47 // Folder UI is available only when AppList sync is enabled, and should 43 // Folder UI is available only when AppList sync is enabled, and should
48 // not be disabled separately. 44 // not be disabled separately.
49 return IsAppListSyncEnabled(); 45 return IsAppListSyncEnabled();
50 } 46 }
51 47
52 bool IsVoiceSearchEnabled() { 48 bool IsVoiceSearchEnabled() {
53 // Speech recognition in AppList is only for ChromeOS right now. 49 // Speech recognition in AppList is only for ChromeOS right now.
54 #if defined(OS_CHROMEOS) 50 #if defined(OS_CHROMEOS)
55 return !CommandLine::ForCurrentProcess()->HasSwitch(kDisableVoiceSearch); 51 return !CommandLine::ForCurrentProcess()->HasSwitch(kDisableVoiceSearch);
56 #else 52 #else
57 return false; 53 return false;
58 #endif 54 #endif
59 } 55 }
60 56
61 bool IsHotwordAlwaysOnEnabled() {
62 #if defined(OS_CHROMEOS)
63 return IsVoiceSearchEnabled() &&
64 CommandLine::ForCurrentProcess()->HasSwitch(kEnableHotwordAlwaysOn);
65 #else
66 return false;
67 #endif
68 }
69
70 bool IsAppInfoEnabled() { 57 bool IsAppInfoEnabled() {
71 return CommandLine::ForCurrentProcess()->HasSwitch(kEnableAppInfo); 58 return CommandLine::ForCurrentProcess()->HasSwitch(kEnableAppInfo);
72 } 59 }
73 60
74 bool IsExperimentalAppListEnabled() { 61 bool IsExperimentalAppListEnabled() {
75 return CommandLine::ForCurrentProcess()->HasSwitch( 62 return CommandLine::ForCurrentProcess()->HasSwitch(
76 kEnableExperimentalAppList); 63 kEnableExperimentalAppList);
77 } 64 }
78 65
79 bool IsExperimentalAppListPositionEnabled() { 66 bool IsExperimentalAppListPositionEnabled() {
80 return CommandLine::ForCurrentProcess()->HasSwitch( 67 return CommandLine::ForCurrentProcess()->HasSwitch(
81 kEnableExperimentalAppListPosition) || 68 kEnableExperimentalAppListPosition) ||
82 IsExperimentalAppListEnabled(); 69 IsExperimentalAppListEnabled();
83 } 70 }
84 71
85 } // namespace switches 72 } // namespace switches
86 } // namespace app_list 73 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/app_list_switches.h ('k') | ui/app_list/views/app_list_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698