| 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 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 | 9 |
| 10 namespace app_list { | 10 namespace app_list { |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 "enable-drive-search-in-app-launcher"; | 31 "enable-drive-search-in-app-launcher"; |
| 32 const char kDisableDriveSearchInChromeLauncher[] = | 32 const char kDisableDriveSearchInChromeLauncher[] = |
| 33 "disable-drive-search-in-app-launcher"; | 33 "disable-drive-search-in-app-launcher"; |
| 34 | 34 |
| 35 // If set, the app list will forget it has been installed on startup. Note this | 35 // If set, the app list will forget it has been installed on startup. Note this |
| 36 // doesn't prevent the app list from running, it just makes Chrome think the app | 36 // doesn't prevent the app list from running, it just makes Chrome think the app |
| 37 // list hasn't been enabled (as in kEnableAppList) yet. | 37 // list hasn't been enabled (as in kEnableAppList) yet. |
| 38 const char kResetAppListInstallState[] = "reset-app-list-install-state"; | 38 const char kResetAppListInstallState[] = "reset-app-list-install-state"; |
| 39 | 39 |
| 40 bool IsAppListSyncEnabled() { | 40 bool IsAppListSyncEnabled() { |
| 41 #if defined(OS_MACOSX) | |
| 42 return base::CommandLine::ForCurrentProcess()->HasSwitch(kEnableSyncAppList); | |
| 43 #endif | |
| 44 return !base::CommandLine::ForCurrentProcess()->HasSwitch( | 41 return !base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 45 kDisableSyncAppList); | 42 kDisableSyncAppList); |
| 46 } | 43 } |
| 47 | 44 |
| 48 bool IsFolderUIEnabled() { | 45 bool IsFolderUIEnabled() { |
| 49 // Folder UI is available only when AppList sync is enabled, and should | 46 // Folder UI is available only when AppList sync is enabled, and should |
| 50 // not be disabled separately. | 47 // not be disabled separately. |
| 51 return IsAppListSyncEnabled(); | 48 return IsAppListSyncEnabled(); |
| 52 } | 49 } |
| 53 | 50 |
| 54 bool IsVoiceSearchEnabled() { | 51 bool IsVoiceSearchEnabled() { |
| 55 // Speech recognition in AppList is only for ChromeOS right now. | 52 // Speech recognition in AppList is only for ChromeOS right now. |
| 56 #if defined(OS_CHROMEOS) | |
| 57 return true; | 53 return true; |
| 58 #else | |
| 59 return false; | |
| 60 #endif | |
| 61 } | 54 } |
| 62 | 55 |
| 63 bool ShouldNotDismissOnBlur() { | 56 bool ShouldNotDismissOnBlur() { |
| 64 return base::CommandLine::ForCurrentProcess()->HasSwitch( | 57 return base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 65 kDisableAppListDismissOnBlur); | 58 kDisableAppListDismissOnBlur); |
| 66 } | 59 } |
| 67 | 60 |
| 68 bool IsDriveAppsInAppListEnabled() { | 61 bool IsDriveAppsInAppListEnabled() { |
| 69 #if defined(OS_CHROMEOS) | |
| 70 return true; | 62 return true; |
| 71 #else | |
| 72 return false; | |
| 73 #endif | |
| 74 } | 63 } |
| 75 | 64 |
| 76 bool IsDriveSearchInChromeLauncherEnabled() { | 65 bool IsDriveSearchInChromeLauncherEnabled() { |
| 77 #if defined(OS_CHROMEOS) | |
| 78 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 66 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 79 kEnableDriveSearchInChromeLauncher)) | 67 kEnableDriveSearchInChromeLauncher)) |
| 80 return true; | 68 return true; |
| 81 | 69 |
| 82 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 70 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 83 kDisableDriveSearchInChromeLauncher)) | 71 kDisableDriveSearchInChromeLauncher)) |
| 84 return false; | 72 return false; |
| 85 | 73 |
| 86 return true; | 74 return true; |
| 87 #else | |
| 88 return false; | |
| 89 #endif | |
| 90 } | 75 } |
| 91 | 76 |
| 92 } // namespace switches | 77 } // namespace switches |
| 93 } // namespace app_list | 78 } // namespace app_list |
| OLD | NEW |