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

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

Issue 2802903003: Implementation of a full screen app list and re-alphabetized switches (Closed)
Patch Set: Un-parameterized a bubble test, addressed comments, fixed merge conflicts, and fixed a typo! Created 3 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
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 #include "build/build_config.h" 8 #include "build/build_config.h"
9 9
10 namespace app_list { 10 namespace app_list {
11 namespace switches { 11 namespace switches {
12 12
13 // If empty, search answers in the app app list are disabled, otherwise the URL 13 // If empty, search answers in the app app list are disabled, otherwise the URL
14 // of the answer server. 14 // of the answer server.
15 const char kAnswerServerUrl[] = "answer-server-url"; 15 const char kAnswerServerUrl[] = "answer-server-url";
16 16
17 // Specifies the chrome-extension:// URL for the contents of an additional page 17 // Specifies the chrome-extension:// URL for the contents of an additional page
18 // added to the app launcher. 18 // added to the app launcher.
19 const char kCustomLauncherPage[] = "custom-launcher-page"; 19 const char kCustomLauncherPage[] = "custom-launcher-page";
20 20
21 // If set, the app list will not be dismissed when it loses focus. This is 21 // If set, the app list will not be dismissed when it loses focus. This is
22 // useful when testing the app list or a custom launcher page. It can still be 22 // useful when testing the app list or a custom launcher page. It can still be
23 // dismissed via the other methods (like the Esc key). 23 // dismissed via the other methods (like the Esc key).
24 const char kDisableAppListDismissOnBlur[] = "disable-app-list-dismiss-on-blur"; 24 const char kDisableAppListDismissOnBlur[] = "disable-app-list-dismiss-on-blur";
25 25
26 // If set, the app list will be enabled as if enabled from CWS. 26 // If set, the app list will be enabled as if enabled from CWS.
27 const char kEnableAppList[] = "enable-app-list"; 27 const char kEnableAppList[] = "enable-app-list";
28 28
29 // Enables the fullscreen app list.
30 extern const char kEnableFullscreenAppList[] = "enable-fullscreen-app-list";
31
29 // Enable/disable syncing of the app list independent of extensions. 32 // Enable/disable syncing of the app list independent of extensions.
30 const char kEnableSyncAppList[] = "enable-sync-app-list"; 33 const char kEnableSyncAppList[] = "enable-sync-app-list";
31 const char kDisableSyncAppList[] = "disable-sync-app-list"; 34 const char kDisableSyncAppList[] = "disable-sync-app-list";
32 35
33 // Enable/disable drive search in chrome launcher. 36 // Enable/disable drive search in chrome launcher.
34 const char kEnableDriveSearchInChromeLauncher[] = 37 const char kEnableDriveSearchInChromeLauncher[] =
35 "enable-drive-search-in-app-launcher"; 38 "enable-drive-search-in-app-launcher";
36 const char kDisableDriveSearchInChromeLauncher[] = 39 const char kDisableDriveSearchInChromeLauncher[] =
37 "disable-drive-search-in-app-launcher"; 40 "disable-drive-search-in-app-launcher";
38 41
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 83
81 std::string AnswerServerUrl() { 84 std::string AnswerServerUrl() {
82 return base::CommandLine::ForCurrentProcess()->GetSwitchValueNative( 85 return base::CommandLine::ForCurrentProcess()->GetSwitchValueNative(
83 kAnswerServerUrl); 86 kAnswerServerUrl);
84 } 87 }
85 88
86 bool IsAnswerCardEnabled() { 89 bool IsAnswerCardEnabled() {
87 return !AnswerServerUrl().empty(); 90 return !AnswerServerUrl().empty();
88 } 91 }
89 92
93 void SetFullscreenAppListSwitch() {
sky 2017/04/21 21:02:38 Is there a reason you have this here rather than i
newcomer 2017/04/21 22:44:15 My reason is that usually setters/getters are near
sky 2017/04/21 23:05:40 As this code should only be used in tests, not pro
newcomer 2017/04/25 00:16:00 Done.
94 base::CommandLine::ForCurrentProcess()->AppendSwitch(
95 kEnableFullscreenAppList);
96 }
97
98 bool IsFullscreenAppListEnabled() {
99 return base::CommandLine::ForCurrentProcess()->HasSwitch(
100 kEnableFullscreenAppList);
101 }
102
90 } // namespace switches 103 } // namespace switches
91 } // namespace app_list 104 } // namespace app_list
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698