Index: chrome/browser/extensions/extension_service.h |
diff --git a/chrome/browser/extensions/extension_service.h b/chrome/browser/extensions/extension_service.h |
index 1b288dfb0f00fdacf2b871d098791cd82056f038..f5bda4f3364cee6434af880bc84e1afd03d2a968 100644 |
--- a/chrome/browser/extensions/extension_service.h |
+++ b/chrome/browser/extensions/extension_service.h |
@@ -37,6 +37,7 @@ |
#include "chrome/browser/extensions/process_map.h" |
#include "chrome/browser/extensions/sandboxed_extension_unpacker.h" |
#include "chrome/browser/prefs/pref_change_registrar.h" |
+#include "chrome/browser/shell_integration.h" |
#include "chrome/browser/sync/api/sync_change.h" |
#include "chrome/browser/sync/api/syncable_service.h" |
#include "chrome/common/extensions/extension.h" |
@@ -131,7 +132,8 @@ class ExtensionService |
: public ExtensionServiceInterface, |
public ExternalExtensionProviderInterface::VisitorInterface, |
public base::SupportsWeakPtr<ExtensionService>, |
- public content::NotificationObserver { |
+ public content::NotificationObserver, |
+ public ImageLoadingTracker::Observer { |
public: |
using base::SupportsWeakPtr<ExtensionService>::AsWeakPtr; |
@@ -574,6 +576,13 @@ class ExtensionService |
return socket_controller_; |
} |
+ // Implement ImageLoadingTracker::Observer. |tracker_| is used to |
+ // load the application's icon, which is done when we start creating an |
+ // application's shortcuts. This method receives the icon, and completes |
+ // the process of installing the shortcuts. |
+ virtual void OnImageLoaded(SkBitmap* image, |
+ const ExtensionResource& resource, |
+ int index) OVERRIDE; |
private: |
// Bundle of type (app or extension)-specific sync stuff. |
struct SyncBundle { |
@@ -688,6 +697,10 @@ class ExtensionService |
// a NaCl module to see those changes reflected in the PluginList. |
void UpdatePluginListWithNaClModules(); |
+ // Start the process of installing an application shortcut. |
+ // The process is finished when OnImageLoaded is called. |
+ void StartInstallApplicationShortcut(const Extension* extension); |
+ |
NaClModuleInfoList::iterator FindNaClModule(const GURL& url); |
// The profile this ExtensionService is part of. |
@@ -830,6 +843,10 @@ class ExtensionService |
extensions::ProcessMap process_map_; |
+ // Fields used when installing application shortcuts. |
+ ShellIntegration::ShortcutInfo shortcut_info_; |
+ ImageLoadingTracker tracker_; |
+ |
FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
InstallAppsWithUnlimtedStorage); |
FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |