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 // Specifies the chrome-extension:// URL for the contents of an additional page | 12 // Specifies the chrome-extension:// URL for the contents of an additional page |
13 // added to the experimental app launcher. | 13 // added to the experimental app launcher. |
14 const char kCustomLauncherPage[] = "custom-launcher-page"; | 14 const char kCustomLauncherPage[] = "custom-launcher-page"; |
15 | 15 |
16 // If set, the app info context menu item is not available in the app list UI. | 16 // If set, the app info context menu item is not available in the app list UI. |
17 const char kDisableAppInfo[] = "disable-app-list-app-info"; | 17 const char kDisableAppInfo[] = "disable-app-list-app-info"; |
18 | 18 |
| 19 // If set, the app list will not be dismissed when it loses focus. This is |
| 20 // useful when testing the app list or a custom launcher page. It can still be |
| 21 // dismissed via the other methods (like the Esc key). |
| 22 const char kDisableAppListDismissOnBlur[] = "disable-app-list-dismiss-on-blur"; |
| 23 |
19 // If set, Drive apps will not be shown side-by-side with Chrome apps. | 24 // If set, Drive apps will not be shown side-by-side with Chrome apps. |
20 const char kDisableDriveAppsInAppList[] = "disable-drive-apps-in-app-list"; | 25 const char kDisableDriveAppsInAppList[] = "disable-drive-apps-in-app-list"; |
21 | 26 |
22 // Disables syncing of the app list independent of extensions. | 27 // Disables syncing of the app list independent of extensions. |
23 const char kDisableSyncAppList[] = "disable-sync-app-list"; | 28 const char kDisableSyncAppList[] = "disable-sync-app-list"; |
24 | 29 |
25 // If set, the app list will be centered and wide instead of tall. | 30 // If set, the app list will be centered and wide instead of tall. |
26 const char kEnableCenteredAppList[] = "enable-centered-app-list"; | 31 const char kEnableCenteredAppList[] = "enable-centered-app-list"; |
27 | 32 |
28 // If set, the experimental app list will be used. Implies | 33 // If set, the experimental app list will be used. Implies |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 bool IsExperimentalAppListEnabled() { | 74 bool IsExperimentalAppListEnabled() { |
70 return CommandLine::ForCurrentProcess()->HasSwitch( | 75 return CommandLine::ForCurrentProcess()->HasSwitch( |
71 kEnableExperimentalAppList); | 76 kEnableExperimentalAppList); |
72 } | 77 } |
73 | 78 |
74 bool IsCenteredAppListEnabled() { | 79 bool IsCenteredAppListEnabled() { |
75 return CommandLine::ForCurrentProcess()->HasSwitch(kEnableCenteredAppList) || | 80 return CommandLine::ForCurrentProcess()->HasSwitch(kEnableCenteredAppList) || |
76 IsExperimentalAppListEnabled(); | 81 IsExperimentalAppListEnabled(); |
77 } | 82 } |
78 | 83 |
| 84 bool ShouldNotDismissOnBlur() { |
| 85 return CommandLine::ForCurrentProcess()->HasSwitch( |
| 86 kDisableAppListDismissOnBlur); |
| 87 } |
| 88 |
79 bool IsDriveAppsInAppListEnabled() { | 89 bool IsDriveAppsInAppListEnabled() { |
80 #if defined(OS_CHROMEOS) | 90 #if defined(OS_CHROMEOS) |
81 return !CommandLine::ForCurrentProcess()->HasSwitch( | 91 return !CommandLine::ForCurrentProcess()->HasSwitch( |
82 kDisableDriveAppsInAppList); | 92 kDisableDriveAppsInAppList); |
83 #else | 93 #else |
84 return false; | 94 return false; |
85 #endif | 95 #endif |
86 } | 96 } |
87 | 97 |
88 } // namespace switches | 98 } // namespace switches |
89 } // namespace app_list | 99 } // namespace app_list |
OLD | NEW |