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

Unified Diff: chrome/browser/ui/ash/launcher/arc_app_deferred_launcher_controller.cc

Issue 2553673003: [Merge to M55] Reland "Propagate information about how ARC apps are launched" (Closed)
Patch Set: 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_controller.cc
diff --git a/chrome/browser/ui/ash/launcher/arc_app_deferred_launcher_controller.cc b/chrome/browser/ui/ash/launcher/arc_app_deferred_launcher_controller.cc
index 4f8152ff810fc77581f9e15d921e374675891223..7cfbf1bfc7f2e3570dd2dfd65f3fcf8f95535325 100644
--- a/chrome/browser/ui/ash/launcher/arc_app_deferred_launcher_controller.cc
+++ b/chrome/browser/ui/ash/launcher/arc_app_deferred_launcher_controller.cc
@@ -129,9 +129,11 @@ void ArcAppDeferredLauncherController::OnAppReadyChanged(
if (it == app_controller_map_.end())
return;
+ // Preserve the event flags before |it| is invalidated in Close().
+ int event_flags = it->second->event_flags();
Close(app_id);
- arc::LaunchApp(observed_profile_, app_id);
+ arc::LaunchApp(observed_profile_, app_id, event_flags);
}
void ArcAppDeferredLauncherController::OnAppRemoved(const std::string& app_id) {
@@ -179,7 +181,8 @@ void ArcAppDeferredLauncherController::RegisterNextUpdate() {
}
void ArcAppDeferredLauncherController::RegisterDeferredLaunch(
- const std::string& app_id) {
+ const std::string& app_id,
+ int event_flags) {
const arc::ArcAuthService* auth_service = arc::ArcAuthService::Get();
DCHECK(auth_service);
DCHECK(auth_service->state() != arc::ArcAuthService::State::STOPPED);
@@ -200,8 +203,8 @@ void ArcAppDeferredLauncherController::RegisterDeferredLaunch(
}
ArcAppDeferredLauncherItemController* controller =
- new ArcAppDeferredLauncherItemController(shelf_app_id, owner_,
- weak_ptr_factory_.GetWeakPtr());
+ new ArcAppDeferredLauncherItemController(
+ shelf_app_id, owner_, event_flags, weak_ptr_factory_.GetWeakPtr());
if (shelf_id == 0) {
owner_->CreateAppLauncherItem(controller, shelf_app_id,
ash::STATUS_RUNNING);

Powered by Google App Engine
This is Rietveld 408576698