| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_UI_PANELS_PANEL_OVERFLOW_INDICATOR_VIEW_H_ | |
| 6 #define CHROME_BROWSER_UI_PANELS_PANEL_OVERFLOW_INDICATOR_VIEW_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #include "base/memory/scoped_ptr.h" | |
| 10 #include "chrome/browser/ui/panels/panel_overflow_indicator.h" | |
| 11 #include "ui/views/controls/label.h" | |
| 12 | |
| 13 namespace gfx { | |
| 14 class Font; | |
| 15 } | |
| 16 namespace views { | |
| 17 class Widget; | |
| 18 } | |
| 19 | |
| 20 class PanelOverflowIndicatorView : public PanelOverflowIndicator { | |
| 21 public: | |
| 22 PanelOverflowIndicatorView(); | |
| 23 virtual ~PanelOverflowIndicatorView(); | |
| 24 | |
| 25 // Overridden from OverflowIndicator: | |
| 26 virtual int GetHeight() const OVERRIDE; | |
| 27 virtual gfx::Rect GetBounds() const OVERRIDE; | |
| 28 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; | |
| 29 virtual int GetCount() const OVERRIDE; | |
| 30 virtual void SetCount(int count) OVERRIDE; | |
| 31 virtual void DrawAttention() OVERRIDE; | |
| 32 virtual void StopDrawingAttention() OVERRIDE; | |
| 33 virtual bool IsDrawingAttention() const OVERRIDE; | |
| 34 | |
| 35 private: | |
| 36 void PaintBackground(); | |
| 37 void UpdateBounds(); | |
| 38 void UpdateTitle(); | |
| 39 void GetFrameMask(const gfx::Rect& rect, gfx::Path* path) const; | |
| 40 | |
| 41 int count_; | |
| 42 bool is_drawing_attention_; | |
| 43 scoped_ptr<views::Widget> widget_; | |
| 44 views::Label title_; | |
| 45 | |
| 46 DISALLOW_COPY_AND_ASSIGN(PanelOverflowIndicatorView); | |
| 47 }; | |
| 48 | |
| 49 #endif // CHROME_BROWSER_UI_PANELS_PANEL_OVERFLOW_INDICATOR_VIEW_H_ | |
| OLD | NEW |