| 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 { |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 #if defined(OS_MACOSX) | 45 #if defined(OS_MACOSX) |
| 46 // Enables use of the toolkit-views app list on Mac. | 46 // Enables use of the toolkit-views app list on Mac. |
| 47 const char kEnableMacViewsAppList[] = "enable-mac-views-app-list"; | 47 const char kEnableMacViewsAppList[] = "enable-mac-views-app-list"; |
| 48 #endif | 48 #endif |
| 49 | 49 |
| 50 bool IsAppListSyncEnabled() { | 50 bool IsAppListSyncEnabled() { |
| 51 #if defined(OS_MACOSX) | 51 #if defined(OS_MACOSX) |
| 52 if (base::CommandLine::ForCurrentProcess()->HasSwitch(kEnableSyncAppList)) | 52 if (base::CommandLine::ForCurrentProcess()->HasSwitch(kEnableSyncAppList)) |
| 53 return true; | 53 return true; |
| 54 | 54 |
| 55 if (!IsMacViewsAppListListEnabled()) | 55 if (!IsMacViewsAppListEnabled()) |
| 56 return false; | 56 return false; |
| 57 #endif | 57 #endif |
| 58 return !base::CommandLine::ForCurrentProcess()->HasSwitch( | 58 return !base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 59 kDisableSyncAppList); | 59 kDisableSyncAppList); |
| 60 } | 60 } |
| 61 | 61 |
| 62 bool IsFolderUIEnabled() { | 62 bool IsFolderUIEnabled() { |
| 63 // Folder UI is available only when AppList sync is enabled, and should | 63 // Folder UI is available only when AppList sync is enabled, and should |
| 64 // not be disabled separately. | 64 // not be disabled separately. |
| 65 return IsAppListSyncEnabled(); | 65 return IsAppListSyncEnabled(); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 bool IsLauncherSearchProviderApiEnabled() { | 113 bool IsLauncherSearchProviderApiEnabled() { |
| 114 #if defined(OS_CHROMEOS) | 114 #if defined(OS_CHROMEOS) |
| 115 return base::CommandLine::ForCurrentProcess()->HasSwitch( | 115 return base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 116 kEnableLauncherSearchProviderApi); | 116 kEnableLauncherSearchProviderApi); |
| 117 #else | 117 #else |
| 118 return false; | 118 return false; |
| 119 #endif | 119 #endif |
| 120 } | 120 } |
| 121 | 121 |
| 122 #if defined(OS_MACOSX) | 122 #if defined(OS_MACOSX) |
| 123 bool IsMacViewsAppListListEnabled() { | 123 bool IsMacViewsAppListEnabled() { |
| 124 #if defined(TOOLKIT_VIEWS) | 124 #if defined(TOOLKIT_VIEWS) |
| 125 return base::CommandLine::ForCurrentProcess()->HasSwitch( | 125 return base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 126 kEnableMacViewsAppList); | 126 kEnableMacViewsAppList); |
| 127 #endif | 127 #endif |
| 128 return false; | 128 return false; |
| 129 } | 129 } |
| 130 #endif // defined(OS_MACOSX) | 130 #endif // defined(OS_MACOSX) |
| 131 | 131 |
| 132 } // namespace switches | 132 } // namespace switches |
| 133 } // namespace app_list | 133 } // namespace app_list |
| OLD | NEW |