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

Unified Diff: chrome/browser/ui/views/toolbar/app_menu_button.h

Issue 2860163002: WIP - allow vector icons to specify motion.
Patch Set: checkpoint Created 3 years, 7 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/views/toolbar/app_menu_button.h
diff --git a/chrome/browser/ui/views/toolbar/app_menu_button.h b/chrome/browser/ui/views/toolbar/app_menu_button.h
index 96290b40b659500fc84272b286ff4ab28b5704b1..da0dd4297a820894c3a9e191e3f4d70b3fd11a85 100644
--- a/chrome/browser/ui/views/toolbar/app_menu_button.h
+++ b/chrome/browser/ui/views/toolbar/app_menu_button.h
@@ -9,6 +9,8 @@
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
+#include "base/time/time.h"
+#include "base/timer/timer.h"
#include "chrome/browser/ui/tabs/tab_strip_model_observer.h"
#include "chrome/browser/ui/toolbar/app_menu_icon_controller.h"
#include "ui/views/controls/button/menu_button.h"
@@ -23,9 +25,12 @@ class LabelButtonBorder;
class MenuListener;
}
-class AppMenuAnimation;
class ToolbarView;
+namespace internal {
+class VectorIconAnimator;
+}
+
class AppMenuButton : public views::MenuButton, public TabStripModelObserver {
public:
explicit AppMenuButton(ToolbarView* toolbar_view);
@@ -73,14 +78,9 @@ class AppMenuButton : public views::MenuButton, public TabStripModelObserver {
void SetTrailingMargin(int margin);
// Animates the icon if possible. The icon will not animate if the severity
- // level is none, |animation_| is nullptr or |should_use_new_icon_| is false.
+ // level is none, |animator_| is nullptr or |should_use_new_icon_| is false.
void AnimateIconIfPossible();
- // Methods called by AppMenuAnimation when the animation has started/ended.
- // The layer is managed inside these methods.
- void AppMenuAnimationStarted();
- void AppMenuAnimationEnded();
-
// Opens the app menu immediately during a drag-and-drop operation.
// Used only in testing.
static bool g_open_app_immediately_for_testing;
@@ -117,7 +117,7 @@ class AppMenuButton : public views::MenuButton, public TabStripModelObserver {
std::unique_ptr<AppMenu> menu_;
// Used for animating and drawing the app menu icon.
- std::unique_ptr<AppMenuAnimation> animation_;
+ std::unique_ptr<internal::VectorIconAnimator> animator_;
// True if the app menu should use the new animated icon.
bool should_use_new_icon_;
« no previous file with comments | « chrome/browser/ui/views/toolbar/app_menu_animation.cc ('k') | chrome/browser/ui/views/toolbar/app_menu_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698