diff options
author | xiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-11 06:13:51 +0000 |
---|---|---|
committer | xiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-11 06:13:51 +0000 |
commit | eabfdae9101aa33a212fdaf240d8e0af70874e16 (patch) | |
tree | 4b27ea5ae52ce96ccfaab87960d067fc1b58968c /chrome/browser/browser.h | |
parent | ffb01d3e998a32156790af7c1367d733bb9e75dd (diff) | |
download | chromium_src-eabfdae9101aa33a212fdaf240d8e0af70874e16.zip chromium_src-eabfdae9101aa33a212fdaf240d8e0af70874e16.tar.gz chromium_src-eabfdae9101aa33a212fdaf240d8e0af70874e16.tar.bz2 |
Get web app icon via FavIconHelper and auto repair/update
- Expose a DownloadImage method from FavIconHelper to download/decode
image for an image url;
- Expose FavIconHelper from TabContents;
- Update CreateApplicationShortcutView to use the exposed DownloadImage
method to get web app icon instead of do it via URLFetcher/PNGCodec;
- Check and update web app icon and shortcuts when chrome is lauched as
app for OS_WIN;
- Code cleanup:
- Move a bunch of FavIconHelper methods that are not used externally
to private;
- Remove an unused cancelable_consumer_ from TabContents;
BUG=8539
TEST=Verify issue 8539 is fixed. And create a web page with a non PNG shortcut icon and verify it shows up in create application shortcut dialog.
Review URL: http://codereview.chromium.org/482003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34332 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser.h')
-rw-r--r-- | chrome/browser/browser.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/chrome/browser/browser.h b/chrome/browser/browser.h index 05fa0d8..7f5f85c 100644 --- a/chrome/browser/browser.h +++ b/chrome/browser/browser.h @@ -851,6 +851,18 @@ class Browser : public TabStripModelDelegate, // Stores the disposition type of the last blocked command. WindowOpenDisposition last_blocked_command_disposition_; + // Different types of action when web app info is available. + // OnDidGetApplicationInfo uses this to dispatch calls. + enum WebAppAction { + NONE, // No action at all. + CREATE_SHORTCUT, // Bring up create application shortcut dialog. + UPDATE_SHORTCUT // Update icon for app shortcut. + }; + + // Which deferred action to perform when OnDidGetApplicationInfo is notified + // from a TabContents. Currently, only one pending action is allowed. + WebAppAction pending_web_app_action_; + DISALLOW_COPY_AND_ASSIGN(Browser); }; |