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

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

Issue 10559054: Animate the script badges. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: really sending for review... 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/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 900f2d2895af344a357080443650b985de4c1c5f..8c7215c27c87f6cb61f026d2d90e10ebd3775ca2 100644
--- a/chrome/browser/ui/gtk/location_bar_view_gtk.h
+++ b/chrome/browser/ui/gtk/location_bar_view_gtk.h
@@ -20,6 +20,7 @@
#include "chrome/browser/command_updater.h"
#include "chrome/browser/extensions/extension_context_menu_model.h"
#include "chrome/browser/extensions/image_loading_tracker.h"
+#include "chrome/browser/extensions/location_bar_controller.h"
#include "chrome/browser/prefs/pref_member.h"
#include "chrome/browser/ui/gtk/bubble/bubble_gtk.h"
#include "chrome/browser/ui/gtk/menu_gtk.h"
@@ -229,11 +230,17 @@ class LocationBarViewGtk : public AutocompleteEditController,
DISALLOW_COPY_AND_ASSIGN(ContentSettingImageViewGtk);
};
- class PageActionViewGtk : public ImageLoadingTracker::Observer,
- public content::NotificationObserver,
- public ExtensionContextMenuModel::PopupDelegate {
+ class PageActionViewGtk :
+ public ImageLoadingTracker::Observer,
+ public content::NotificationObserver,
+ public ExtensionContextMenuModel::PopupDelegate,
+ public extensions::LocationBarController::IconAnimation::Observer {
public:
- PageActionViewGtk(LocationBarViewGtk* owner, ExtensionAction* page_action);
+ PageActionViewGtk(
+ LocationBarViewGtk* owner,
+ ExtensionAction* page_action,
+ const base::WeakPtr<extensions::LocationBarController::IconAnimation>&
+ icon_animation);
virtual ~PageActionViewGtk();
GtkWidget* widget() { return event_box_.get(); }
@@ -288,6 +295,11 @@ class LocationBarViewGtk : public AutocompleteEditController,
GdkModifierType modifier,
void* user_data);
+ // extensions::LocationBarController::IconAnimationDelegate implementation.
+ virtual void OnIconChanged(
+ const extensions::LocationBarController::IconAnimation& animation,
+ extensions::LocationBarController* controller) OVERRIDE;
+
// The location bar view that owns us.
LocationBarViewGtk* owner_;
@@ -339,6 +351,10 @@ class LocationBarViewGtk : public AutocompleteEditController,
scoped_ptr<MenuGtk> context_menu_;
scoped_refptr<ExtensionContextMenuModel> context_menu_model_;
+ // Weak reference to the fade-in animation for the icon.
+ base::WeakPtr<extensions::LocationBarController::IconAnimation>
+ icon_animation_;
+
DISALLOW_COPY_AND_ASSIGN(PageActionViewGtk);
};
friend class PageActionViewGtk;

Powered by Google App Engine
This is Rietveld 408576698