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

Unified Diff: chrome/browser/ui/ash/launcher/arc_app_deferred_launcher_item_controller.h

Issue 2540433002: Reland "Propagate information about how ARC apps are launched" (Closed)
Patch Set: Fixed use-after-free Created 4 years 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/ash/launcher/arc_app_deferred_launcher_item_controller.h
diff --git a/chrome/browser/ui/ash/launcher/arc_app_deferred_launcher_item_controller.h b/chrome/browser/ui/ash/launcher/arc_app_deferred_launcher_item_controller.h
index a17d7075bf9b525862401da6a429a55d63429139..deae0bbb98f0aaeabc2749aecf5308453fba5f5f 100644
--- a/chrome/browser/ui/ash/launcher/arc_app_deferred_launcher_item_controller.h
+++ b/chrome/browser/ui/ash/launcher/arc_app_deferred_launcher_item_controller.h
@@ -15,17 +15,23 @@
class ArcAppDeferredLauncherController;
class ChromeLauncherController;
+// ArcAppDeferredLauncherItemController displays the icon of the ARC app that
+// cannot be launched immediately (due to ARC not being ready) on Chrome OS'
+// shelf, with an overlaid spinner to provide visual feedback.
class ArcAppDeferredLauncherItemController : public LauncherItemController {
public:
ArcAppDeferredLauncherItemController(
const std::string& arc_app_id,
ChromeLauncherController* controller,
+ int event_flags,
const base::WeakPtr<ArcAppDeferredLauncherController>& host);
~ArcAppDeferredLauncherItemController() override;
base::TimeDelta GetActiveTime() const;
+ int event_flags() const { return event_flags_; }
+
// ash::ShelfItemDelegate
ash::ShelfItemDelegate::PerformedAction ItemSelected(
const ui::Event& event) override;
@@ -44,6 +50,10 @@ class ArcAppDeferredLauncherItemController : public LauncherItemController {
ChromeLauncherAppMenuItems GetApplicationList(int event_flags) override;
private:
+ // The flags of the event that caused the ARC app to be activated. These will
+ // be propagated to the launch event once the app is actually launched.
+ const int event_flags_;
+
base::WeakPtr<ArcAppDeferredLauncherController> host_;
const base::Time start_time_;

Powered by Google App Engine
This is Rietveld 408576698