Index: chrome/browser/ui/app_list/search/playstore/playstore_search_result.h |
diff --git a/chrome/browser/ui/app_list/search/playstore/playstore_search_result.h b/chrome/browser/ui/app_list/search/playstore/playstore_search_result.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..920f83ba839cfa1d58df6dd83e83d64b2e599321 |
--- /dev/null |
+++ b/chrome/browser/ui/app_list/search/playstore/playstore_search_result.h |
@@ -0,0 +1,64 @@ |
+// 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_RESULT_H_ |
+#define CHROME_BROWSER_UI_APP_LIST_SEARCH_PLAYSTORE_PLAYSTORE_SEARCH_RESULT_H_ |
+ |
+#include "base/memory/ptr_util.h" |
Luis Héctor Chávez
2017/06/16 22:24:35
Same comment as the other file.
Jiaquan He
2017/06/22 04:30:03
Done.
|
+#include "components/arc/arc_bridge_service.h" |
+#include "components/arc/arc_service_manager.h" |
+#include "components/arc/common/app.mojom.h" |
+#include "ui/app_list/search_result.h" |
+ |
+// TODO: create helpers in app_src_util? |
Luis Héctor Chávez
2017/06/16 22:24:34
Don't add macros in .h files. then again, you're o
Jiaquan He
2017/06/22 04:30:04
Done.
|
+// Helper macro which returns the AppInstance. |
+#define GET_APP_INSTANCE(method_name) \ |
+ (arc::ArcServiceManager::Get() \ |
+ ? ARC_GET_INSTANCE_FOR_METHOD( \ |
+ arc::ArcServiceManager::Get()->arc_bridge_service()->app(), \ |
+ method_name) \ |
+ : nullptr) |
+ |
+#if defined(OS_CHROMEOS) |
+ |
+namespace app_list { |
+ |
+class PlaystoreSearchResult : public SearchResult { |
Luis Héctor Chávez
2017/06/16 22:24:35
PlayStoreSearchResult
Jiaquan He
2017/06/22 04:30:04
Done.
|
+ public: |
+ PlaystoreSearchResult(const std::string& launch_intent_uri, |
+ const std::string& install_intent_uri, |
+ const std::string& label, |
+ bool is_instant_app, |
+ bool is_recent, |
+ const std::string& publisher_name, |
+ const std::vector<uint8_t>& icon_png_data); |
+ ~PlaystoreSearchResult() override; |
+ |
+ std::unique_ptr<SearchResult> Duplicate() const override; |
Luis Héctor Chávez
2017/06/16 22:24:35
// app_list::SearchResult overrides:
Jiaquan He
2017/06/22 04:30:04
Done.
|
+ |
Luis Héctor Chávez
2017/06/16 22:24:34
no newline between overriden methods
Jiaquan He
2017/06/22 04:30:04
Done.
|
+ void Open(int event_flags) override; |
+ |
+ private: |
+ class IconSource; |
+ const std::string kPlayAppPrefix = "play://"; |
Luis Héctor Chávez
2017/06/16 22:24:34
move this to the .cc file into the anonymous names
Jiaquan He
2017/06/22 04:30:03
Done.
|
+ |
+ const std::string launch_intent_uri_; |
+ const std::string install_intent_uri_; |
+ const std::string label_; |
+ const bool is_instant_app_; |
+ const bool is_recent_; |
+ const std::string publisher_name_; |
+ const std::vector<uint8_t>& icon_png_data_; |
+ |
+ gfx::ImageSkia decoded_icon_; |
+ IconSource* source_; |
+ |
+ base::WeakPtrFactory<PlaystoreSearchResult> weak_ptr_factory_; |
+}; |
Luis Héctor Chávez
2017/06/16 22:24:34
DISALLOW_COPY_AND_ASSIGN(PlayStoreSearchResult)
Jiaquan He
2017/06/22 04:30:03
Done.
|
+ |
+} // namespace app_list |
+ |
+#endif |
+ |
+#endif // CHROME_BROWSER_UI_APP_LIST_SEARCH_PLAYSTORE_PLAYSTORE_SEARCH_RESULT_H_ |