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

Unified Diff: chrome/browser/views/tabs/tab_renderer.h

Issue 329021: Makes inactive pinned tabs throb on views when the title changes.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 2 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 | « chrome/browser/views/tabs/dragged_tab_controller.cc ('k') | chrome/browser/views/tabs/tab_renderer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/tabs/tab_renderer.h
===================================================================
--- chrome/browser/views/tabs/tab_renderer.h (revision 30064)
+++ chrome/browser/views/tabs/tab_renderer.h (working copy)
@@ -6,14 +6,15 @@
#define CHROME_BROWSER_VIEWS_TABS_TAB_RENDERER_H__
#include "app/animation.h"
-#include "app/slide_animation.h"
-#include "app/throb_animation.h"
#include "base/gfx/point.h"
+#include "base/scoped_ptr.h"
#include "base/string16.h"
#include "views/controls/button/image_button.h"
#include "views/view.h"
+class SlideAnimation;
class TabContents;
+class ThrobAnimation;
///////////////////////////////////////////////////////////////////////////////
//
@@ -67,6 +68,10 @@
void StartPulse();
void StopPulse();
+ // Start/stop the pinned tab title animation.
+ void StartPinnedTabTitleAnimation();
+ void StopPinnedTabTitleAnimation();
+
// Set the background offset used to match the image in the inactive tab
// to the frame image.
void SetBackgroundOffset(const gfx::Point& offset) {
@@ -153,6 +158,11 @@
// Returns whether the Tab should display a close button.
bool ShouldShowCloseBox() const;
+ // Gets the throb value for the tab. When a tab is not selected the
+ // active background is drawn at |GetThrobValue()|%. This is used for hover,
+ // pinned tab title change and pulsing.
+ double GetThrobValue();
+
// The bounds of various sections of the display.
gfx::Rect favicon_bounds_;
gfx::Rect title_bounds_;
@@ -175,6 +185,9 @@
// Pulse animation.
scoped_ptr<ThrobAnimation> pulse_animation_;
+ // Animation used when the title of an inactive pinned tab changes.
+ scoped_ptr<ThrobAnimation> pinned_title_animation_;
+
// Model data. We store this here so that we don't need to ask the underlying
// model, which is tricky since instances of this object can outlive the
// corresponding objects in the underlying model.
« no previous file with comments | « chrome/browser/views/tabs/dragged_tab_controller.cc ('k') | chrome/browser/views/tabs/tab_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698