Chromium Code Reviews| Index: chrome/browser/ui/gtk/location_bar_view_gtk.h |
| diff --git a/chrome/browser/ui/gtk/location_bar_view_gtk.h b/chrome/browser/ui/gtk/location_bar_view_gtk.h |
| index 6b8d6a47c6e29f80f98ae4b2493baa872ac50f9b..d90ad574309e3ae91046b69ceca21636dbf2d2cf 100644 |
| --- a/chrome/browser/ui/gtk/location_bar_view_gtk.h |
| +++ b/chrome/browser/ui/gtk/location_bar_view_gtk.h |
| @@ -17,8 +17,8 @@ |
| #include "base/memory/scoped_vector.h" |
| #include "base/memory/weak_ptr.h" |
| #include "chrome/browser/api/prefs/pref_member.h" |
| +#include "chrome/browser/extensions/extension_action_icon_factory.h" |
| #include "chrome/browser/extensions/extension_context_menu_model.h" |
| -#include "chrome/browser/extensions/image_loading_tracker.h" |
| #include "chrome/browser/ui/gtk/bubble/bubble_gtk.h" |
| #include "chrome/browser/ui/gtk/menu_gtk.h" |
| #include "chrome/browser/ui/omnibox/location_bar.h" |
| @@ -226,7 +226,7 @@ class LocationBarViewGtk : public OmniboxEditController, |
| private: |
| class PageActionViewGtk : |
| - public ImageLoadingTracker::Observer, |
| + public ExtensionActionIconFactory::Observer, |
| public content::NotificationObserver, |
| public ExtensionContextMenuModel::PopupDelegate, |
| public ExtensionAction::IconAnimation::Observer { |
| @@ -249,10 +249,8 @@ class LocationBarViewGtk : public OmniboxEditController, |
| // is the current page URL. |
| void UpdateVisibility(content::WebContents* contents, const GURL& url); |
| - // A callback from ImageLoadingTracker for when the image has loaded. |
| - virtual void OnImageLoaded(const gfx::Image& image, |
| - const std::string& extension_id, |
| - int index) OVERRIDE; |
| + // Overriden from ExtensionActionIconFactory::Observer. |
| + virtual void OnIconUpdated() OVERRIDE; |
| // Simulate left mouse click on the page action button. |
| void TestActivatePageAction(); |
| @@ -296,9 +294,10 @@ class LocationBarViewGtk : public OmniboxEditController, |
| // us, it resides in the extension of this particular profile. |
| ExtensionAction* page_action_; |
| - // The object that is waiting for the image loading to complete |
| - // asynchronously. |
| - ImageLoadingTracker tracker_; |
| + // The object that page action will use to create icon for us. |
|
Evan Stade
2012/09/14 09:36:21
the page action
the icon
|
| + // It may load icon asynchronously (in which case initial icon returned by |
| + // the action will be blank), so we have to observe it for icon's updates. |
| + scoped_ptr<ExtensionActionIconFactory> icon_factory_; |
| // The widgets for this page action. |
| ui::OwnedWidgetGtk event_box_; |