OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_VIEW_TAB_ICON_VIEW_H__ | 5 #ifndef CHROME_BROWSER_VIEW_TAB_ICON_VIEW_H__ |
6 #define CHROME_BROWSER_VIEW_TAB_ICON_VIEW_H__ | 6 #define CHROME_BROWSER_VIEW_TAB_ICON_VIEW_H__ |
7 | 7 |
8 #include "chrome/views/view.h" | 8 #include "chrome/views/view.h" |
9 | 9 |
10 class TabContents; | 10 class TabContents; |
(...skipping 21 matching lines...) Expand all Loading... |
32 virtual ~TabIconView(); | 32 virtual ~TabIconView(); |
33 | 33 |
34 // Invoke whenever the tab state changes or the throbber should update. | 34 // Invoke whenever the tab state changes or the throbber should update. |
35 void Update(); | 35 void Update(); |
36 | 36 |
37 // Set the throbber to the light style (for use on dark backgrounds). | 37 // Set the throbber to the light style (for use on dark backgrounds). |
38 void set_is_light(bool is_light) { is_light_ = is_light; } | 38 void set_is_light(bool is_light) { is_light_ = is_light; } |
39 | 39 |
40 // Overriden from View | 40 // Overriden from View |
41 virtual void Paint(ChromeCanvas* canvas); | 41 virtual void Paint(ChromeCanvas* canvas); |
42 virtual void GetPreferredSize(CSize* out); | 42 virtual gfx::Size GetPreferredSize(); |
43 | 43 |
44 private: | 44 private: |
45 void PaintThrobber(ChromeCanvas* canvas); | 45 void PaintThrobber(ChromeCanvas* canvas); |
46 void PaintFavIcon(ChromeCanvas* canvas, const SkBitmap& bitmap); | 46 void PaintFavIcon(ChromeCanvas* canvas, const SkBitmap& bitmap); |
47 | 47 |
48 // Our provider of current tab contents. | 48 // Our provider of current tab contents. |
49 TabContentsProvider* provider_; | 49 TabContentsProvider* provider_; |
50 | 50 |
51 // Whether the throbber is running. | 51 // Whether the throbber is running. |
52 bool throbber_running_; | 52 bool throbber_running_; |
53 | 53 |
54 // Whether we should display our light or dark style. | 54 // Whether we should display our light or dark style. |
55 bool is_light_; | 55 bool is_light_; |
56 | 56 |
57 // Current frame of the throbber being painted. This is only used if | 57 // Current frame of the throbber being painted. This is only used if |
58 // throbber_running_ is true. | 58 // throbber_running_ is true. |
59 int throbber_frame_; | 59 int throbber_frame_; |
60 | 60 |
61 DISALLOW_EVIL_CONSTRUCTORS(TabIconView); | 61 DISALLOW_EVIL_CONSTRUCTORS(TabIconView); |
62 }; | 62 }; |
63 | 63 |
64 #endif // CHROME_BROWSER_VIEW_TAB_ICON_VIEW_H__ | 64 #endif // CHROME_BROWSER_VIEW_TAB_ICON_VIEW_H__ |
65 | 65 |
OLD | NEW |