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/app_list/arc/arc_app_list_prefs.h

Issue 2585503002: arc: Prevent App list popping on each app installed from batch. (Closed)
Patch Set: cleanup 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/app_list/arc/arc_app_list_prefs.h
diff --git a/chrome/browser/ui/app_list/arc/arc_app_list_prefs.h b/chrome/browser/ui/app_list/arc/arc_app_list_prefs.h
index 7c7e613e79c73e11e0c46c3a803c288ddafe090f..4eb23dcff6856a7e5eeffdd008a408e69573af1f 100644
--- a/chrome/browser/ui/app_list/arc/arc_app_list_prefs.h
+++ b/chrome/browser/ui/app_list/arc/arc_app_list_prefs.h
@@ -293,6 +293,14 @@ class ArcAppListPrefs
int32_t task_id,
const arc::mojom::OrientationLock orientation_lock) override;
+ void OnInstallationStarted(const std::string& name,
+ const std::string& package_name) override;
+ void OnInstallationSetActive(const std::string& package_name) override;
+ void OnInstallationProgress(const std::string& package_name,
+ float progress) override;
+ void OnInstallationFinished(const std::string& package_name,
+ bool success) override;
+
void StartPrefs();
void UpdateDefaultAppsHiddenState();
@@ -353,6 +361,10 @@ class ArcAppListPrefs
void MaybeShowPackageInAppLauncher(
const arc::mojom::ArcPackageInfo& package_info);
+ // Returns true is specified package is new in the system, was not installed
+ // and it is not scheduled to install by sync.
+ bool IsNewPackageInSystem(const std::string& package_name) const;
+
Profile* const profile_;
// Owned by the BrowserContext.
@@ -369,6 +381,8 @@ class ArcAppListPrefs
std::unordered_set<std::string> ready_apps_;
// Contains set of ARC apps that are currently tracked.
std::unordered_set<std::string> tracked_apps_;
+ // Contains set of ARC packages that are currently installing.
+ std::unordered_set<std::string> installing_packages_;
// Keeps deferred icon load requests. Each app may contain several requests
// for different scale factor. Scale factor is defined by specific bit
// position.
@@ -389,6 +403,8 @@ class ArcAppListPrefs
bool default_apps_ready_ = false;
ArcDefaultAppList default_apps_;
base::Closure default_apps_ready_callback_;
+ int last_shown_batch_installation_revision_ = -1;
+ int current_batch_installation_revision_ = 0;
base::WeakPtrFactory<ArcAppListPrefs> weak_ptr_factory_;

Powered by Google App Engine
This is Rietveld 408576698