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

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

Issue 2933673002: Preparing to making answer-card independent of fullscreen. (Closed)
Patch Set: CR comments Created 3 years, 6 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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_features.h" 5 #include "ui/app_list/app_list_features.h"
6 6
7 #include "base/feature_list.h" 7 #include "base/feature_list.h"
8 #include "base/metrics/field_trial_params.h" 8 #include "base/metrics/field_trial_params.h"
9 9
10 namespace app_list { 10 namespace app_list {
(...skipping 15 matching lines...) Expand all
26 static const bool enabled = 26 static const bool enabled =
27 base::FeatureList::IsEnabled(kEnableAnswerCardDarkRun); 27 base::FeatureList::IsEnabled(kEnableAnswerCardDarkRun);
28 return enabled; 28 return enabled;
29 } 29 }
30 30
31 bool IsFullscreenAppListEnabled() { 31 bool IsFullscreenAppListEnabled() {
32 // Not using local static variable to allow tests to change this value. 32 // Not using local static variable to allow tests to change this value.
33 return base::FeatureList::IsEnabled(kEnableFullscreenAppList); 33 return base::FeatureList::IsEnabled(kEnableFullscreenAppList);
34 } 34 }
35 35
36 bool IsSearchResultsNewDesignEnabled() {
37 return IsFullscreenAppListEnabled() ||
38 (IsAnswerCardEnabled() && !IsAnswerCardDarkRunEnabled());
39 }
40
36 int APP_LIST_EXPORT AnswerCardMaxWidth() { 41 int APP_LIST_EXPORT AnswerCardMaxWidth() {
37 static const int max_width = base::GetFieldTrialParamByFeatureAsInt( 42 static const int max_width = base::GetFieldTrialParamByFeatureAsInt(
38 kEnableAnswerCard, "CardMaxWidth", 608); 43 kEnableAnswerCard, "CardMaxWidth", 608);
39 return max_width; 44 return max_width;
40 } 45 }
41 46
42 int APP_LIST_EXPORT AnswerCardMaxHeight() { 47 int APP_LIST_EXPORT AnswerCardMaxHeight() {
43 static const int max_height = base::GetFieldTrialParamByFeatureAsInt( 48 static const int max_height = base::GetFieldTrialParamByFeatureAsInt(
44 kEnableAnswerCard, "CardMaxHeight", 266); 49 kEnableAnswerCard, "CardMaxHeight", 266);
45 return max_height; 50 return max_height;
46 } 51 }
47 52
48 std::string AnswerServerUrl() { 53 std::string AnswerServerUrl() {
49 return base::GetFieldTrialParamValueByFeature(kEnableAnswerCard, "ServerUrl"); 54 return base::GetFieldTrialParamValueByFeature(kEnableAnswerCard, "ServerUrl");
50 } 55 }
51 56
52 } // namespace features 57 } // namespace features
53 } // namespace app_list 58 } // namespace app_list
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698