diff options
author | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-13 09:47:51 +0000 |
---|---|---|
committer | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-13 09:47:51 +0000 |
commit | 32d9329c718c9ab7412d210af6597bbac2241277 (patch) | |
tree | fd3882384ed281973b9b61bab0ac2b60302ae069 /chrome/browser/views/browser_actions_container.h | |
parent | 0f297c669447ce439e7d4bc21b4a87d07447e7a7 (diff) | |
download | chromium_src-32d9329c718c9ab7412d210af6597bbac2241277.zip chromium_src-32d9329c718c9ab7412d210af6597bbac2241277.tar.gz chromium_src-32d9329c718c9ab7412d210af6597bbac2241277.tar.bz2 |
Load default browser action icons only once per-window. This
also changes the loading logic to be just like the GTK port,
because it was nicer, and because it is nice for them to be
parallel as much as possible.
It would be better to only load this icon once per application
session, but that would require something fancier.
BUG=27485
Review URL: http://codereview.chromium.org/389032
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31897 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/browser_actions_container.h')
-rw-r--r-- | chrome/browser/views/browser_actions_container.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/chrome/browser/views/browser_actions_container.h b/chrome/browser/views/browser_actions_container.h index cd308c2..f133515 100644 --- a/chrome/browser/views/browser_actions_container.h +++ b/chrome/browser/views/browser_actions_container.h @@ -76,9 +76,6 @@ class BrowserActionButton : public views::MenuButton, virtual void PopupDidHide(); private: - // If the image from the browser action needs to be loaded, load it. - void LoadImage(); - // The browser action this view represents. The ExtensionAction is not owned // by this class. ExtensionAction* browser_action_; @@ -86,14 +83,15 @@ class BrowserActionButton : public views::MenuButton, // The extension associated with the browser action we're displaying. Extension* extension_; - // The icons representing different states for the browser action. - std::vector<SkBitmap> browser_action_icons_; - // The object that is waiting for the image loading to complete // asynchronously. This object can potentially outlive the BrowserActionView, // and takes care of deleting itself. ImageLoadingTracker* tracker_; + // The default icon for our browser action. This might be non-empty if the + // browser action had a value for default_icon in the manifest. + SkBitmap default_icon_; + // The browser action shelf. BrowserActionsContainer* panel_; |