summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/location_bar_view.h
diff options
context:
space:
mode:
authormattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-10 22:25:16 +0000
committermattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-10 22:25:16 +0000
commit10fb8126df079ccf47a308f2b5a40ed01a8efda0 (patch)
tree1d6c4d7b0fcb33e73024ede12eee97b1b57077a6 /chrome/browser/views/location_bar_view.h
parent64fe65afcd193bea778490faa2d562bc96430502 (diff)
downloadchromium_src-10fb8126df079ccf47a308f2b5a40ed01a8efda0.zip
chromium_src-10fb8126df079ccf47a308f2b5a40ed01a8efda0.tar.gz
chromium_src-10fb8126df079ccf47a308f2b5a40ed01a8efda0.tar.bz2
Linux: implement Page Actions support.
BUG=11973 TEST=load an extension with page actions, it should work like on windows. Review URL: http://codereview.chromium.org/195050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25934 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/location_bar_view.h')
-rw-r--r--chrome/browser/views/location_bar_view.h19
1 files changed, 6 insertions, 13 deletions
diff --git a/chrome/browser/views/location_bar_view.h b/chrome/browser/views/location_bar_view.h
index 919821f..3fdfcdc 100644
--- a/chrome/browser/views/location_bar_view.h
+++ b/chrome/browser/views/location_bar_view.h
@@ -11,6 +11,7 @@
#include "app/gfx/font.h"
#include "base/gfx/rect.h"
#include "chrome/browser/autocomplete/autocomplete_edit.h"
+#include "chrome/browser/image_loading_tracker.h"
#include "chrome/browser/location_bar.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/browser/toolbar_model.h"
@@ -333,7 +334,8 @@ class LocationBarView : public LocationBar,
// PageActionImageView is used to display the icon for a given PageAction
// and notify the extension when the icon is clicked.
- class PageActionImageView : public LocationBarImageView {
+ class PageActionImageView : public LocationBarImageView,
+ public ImageLoadingTracker::Observer {
public:
PageActionImageView(
LocationBarView* owner, Profile* profile,
@@ -346,20 +348,15 @@ class LocationBarView : public LocationBar,
// Overridden from LocationBarImageView.
virtual void ShowInfoBubble();
+ // Overridden from ImageLoadingTracker.
+ virtual void OnImageLoaded(SkBitmap* image, size_t index);
+
// Called to notify the PageAction that it should determine whether to be
// visible or hidden. |contents| is the TabContents that is active, |url|
// is the current page URL.
void UpdateVisibility(TabContents* contents, GURL url);
- // A callback for when the image has loaded.
- void OnImageLoaded(SkBitmap* image, size_t index);
-
private:
- // We load the images for the PageActions on the file thread. These tasks
- // help with that.
- class LoadImageTask;
- class ImageLoadingTracker;
-
// The location bar view that owns us.
LocationBarView* owner_;
@@ -431,10 +428,6 @@ class LocationBarView : public LocationBar,
// Delete all page action views that we have created.
void DeletePageActionViews();
- // Retrieves a vector of all page actions, irrespective of which
- // extension they belong to.
- std::vector<PageAction*> GetPageActions();
-
// Update the views for the Page Actions, to reflect state changes for
// PageActions.
void RefreshPageActionViews();