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

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 the badge not showing issue. 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
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..417d6890523e498d4c23cb4236dc795980abbe46 100644
--- a/chrome/browser/ui/app_list/search/search_controller_factory.cc
+++ b/chrome/browser/ui/app_list/search/search_controller_factory.cc
@@ -16,6 +16,7 @@
#include "chrome/browser/ui/app_list/search/answer_card/answer_card_search_provider.h"
#include "chrome/browser/ui/app_list/search/answer_card/answer_card_web_contents.h"
#include "chrome/browser/ui/app_list/search/app_search_provider.h"
+#include "chrome/browser/ui/app_list/search/arc/arc_playstore_search_provider.h"
#include "chrome/browser/ui/app_list/search/history_factory.h"
#include "chrome/browser/ui/app_list/search/launcher_search/launcher_search_provider.h"
#include "chrome/browser/ui/app_list/search/omnibox_provider.h"
@@ -35,6 +36,7 @@ namespace {
// Maximum number of results to show in each mixer group.
constexpr size_t kMaxAppsGroupResults = 8;
constexpr size_t kMaxOmniboxResults = 4;
+constexpr size_t kMaxPlayStoreResults = 2;
constexpr size_t kMaxWebstoreResults = 2;
constexpr size_t kMaxSuggestionsResults = 6;
constexpr size_t kMaxLauncherSearchResults = 2;
@@ -113,6 +115,13 @@ std::unique_ptr<SearchController> CreateSearchController(
base::MakeUnique<LauncherSearchProvider>(profile));
}
+#if defined(OS_CHROMEOS)
xiyuan 2017/06/23 19:57:39 Is this necessary? If it is, we need to put header
Jiaquan He 2017/06/23 21:10:32 Done.
+ 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;
}

Powered by Google App Engine
This is Rietveld 408576698