Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / app_list / extension_app_item.h
index e142315..be25683 100644 (file)
@@ -34,6 +34,8 @@ class ExtensionAppItem : public app_list::AppListItem,
                          public ExtensionEnableFlowDelegate,
                          public app_list::AppContextMenuDelegate {
  public:
+  static const char kItemType[];
+
   ExtensionAppItem(Profile* profile,
                    const app_list::AppListSyncableService::SyncItem* sync_item,
                    const std::string& extension_id,
@@ -49,6 +51,9 @@ class ExtensionAppItem : public app_list::AppListItem,
   // it gray.
   void UpdateIcon();
 
+  // Only updates the icon if the overlay needs to be added/removed.
+  void UpdateIconOverlay();
+
   // Update page and app launcher ordinals to put the app in between |prev| and
   // |next|. Note that |prev| and |next| could be NULL when the app is put at
   // the beginning or at the end.
@@ -57,8 +62,6 @@ class ExtensionAppItem : public app_list::AppListItem,
   const std::string& extension_id() const { return extension_id_; }
   const std::string& extension_name() const { return extension_name_; }
 
-  static const char kItemType[];
-
  private:
   // Gets extension associated with this model. Returns NULL if extension
   // no longer exists.
@@ -75,8 +78,8 @@ class ExtensionAppItem : public app_list::AppListItem,
   // Private equivalent to Activate(), without refocus for already-running apps.
   void Launch(int event_flags);
 
-  // Whether or not the app item has an overlay.
-  bool HasOverlay() const;
+  // Whether or not the app item needs an overlay.
+  bool NeedsOverlay() const;
 
   // Overridden from extensions::IconImage::Observer:
   virtual void OnExtensionIconImageChanged(
@@ -117,6 +120,9 @@ class ExtensionAppItem : public app_list::AppListItem,
   // Whether or not this app is a platform app.
   bool is_platform_app_;
 
+  // Whether this app item has an overlay.
+  bool has_overlay_;
+
   DISALLOW_COPY_AND_ASSIGN(ExtensionAppItem);
 };