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

Unified Diff: chrome/browser/ui/cocoa/location_bar/page_action_decoration.h

Issue 10559054: Animate the script badges. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase, fix thing i accidentally deleted in the last rebase 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
Index: chrome/browser/ui/cocoa/location_bar/page_action_decoration.h
diff --git a/chrome/browser/ui/cocoa/location_bar/page_action_decoration.h b/chrome/browser/ui/cocoa/location_bar/page_action_decoration.h
index e0e2ab63a136ff1a93d599411948f5b54fc69234..c7e715a91e6d16310e3159a5cdca8e4e6856a711 100644
--- a/chrome/browser/ui/cocoa/location_bar/page_action_decoration.h
+++ b/chrome/browser/ui/cocoa/location_bar/page_action_decoration.h
@@ -8,9 +8,9 @@
#include "chrome/browser/extensions/image_loading_tracker.h"
#import "chrome/browser/ui/cocoa/location_bar/image_decoration.h"
+#include "chrome/common/extensions/extension_action.h"
#include "googleurl/src/gurl.h"
-class ExtensionAction;
@class ExtensionActionContextMenu;
class LocationBarViewMac;
class Profile;
@@ -24,7 +24,8 @@ class WebContents;
class PageActionDecoration : public ImageDecoration,
public ImageLoadingTracker::Observer,
- public content::NotificationObserver {
+ public content::NotificationObserver,
+ public ExtensionAction::IconAnimation::Observer {
public:
PageActionDecoration(LocationBarViewMac* owner,
Profile* profile,
@@ -65,6 +66,10 @@ class PageActionDecoration : public ImageDecoration,
// Show the popup in the frame, with the given URL.
void ShowPopup(const NSRect& frame, const GURL& popup_url);
+ // Overridden from ExtensionAction::IconAnimation::Observer.
+ virtual void OnIconChanged(
+ const ExtensionAction::IconAnimation& animation) OVERRIDE;
+
// Overridden from NotificationObserver:
virtual void Observe(int type,
const content::NotificationSource& source,
@@ -107,6 +112,10 @@ class PageActionDecoration : public ImageDecoration,
// extension.
bool preview_enabled_;
+ // Fade-in animation for the icon with observer scoped to this.
+ ExtensionAction::IconAnimation::ScopedObserver
+ scoped_icon_animation_observer_;
+
// Used to register for notifications received by
// NotificationObserver.
content::NotificationRegistrar registrar_;

Powered by Google App Engine
This is Rietveld 408576698