| Index: chrome/browser/ui/app_list/arc/arc_app_launcher.cc
|
| diff --git a/chrome/browser/ui/app_list/arc/arc_app_launcher.cc b/chrome/browser/ui/app_list/arc/arc_app_launcher.cc
|
| index 878e244f56a9693f59b7f3f6f2a1512c5596ba92..2edf5be1f5d0b66cdeee8f613754fd5810c2b334 100644
|
| --- a/chrome/browser/ui/app_list/arc/arc_app_launcher.cc
|
| +++ b/chrome/browser/ui/app_list/arc/arc_app_launcher.cc
|
| @@ -10,13 +10,17 @@
|
|
|
| ArcAppLauncher::ArcAppLauncher(content::BrowserContext* context,
|
| const std::string& app_id,
|
| - bool landscape_layout)
|
| - : context_(context), app_id_(app_id), landscape_layout_(landscape_layout) {
|
| + bool landscape_layout,
|
| + bool deferred_launch_allowed)
|
| + : context_(context),
|
| + app_id_(app_id),
|
| + landscape_layout_(landscape_layout),
|
| + deferred_launch_allowed_(deferred_launch_allowed) {
|
| ArcAppListPrefs* prefs = ArcAppListPrefs::Get(context_);
|
| DCHECK(prefs);
|
|
|
| std::unique_ptr<ArcAppListPrefs::AppInfo> app_info = prefs->GetApp(app_id_);
|
| - if (app_info && app_info->ready)
|
| + if (app_info && (app_info->ready || deferred_launch_allowed_))
|
| LaunchApp();
|
| else
|
| prefs->AddObserver(this);
|
| @@ -34,12 +38,12 @@ ArcAppLauncher::~ArcAppLauncher() {
|
| void ArcAppLauncher::OnAppRegistered(
|
| const std::string& app_id,
|
| const ArcAppListPrefs::AppInfo& app_info) {
|
| - if (app_id == app_id_ && app_info.ready)
|
| + if (app_id == app_id_ && (app_info.ready || deferred_launch_allowed_))
|
| LaunchApp();
|
| }
|
|
|
| void ArcAppLauncher::OnAppReadyChanged(const std::string& app_id, bool ready) {
|
| - if (app_id == app_id_ && ready)
|
| + if (app_id == app_id_ && (ready || deferred_launch_allowed_))
|
| LaunchApp();
|
| }
|
|
|
|
|