diff options
author | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-17 01:03:26 +0000 |
---|---|---|
committer | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-17 01:03:26 +0000 |
commit | 4c4f8199de84c55ae267506eacfd744e8f3e69f7 (patch) | |
tree | ae469a5a8c542d3c0af754953d0178be168a9385 /chrome/browser/extensions/image_loading_tracker.h | |
parent | b4efc650ae68817ff33bd4efab83ffb23d706113 (diff) | |
download | chromium_src-4c4f8199de84c55ae267506eacfd744e8f3e69f7.zip chromium_src-4c4f8199de84c55ae267506eacfd744e8f3e69f7.tar.gz chromium_src-4c4f8199de84c55ae267506eacfd744e8f3e69f7.tar.bz2 |
Allow slightly larger browser and page action icons.
This allows 19px icons to be able to be used for both
browser and page icons.
I think it looks nicer with the page actions slightly smaller, and that is what we also usually do in Chrome,
but some Chrome location bar icons use 18px for soft edges,
so I guess this will just have to be something we advise
developers on.
We can actually fit up to 21 (whoa nelly) pixels on Windows,
but apparently the space is slightly smaller on mac.
Also minor layout fix. We were sizing the browser action
buttons 1px too short.
BUG=24881
TEST=Load chrome/test/data/extensions/samples/icon_size_test. Icons should be 17px for the page action and 19px for the browser action and centered nicely in the space.
Review URL: http://codereview.chromium.org/286001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29365 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/image_loading_tracker.h')
-rw-r--r-- | chrome/browser/extensions/image_loading_tracker.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/chrome/browser/extensions/image_loading_tracker.h b/chrome/browser/extensions/image_loading_tracker.h index 9732a00..a56aaeb 100644 --- a/chrome/browser/extensions/image_loading_tracker.h +++ b/chrome/browser/extensions/image_loading_tracker.h @@ -10,6 +10,10 @@ class ExtensionResource; class SkBitmap; +namespace gfx { +class Size; +} + // The views need to load their icons asynchronously but might be deleted before // the images have loaded. This class stays alive while the request is in // progress (manages its own lifetime) and keeps track of whether the view still @@ -44,8 +48,10 @@ class ImageLoadingTracker // Specify image resource to load. This method must be called a number of // times equal to the |image_count| arugment to the constructor. Calling it - // any more or less than that is an error. - void PostLoadImageTask(const ExtensionResource& resource); + // any more or less than that is an error. If the loaded image is larger than + // |max_size| it will be resized to those dimensions. + void PostLoadImageTask(const ExtensionResource& resource, + const gfx::Size& max_size); private: class LoadImageTask; |