Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3564)

Unified Diff: chrome/browser/ui/gtk/location_bar_view_gtk.h

Issue 10905005: Change browser/page action default icon defined in manifest to support hidpi. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review feedback Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..093a1107cd6a5e74bcc6b0676966382a85b62824 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,11 @@ 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 will be used to get the extension action icon for us.
+ // It may load the icon asynchronously (in which case the initial icon
+ // returned by the factory will be transparent), so we have to observe it
+ // for updates to the icon.
+ scoped_ptr<ExtensionActionIconFactory> icon_factory_;
// The widgets for this page action.
ui::OwnedWidgetGtk event_box_;

Powered by Google App Engine
This is Rietveld 408576698