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

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

Issue 2965813002: Added flag in chrome://flags to enable the New Launcher UI. (Closed)
Patch Set: Added flag to histograms/enums.xml Created 3 years, 5 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
« no previous file with comments | « ui/app_list/app_list_switches.h ('k') | no next file » | 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 // 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 app launcher. 13 // added to the app launcher.
14 const char kCustomLauncherPage[] = "custom-launcher-page"; 14 const char kCustomLauncherPage[] = "custom-launcher-page";
15 15
16 // If set, the app list will not be dismissed when it loses focus. This is 16 // If set, the app list will not be dismissed when it loses focus. This is
17 // useful when testing the app list or a custom launcher page. It can still be 17 // useful when testing the app list or a custom launcher page. It can still be
18 // dismissed via the other methods (like the Esc key). 18 // dismissed via the other methods (like the Esc key).
19 const char kDisableAppListDismissOnBlur[] = "disable-app-list-dismiss-on-blur"; 19 const char kDisableAppListDismissOnBlur[] = "disable-app-list-dismiss-on-blur";
20 20
21 // If set, the app list will be enabled as if enabled from CWS. 21 // If set, the app list will be enabled as if enabled from CWS.
22 const char kEnableAppList[] = "enable-app-list"; 22 const char kEnableAppList[] = "enable-app-list";
23 23
24 // If set, fullscreen app list will be enabled as if the feature flag was set.
25 const char kEnableFullscreenAppList[] = "enable-fullscreen-app-list";
26
24 // Enable/disable syncing of the app list independent of extensions. 27 // Enable/disable syncing of the app list independent of extensions.
25 const char kEnableSyncAppList[] = "enable-sync-app-list"; 28 const char kEnableSyncAppList[] = "enable-sync-app-list";
26 const char kDisableSyncAppList[] = "disable-sync-app-list"; 29 const char kDisableSyncAppList[] = "disable-sync-app-list";
27 30
28 // Enable/disable drive search in chrome launcher. 31 // Enable/disable drive search in chrome launcher.
29 const char kEnableDriveSearchInChromeLauncher[] = 32 const char kEnableDriveSearchInChromeLauncher[] =
30 "enable-drive-search-in-app-launcher"; 33 "enable-drive-search-in-app-launcher";
31 const char kDisableDriveSearchInChromeLauncher[] = 34 const char kDisableDriveSearchInChromeLauncher[] =
32 "disable-drive-search-in-app-launcher"; 35 "disable-drive-search-in-app-launcher";
33 36
34 // If set, the app list will forget it has been installed on startup. Note this 37 // If set, the app list will forget it has been installed on startup. Note this
35 // doesn't prevent the app list from running, it just makes Chrome think the app 38 // doesn't prevent the app list from running, it just makes Chrome think the app
36 // list hasn't been enabled (as in kEnableAppList) yet. 39 // list hasn't been enabled (as in kEnableAppList) yet.
37 const char kResetAppListInstallState[] = "reset-app-list-install-state"; 40 const char kResetAppListInstallState[] = "reset-app-list-install-state";
38 41
39 bool IsAppListSyncEnabled() { 42 bool IsAppListSyncEnabled() {
40 return !base::CommandLine::ForCurrentProcess()->HasSwitch( 43 return !base::CommandLine::ForCurrentProcess()->HasSwitch(
41 kDisableSyncAppList); 44 kDisableSyncAppList);
42 } 45 }
43 46
47 bool IsFullscreenAppListEnabled() {
48 return base::CommandLine::ForCurrentProcess()->HasSwitch(
49 kEnableFullscreenAppList);
50 }
51
44 bool IsFolderUIEnabled() { 52 bool IsFolderUIEnabled() {
45 // Folder UI is available only when AppList sync is enabled, and should 53 // Folder UI is available only when AppList sync is enabled, and should
46 // not be disabled separately. 54 // not be disabled separately.
47 return IsAppListSyncEnabled(); 55 return IsAppListSyncEnabled();
48 } 56 }
49 57
50 bool IsVoiceSearchEnabled() { 58 bool IsVoiceSearchEnabled() {
51 // Speech recognition in AppList is only for ChromeOS right now. 59 // Speech recognition in AppList is only for ChromeOS right now.
52 return true; 60 return true;
53 } 61 }
(...skipping 14 matching lines...) Expand all
68 76
69 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 77 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
70 kDisableDriveSearchInChromeLauncher)) 78 kDisableDriveSearchInChromeLauncher))
71 return false; 79 return false;
72 80
73 return true; 81 return true;
74 } 82 }
75 83
76 } // namespace switches 84 } // namespace switches
77 } // namespace app_list 85 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/app_list_switches.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698