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

Unified Diff: chrome/browser/ui/app_list/search/search_controller_factory.cc

Issue 2929273002: Add the Play Store app search to the launcher. (Closed)
Patch Set: Fix unittest build failure. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/app_list/search/arc_app_result.cc ('k') | components/arc/common/app.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/app_list/search/search_controller_factory.cc
diff --git a/chrome/browser/ui/app_list/search/search_controller_factory.cc b/chrome/browser/ui/app_list/search/search_controller_factory.cc
index b0d21a3b1c2e7e45f901b98c894530bc6b369cf2..dfa37ec648e4876edff6a48dd28ffcae9b56a110 100644
--- a/chrome/browser/ui/app_list/search/search_controller_factory.cc
+++ b/chrome/browser/ui/app_list/search/search_controller_factory.cc
@@ -28,6 +28,10 @@
#include "ui/app_list/search/mixer.h"
#include "ui/app_list/search_controller.h"
+#if defined(OS_CHROMEOS)
+#include "chrome/browser/ui/app_list/search/arc/arc_playstore_search_provider.h"
+#endif
+
namespace app_list {
namespace {
@@ -38,6 +42,9 @@ constexpr size_t kMaxOmniboxResults = 4;
constexpr size_t kMaxWebstoreResults = 2;
constexpr size_t kMaxSuggestionsResults = 6;
constexpr size_t kMaxLauncherSearchResults = 2;
+#if defined(OS_CHROMEOS)
+constexpr size_t kMaxPlayStoreResults = 2;
+#endif
// Constants related to the SuggestionsService in AppList field trial.
constexpr char kSuggestionsProviderFieldTrialName[] =
@@ -113,6 +120,13 @@ std::unique_ptr<SearchController> CreateSearchController(
base::MakeUnique<LauncherSearchProvider>(profile));
}
+#if defined(OS_CHROMEOS)
+ size_t playstore_api_group_id =
+ controller->AddGroup(kMaxPlayStoreResults, 1.0);
+ controller->AddProvider(playstore_api_group_id,
+ base::MakeUnique<ArcPlayStoreSearchProvider>(
+ kMaxPlayStoreResults, profile, list_controller));
+#endif
return controller;
}
« no previous file with comments | « chrome/browser/ui/app_list/search/arc_app_result.cc ('k') | components/arc/common/app.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698