[go: nahoru, domu]

[PhoneHub][Exo] Convert from app list from grid view to list view

Mock: https://screenshot.googleplex.com/5xYq65SMiozm6Nh.png
Flag off, grid view:
https://screenshot.googleplex.com/7Q7AsrUZJypEJid.png
Flag on, list view, apps allowed:
https://screenshot.googleplex.com/BScwcQ3DPURQium.png
Flag on, list view, apps blocked:
https://screenshot.googleplex.com/6ZBLc6wkhJKerzm.png

Bug: b/262736092
Change-Id: Id83c8df8942bd1fbad6f8c98736a5150c5a6f690
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4112671
Reviewed-by: Abbas Nayebi <nayebi@google.com>
Commit-Queue: Pu Shi <pushi@google.com>
Reviewed-by: Jon Mann <jonmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1085713}
diff --git a/ash/system/phonehub/app_stream_launcher_view.h b/ash/system/phonehub/app_stream_launcher_view.h
index 8cae9c7..db55554 100644
--- a/ash/system/phonehub/app_stream_launcher_view.h
+++ b/ash/system/phonehub/app_stream_launcher_view.h
@@ -58,6 +58,8 @@
   std::unique_ptr<views::View> CreateAppListView();
   std::unique_ptr<views::View> CreateItemView(
       const phonehub::Notification::AppMetadata& app);
+  std::unique_ptr<views::View> CreateListItemView(
+      const phonehub::Notification::AppMetadata& app);
   std::unique_ptr<views::View> CreateHeaderView();
   std::unique_ptr<views::Button> CreateButton(
       views::Button::PressedCallback callback,
@@ -72,6 +74,11 @@
   // Handles the click on the "back" arrow in the header.
   void OnArrowBackActivated();
 
+  void CreateListView(
+      const std::vector<phonehub::Notification::AppMetadata>* apps_list);
+  void CreateGridView(
+      const std::vector<phonehub::Notification::AppMetadata>* apps_list);
+
   views::Button* arrow_back_button_ = nullptr;
   phonehub::PhoneHubManager* phone_hub_manager_;