Chromium Code Reviews| Index: chrome/browser/ui/panels/panel_overflow_strip.h |
| diff --git a/chrome/browser/ui/panels/panel_overflow_strip.h b/chrome/browser/ui/panels/panel_overflow_strip.h |
| index 0dab64d9e21054d7090ccd8f2c2268a659ab5b07..1fbd12a5d2d442e713b9853b1dea0d2fb1c2ff18 100644 |
| --- a/chrome/browser/ui/panels/panel_overflow_strip.h |
| +++ b/chrome/browser/ui/panels/panel_overflow_strip.h |
| @@ -51,16 +51,28 @@ class PanelOverflowStrip : public PanelMouseWatcherObserver, |
| Panel* first_panel() const { |
| return panels_.empty() ? NULL : panels_.front(); |
| } |
| + const Panels& panels() const { return panels_; } |
| #ifdef UNIT_TEST |
| - const Panels& panels() const { return panels_; } |
| + void set_max_visible_panels(int max_visible_panels) { |
| + max_visible_panels_ = max_visible_panels; |
| + } |
| + |
| + bool TestShouldShowOverflowTitles(const gfx::Point& mouse_position) const { |
|
jennb
2011/12/08 23:52:00
Use a TestPanelMouseWatcher instance and simulate
jianli
2011/12/09 22:39:07
I've already used TestPanelMouseWatcher that. But
|
| + return ShouldShowOverflowTitles(mouse_position); |
| + } |
| #endif |
| + // The width of the overflow area that is expanded to show more info, i.e. |
| + // titles, when the mouse hovers over the area. |
| + static const int kOverflowAreaHoverWidth = 200; |
| + |
| private: |
| // Overridden from PanelMouseWatcherObserver: |
| virtual void OnMouseMove(const gfx::Point& mouse_position) OVERRIDE; |
| // Overridden from AnimationDelegate: |
| + virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE; |
| virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; |
| void DoRefresh(size_t start_index, size_t end_index); |
| @@ -86,6 +98,9 @@ class PanelOverflowStrip : public PanelMouseWatcherObserver, |
| // in the panel strip. |
| gfx::Rect display_area_; |
| + // Maximium number of overflow panels allowed to be shown. |
| + int max_visible_panels_; |
| + |
| // For mouse hover-over effect. |
| bool are_overflow_titles_shown_; |
| scoped_ptr<ui::SlideAnimation> overflow_hover_animator_; |