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

Unified Diff: chrome/browser/ui/views/location_bar/page_action_image_view.h

Issue 10699033: Animation the script badges on views. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/location_bar/page_action_image_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/location_bar/page_action_image_view.h
diff --git a/chrome/browser/ui/views/location_bar/page_action_image_view.h b/chrome/browser/ui/views/location_bar/page_action_image_view.h
index 5a33d521ad62c781d8a63bf9faaec2ae218bb1c4..79c7bee81eaa1bea2eaa7c662d989f13bbf1b4d6 100644
--- a/chrome/browser/ui/views/location_bar/page_action_image_view.h
+++ b/chrome/browser/ui/views/location_bar/page_action_image_view.h
@@ -12,10 +12,10 @@
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/extensions/image_loading_tracker.h"
#include "chrome/browser/ui/views/extensions/extension_popup.h"
+#include "chrome/common/extensions/extension_action.h"
#include "ui/views/controls/image_view.h"
class Browser;
-class ExtensionAction;
class LocationBarView;
namespace content {
@@ -30,7 +30,8 @@ class MenuRunner;
class PageActionImageView : public views::ImageView,
public ImageLoadingTracker::Observer,
public views::Widget::Observer,
- public content::NotificationObserver {
+ public content::NotificationObserver,
+ public ExtensionAction::IconAnimation::Observer {
public:
PageActionImageView(LocationBarView* owner,
ExtensionAction* page_action,
@@ -79,6 +80,10 @@ class PageActionImageView : public views::ImageView,
void ExecuteAction(int button);
private:
+ // Overridden from ExtensionAction::IconAnimation::Observer.
+ virtual void OnIconChanged(
+ const ExtensionAction::IconAnimation& animation) OVERRIDE;
+
// Shows the popup, with the given URL.
void ShowPopupWithURL(const GURL& popup_url);
@@ -127,6 +132,10 @@ class PageActionImageView : public views::ImageView,
scoped_ptr<views::MenuRunner> menu_runner_;
+ // Fade-in animation for the icon with observer scoped to this.
+ ExtensionAction::IconAnimation::ScopedObserver
+ scoped_icon_animation_observer_;
+
DISALLOW_IMPLICIT_CONSTRUCTORS(PageActionImageView);
};
« no previous file with comments | « no previous file | chrome/browser/ui/views/location_bar/page_action_image_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698