Index: chrome/browser/ui/app_list/search/playstore/playstore_search_provider.h |
diff --git a/chrome/browser/ui/app_list/search/playstore/playstore_search_provider.h b/chrome/browser/ui/app_list/search/playstore/playstore_search_provider.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..53fd13214c8196d3f3bc272341b1a75df4945a04 |
--- /dev/null |
+++ b/chrome/browser/ui/app_list/search/playstore/playstore_search_provider.h |
@@ -0,0 +1,47 @@ |
+// Copyright 2017 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_UI_APP_LIST_SEARCH_PLAYSTORE_PLAYSTORE_SEARCH_PROVIDER_H_ |
+#define CHROME_BROWSER_UI_APP_LIST_SEARCH_PLAYSTORE_PLAYSTORE_SEARCH_PROVIDER_H_ |
+ |
+#include <memory> |
+#include <vector> |
+ |
+#include "components/arc/common/app.mojom.h" |
+#include "ui/app_list/search_provider.h" |
+ |
+class Profile; |
+class AppListControllerDelegate; |
+ |
+namespace app_list { |
+ |
+class PlayStoreSearchProvider : public SearchProvider { |
+ public: |
+ PlayStoreSearchProvider(int max_results, |
+ Profile* profile, |
+ AppListControllerDelegate* list_controller); |
+ ~PlayStoreSearchProvider() override; |
+ |
+ protected: |
+ // app_list::SearchProvider overrides; |
+ void Start(bool is_voice_query, const base::string16& query) override; |
+ void Stop() override; |
+ |
+ private: |
+ void OnResults(std::vector<std::unique_ptr<PlayStoreSearchResult>> results); |
+ |
+ const int max_results_; |
+ // |profile_| is owned by ProfileInfo. |
+ Profile* const profile_; |
+ // list_controller_ is owned by AppListServiceAsh and lives |
+ // until the service finishes. |
+ AppListControllerDelegate* const list_controller_; |
+ base::WeakPtrFactory<PlayStoreSearchProvider> weak_ptr_factory_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(PlayStoreSearchProvider); |
+}; |
+ |
+} // namespace app_list |
+ |
+#endif // CHROME_BROWSER_UI_APP_LIST_SEARCH_PLAYSTORE_PLAYSTORE_SEARCH_PROVIDER_H_ |