diff options
author | mgiuca@chromium.org <mgiuca@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-01 10:18:41 +0000 |
---|---|---|
committer | mgiuca@chromium.org <mgiuca@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-01 10:18:41 +0000 |
commit | e886528ed0ff9dadea5abfa442e2a12e41d0e0a4 (patch) | |
tree | ceaf77496974a368a436a03479ae67198ea745f6 /chrome/browser/web_applications/web_app.h | |
parent | dbcdcd1cb2c911f7db8413aee4ca13ab0ad2bbfd (diff) | |
download | chromium_src-e886528ed0ff9dadea5abfa442e2a12e41d0e0a4.zip chromium_src-e886528ed0ff9dadea5abfa442e2a12e41d0e0a4.tar.gz chromium_src-e886528ed0ff9dadea5abfa442e2a12e41d0e0a4.tar.bz2 |
Refactor web_app to expose GetInfoForApp as a public function.
This is already used by web_app_mac and will be used by
CreateApplicationShortcutView to get file handlers, so it should be a
public function (not in the 'internals' namespace).
Also renamed UpdateShortcutInfoAndIconForApp to GetShortcutInfoForApp
for consistency.
BUG=390056
TBR=msw@chromium.org
Review URL: https://codereview.chromium.org/340223003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280795 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/web_applications/web_app.h')
-rw-r--r-- | chrome/browser/web_applications/web_app.h | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/chrome/browser/web_applications/web_app.h b/chrome/browser/web_applications/web_app.h index 8143b15..1436848 100644 --- a/chrome/browser/web_applications/web_app.h +++ b/chrome/browser/web_applications/web_app.h @@ -100,7 +100,7 @@ enum ShortcutCreationReason { typedef base::Callback<void(const ShortcutInfo&, const extensions::FileHandlersInfo&)> InfoCallback; -// Called by UpdateShortcutInfoAndIconForApp after loading the icon. +// Called by GetShortcutInfoForApp after fetching the ShortcutInfo. typedef base::Callback<void(const ShortcutInfo&)> ShortcutInfoCallback; #if defined(TOOLKIT_VIEWS) @@ -120,11 +120,19 @@ ShortcutInfo ShortcutInfoForExtensionAndProfile( const extensions::Extension* app, Profile* profile); -// Fetches the icon for |extension| and calls |callback| with shortcut info -// filled out as by UpdateShortcutInfoForApp. -void UpdateShortcutInfoAndIconForApp(const extensions::Extension* extension, - Profile* profile, - const ShortcutInfoCallback& callback); +// Populates a ShortcutInfo and FileHandlersInfo for the given |extension| in +// |profile| and passes them to |callback| after asynchronously loading all icon +// representations. +void GetInfoForApp(const extensions::Extension* extension, + Profile* profile, + const InfoCallback& callback); + +// Populates a ShortcutInfo for the given |extension| in |profile| and passes +// it to |callback| after asynchronously loading all icon representations. This +// is equivalent to GetInfoForApp, but it throws away the FileHandlersInfo. +void GetShortcutInfoForApp(const extensions::Extension* extension, + Profile* profile, + const ShortcutInfoCallback& callback); // Whether to create a shortcut for this type of extension. bool ShouldCreateShortcutFor(Profile* profile, @@ -209,11 +217,6 @@ std::string GetWMClassFromAppName(std::string app_name); namespace internals { -// Loads relevant info structs for the app and calls |callback|. -void GetInfoForApp(const extensions::Extension* extension, - Profile* profile, - const InfoCallback& callback); - #if defined(OS_WIN) // Returns the Windows user-level shortcut paths that are specified in // |creation_locations|. |