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

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

Issue 263883002: Renamed app list position flag to --enable-centered-app-list. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
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 // If set, the app list will be centered and wide instead of tall.
13 const char kCenterAppList[] = "center-app-list";
14
12 // Disables syncing of the app list independent of extensions. 15 // Disables syncing of the app list independent of extensions.
13 const char kDisableSyncAppList[] = "disable-sync-app-list"; 16 const char kDisableSyncAppList[] = "disable-sync-app-list";
14 17
15 // If set, the voice search is disabled in app list UI. 18 // If set, the voice search is disabled in app list UI.
16 const char kDisableVoiceSearch[] = "disable-app-list-voice-search"; 19 const char kDisableVoiceSearch[] = "disable-app-list-voice-search";
17 20
18 // If set, the app info context menu item is available in the app list UI. 21 // If set, the app info context menu item is available in the app list UI.
19 const char kEnableAppInfo[] = "enable-app-list-app-info"; 22 const char kEnableAppInfo[] = "enable-app-list-app-info";
20 23
21 // If set, the experimental app list will be used. 24 // If set, the experimental app list will be used. Implies --center-app-list.
22 const char kEnableExperimentalAppList[] = "enable-experimental-app-list"; 25 const char kEnableExperimentalAppList[] = "enable-experimental-app-list";
23 26
24 // If set, the experimental app list position will be used.
25 const char kEnableExperimentalAppListPosition[] =
26 "enable-experimental-app-list-position";
27
28 // Enables syncing of the app list independent of extensions. 27 // Enables syncing of the app list independent of extensions.
29 const char kEnableSyncAppList[] = "enable-sync-app-list"; 28 const char kEnableSyncAppList[] = "enable-sync-app-list";
30 29
31 bool IsAppListSyncEnabled() { 30 bool IsAppListSyncEnabled() {
32 #if defined(TOOLKIT_VIEWS) 31 #if defined(TOOLKIT_VIEWS)
33 return !CommandLine::ForCurrentProcess()->HasSwitch(kDisableSyncAppList); 32 return !CommandLine::ForCurrentProcess()->HasSwitch(kDisableSyncAppList);
34 #else 33 #else
35 return CommandLine::ForCurrentProcess()->HasSwitch(kEnableSyncAppList); 34 return CommandLine::ForCurrentProcess()->HasSwitch(kEnableSyncAppList);
36 #endif 35 #endif
37 } 36 }
(...skipping 18 matching lines...) Expand all
56 55
57 bool IsAppInfoEnabled() { 56 bool IsAppInfoEnabled() {
58 return CommandLine::ForCurrentProcess()->HasSwitch(kEnableAppInfo); 57 return CommandLine::ForCurrentProcess()->HasSwitch(kEnableAppInfo);
59 } 58 }
60 59
61 bool IsExperimentalAppListEnabled() { 60 bool IsExperimentalAppListEnabled() {
62 return CommandLine::ForCurrentProcess()->HasSwitch( 61 return CommandLine::ForCurrentProcess()->HasSwitch(
63 kEnableExperimentalAppList); 62 kEnableExperimentalAppList);
64 } 63 }
65 64
66 bool IsExperimentalAppListPositionEnabled() { 65 bool IsAppListCentered() {
67 return CommandLine::ForCurrentProcess()->HasSwitch( 66 return CommandLine::ForCurrentProcess()->HasSwitch(kCenterAppList) ||
68 kEnableExperimentalAppListPosition) ||
69 IsExperimentalAppListEnabled(); 67 IsExperimentalAppListEnabled();
70 } 68 }
71 69
72 } // namespace switches 70 } // namespace switches
73 } // namespace app_list 71 } // namespace app_list
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698