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 #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 // Specifies the chrome-extension:// URL for the contents of an additional page | 13 // Specifies the chrome-extension:// URL for the contents of an additional page |
14 // added to the experimental app launcher. | 14 // added to the app launcher. |
15 const char kCustomLauncherPage[] = "custom-launcher-page"; | 15 const char kCustomLauncherPage[] = "custom-launcher-page"; |
16 | 16 |
17 // If set, the app list will not be dismissed when it loses focus. This is | 17 // If set, the app list will not be dismissed when it loses focus. This is |
18 // useful when testing the app list or a custom launcher page. It can still be | 18 // useful when testing the app list or a custom launcher page. It can still be |
19 // dismissed via the other methods (like the Esc key). | 19 // dismissed via the other methods (like the Esc key). |
20 const char kDisableAppListDismissOnBlur[] = "disable-app-list-dismiss-on-blur"; | 20 const char kDisableAppListDismissOnBlur[] = "disable-app-list-dismiss-on-blur"; |
21 | 21 |
22 // If set, the app list will be enabled as if enabled from CWS. | 22 // If set, the app list will be enabled as if enabled from CWS. |
23 const char kEnableAppList[] = "enable-app-list"; | 23 const char kEnableAppList[] = "enable-app-list"; |
24 | 24 |
(...skipping 28 matching lines...) Expand all Loading... |
53 | 53 |
54 bool IsVoiceSearchEnabled() { | 54 bool IsVoiceSearchEnabled() { |
55 // Speech recognition in AppList is only for ChromeOS right now. | 55 // Speech recognition in AppList is only for ChromeOS right now. |
56 #if defined(OS_CHROMEOS) | 56 #if defined(OS_CHROMEOS) |
57 return true; | 57 return true; |
58 #else | 58 #else |
59 return false; | 59 return false; |
60 #endif | 60 #endif |
61 } | 61 } |
62 | 62 |
63 bool IsExperimentalAppListEnabled() { | |
64 // TODO(mgiuca): Remove this function. (https://crbug.com/531059) | |
65 return true; | |
66 } | |
67 | |
68 bool IsCenteredAppListEnabled() { | |
69 // TODO(mgiuca): Remove this function. (https://crbug.com/531059) | |
70 return true; | |
71 } | |
72 | |
73 bool ShouldNotDismissOnBlur() { | 63 bool ShouldNotDismissOnBlur() { |
74 return base::CommandLine::ForCurrentProcess()->HasSwitch( | 64 return base::CommandLine::ForCurrentProcess()->HasSwitch( |
75 kDisableAppListDismissOnBlur); | 65 kDisableAppListDismissOnBlur); |
76 } | 66 } |
77 | 67 |
78 bool IsDriveAppsInAppListEnabled() { | 68 bool IsDriveAppsInAppListEnabled() { |
79 #if defined(OS_CHROMEOS) | 69 #if defined(OS_CHROMEOS) |
80 return true; | 70 return true; |
81 #else | 71 #else |
82 return false; | 72 return false; |
(...skipping 11 matching lines...) Expand all Loading... |
94 return false; | 84 return false; |
95 | 85 |
96 return true; | 86 return true; |
97 #else | 87 #else |
98 return false; | 88 return false; |
99 #endif | 89 #endif |
100 } | 90 } |
101 | 91 |
102 } // namespace switches | 92 } // namespace switches |
103 } // namespace app_list | 93 } // namespace app_list |
OLD | NEW |