Index: chrome/browser/extensions/extension_service.h |
diff --git a/chrome/browser/extensions/extension_service.h b/chrome/browser/extensions/extension_service.h |
index 67b0f4dcc6a9efbc8c16dec0d7746f0297a31b37..4060bd5e84f292a4a603db2c06bf66396a8ce163 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" |
@@ -130,7 +131,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; |
@@ -569,6 +571,13 @@ class ExtensionService |
return &extension_warnings_; |
} |
+ // 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 { |
@@ -683,6 +692,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. |
@@ -821,6 +834,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, |