| Index: chrome/browser/ui/webui/ntp/app_launcher_handler.h
|
| diff --git a/chrome/browser/ui/webui/ntp/app_launcher_handler.h b/chrome/browser/ui/webui/ntp/app_launcher_handler.h
|
| index 4f32ad9b377e8bdb907e9595fd112bf8036eaea5..2c619402e80fa9cfe5d7b1a9c2575cb32f254bb8 100644
|
| --- a/chrome/browser/ui/webui/ntp/app_launcher_handler.h
|
| +++ b/chrome/browser/ui/webui/ntp/app_launcher_handler.h
|
| @@ -23,6 +23,7 @@
|
|
|
| class AppNotification;
|
| class ExtensionService;
|
| +class ExtensionSet;
|
| class PrefChangeRegistrar;
|
| class Profile;
|
|
|
| @@ -54,6 +55,9 @@ class AppLauncherHandler : public content::WebUIMessageHandler,
|
| const content::NotificationSource& source,
|
| const content::NotificationDetails& details) OVERRIDE;
|
|
|
| + // Remove ordinals or page indices from legacy profiles.
|
| + void RemoveNonAppExtensionOrdinals(const ExtensionSet* extensions);
|
| +
|
| // Populate the given dictionary with all installed app info.
|
| void FillAppDictionary(base::DictionaryValue* value);
|
|
|
| @@ -65,6 +69,10 @@ class AppLauncherHandler : public content::WebUIMessageHandler,
|
| // Populate the given dictionary with the web store promo content.
|
| void FillPromoDictionary(base::DictionaryValue* value);
|
|
|
| + // Callback for the "deleteAppsPage" message. Takes a page index as the first
|
| + // and only argument.
|
| + void HandleDeleteEmptyAppsPage(const base::ListValue* args);
|
| +
|
| // Callback for the "getApps" message.
|
| void HandleGetApps(const base::ListValue* args);
|
|
|
| @@ -92,8 +100,8 @@ class AppLauncherHandler : public content::WebUIMessageHandler,
|
| // Callback for the "promoSeen" message.
|
| void HandlePromoSeen(const base::ListValue* args);
|
|
|
| - // Callback for the "saveAppPageName" message.
|
| - void HandleSaveAppPageName(const base::ListValue* args);
|
| + // Callback for the "saveAppsPageName" message.
|
| + void HandleSaveAppsPageName(const base::ListValue* args);
|
|
|
| // Callback for the "generateAppForLink" message.
|
| void HandleGenerateAppForLink(const base::ListValue* args);
|
| @@ -123,6 +131,9 @@ class AppLauncherHandler : public content::WebUIMessageHandler,
|
| StringOrdinal page_ordinal;
|
| };
|
|
|
| + // Reset some instance flags we use to track the currently uninstalling app.
|
| + void CleanupAfterUninstall();
|
| +
|
| // Records a web store launch in the appropriate histograms. |promo_active|
|
| // specifies if the web store promotion was active.
|
| static void RecordWebStoreLaunch(bool promo_active);
|
| @@ -163,9 +174,17 @@ class AppLauncherHandler : public content::WebUIMessageHandler,
|
| void OnFaviconForApp(FaviconService::Handle handle,
|
| history::FaviconData data);
|
|
|
| + // Ask all the apps which page they're on and return a sorted, unique list.
|
| + std::vector<std::string>* PageOrdinalsFromApps();
|
| +
|
| // Sends |highlight_app_id_| to the js.
|
| void SetAppToBeHighlighted();
|
|
|
| + // Go over the existing preference we read from the profile and make sure
|
| + // every page ordinal is in it (and remove possible extras). Returns a bool
|
| + // telling the caller whether any values were changed in this method.
|
| + bool SyncPageNamesToApps(DictionaryValue* page_names);
|
| +
|
| // The apps are represented in the extensions model, which
|
| // outlives us since it's owned by our containing profile.
|
| ExtensionService* const extension_service_;
|
| @@ -202,6 +221,11 @@ class AppLauncherHandler : public content::WebUIMessageHandler,
|
| // when the app is added to the page (via getAppsCallback or appAdded).
|
| std::string highlight_app_id_;
|
|
|
| + // Used to determine if the current instance of AppLauncherHandler called
|
| + // ExtensionUninstallAccepted(). If the current one was the one that called
|
| + // this, we use this value to animate the removal on the attached NTP.
|
| + bool uninstall_from_page_;
|
| +
|
| // Hold state for favicon requests.
|
| CancelableRequestConsumerTSimple<AppInstallInfo*> favicon_consumer_;
|
|
|
|
|