Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_UI_APP_LIST_SEARCH_PLAYSTORE_PLAYSTORE_SEARCH_RESULT_H_ | |
| 6 #define CHROME_BROWSER_UI_APP_LIST_SEARCH_PLAYSTORE_PLAYSTORE_SEARCH_RESULT_H_ | |
| 7 | |
| 8 #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.
| |
| 9 #include "components/arc/arc_bridge_service.h" | |
| 10 #include "components/arc/arc_service_manager.h" | |
| 11 #include "components/arc/common/app.mojom.h" | |
| 12 #include "ui/app_list/search_result.h" | |
| 13 | |
| 14 // 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.
| |
| 15 // Helper macro which returns the AppInstance. | |
| 16 #define GET_APP_INSTANCE(method_name) \ | |
| 17 (arc::ArcServiceManager::Get() \ | |
| 18 ? ARC_GET_INSTANCE_FOR_METHOD( \ | |
| 19 arc::ArcServiceManager::Get()->arc_bridge_service()->app(), \ | |
| 20 method_name) \ | |
| 21 : nullptr) | |
| 22 | |
| 23 #if defined(OS_CHROMEOS) | |
| 24 | |
| 25 namespace app_list { | |
| 26 | |
| 27 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.
| |
| 28 public: | |
| 29 PlaystoreSearchResult(const std::string& launch_intent_uri, | |
| 30 const std::string& install_intent_uri, | |
| 31 const std::string& label, | |
| 32 bool is_instant_app, | |
| 33 bool is_recent, | |
| 34 const std::string& publisher_name, | |
| 35 const std::vector<uint8_t>& icon_png_data); | |
| 36 ~PlaystoreSearchResult() override; | |
| 37 | |
| 38 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.
| |
| 39 | |
|
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.
| |
| 40 void Open(int event_flags) override; | |
| 41 | |
| 42 private: | |
| 43 class IconSource; | |
| 44 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.
| |
| 45 | |
| 46 const std::string launch_intent_uri_; | |
| 47 const std::string install_intent_uri_; | |
| 48 const std::string label_; | |
| 49 const bool is_instant_app_; | |
| 50 const bool is_recent_; | |
| 51 const std::string publisher_name_; | |
| 52 const std::vector<uint8_t>& icon_png_data_; | |
| 53 | |
| 54 gfx::ImageSkia decoded_icon_; | |
| 55 IconSource* source_; | |
| 56 | |
| 57 base::WeakPtrFactory<PlaystoreSearchResult> weak_ptr_factory_; | |
| 58 }; | |
|
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.
| |
| 59 | |
| 60 } // namespace app_list | |
| 61 | |
| 62 #endif | |
| 63 | |
| 64 #endif // CHROME_BROWSER_UI_APP_LIST_SEARCH_PLAYSTORE_PLAYSTORE_SEARCH_RESULT_H _ | |
| OLD | NEW |