OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_UI_VIEWS_TABS_TAB_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 virtual void Layout() OVERRIDE; | 72 virtual void Layout() OVERRIDE; |
73 virtual void OnThemeChanged() OVERRIDE; | 73 virtual void OnThemeChanged() OVERRIDE; |
74 virtual std::string GetClassName() const OVERRIDE; | 74 virtual std::string GetClassName() const OVERRIDE; |
75 virtual bool HasHitTestMask() const OVERRIDE; | 75 virtual bool HasHitTestMask() const OVERRIDE; |
76 virtual void GetHitTestMask(gfx::Path* path) const OVERRIDE; | 76 virtual void GetHitTestMask(gfx::Path* path) const OVERRIDE; |
77 virtual bool GetTooltipTextOrigin(const gfx::Point& p, | 77 virtual bool GetTooltipTextOrigin(const gfx::Point& p, |
78 gfx::Point* origin) const OVERRIDE; | 78 gfx::Point* origin) const OVERRIDE; |
79 virtual void OnMouseMoved(const views::MouseEvent& event) OVERRIDE; | 79 virtual void OnMouseMoved(const views::MouseEvent& event) OVERRIDE; |
80 | 80 |
81 // Paint various portions of the Tab | 81 // Paint various portions of the Tab |
| 82 gfx::ImageSkia* GetTabBackgroundImage(chrome::search::Mode::Type mode) const; |
82 void PaintTabBackground(gfx::Canvas* canvas); | 83 void PaintTabBackground(gfx::Canvas* canvas); |
83 void PaintInactiveTabBackgroundWithTitleChange(gfx::Canvas* canvas); | 84 void PaintInactiveTabBackgroundWithTitleChange(gfx::Canvas* canvas); |
84 void PaintInactiveTabBackground(gfx::Canvas* canvas); | 85 void PaintInactiveTabBackground(gfx::Canvas* canvas); |
85 void PaintActiveTabBackground(gfx::Canvas* canvas); | 86 void PaintActiveTabBackground(gfx::Canvas* canvas, |
| 87 gfx::ImageSkia* tab_background); |
86 | 88 |
87 // Returns the number of favicon-size elements that can fit in the tab's | 89 // Returns the number of favicon-size elements that can fit in the tab's |
88 // current size. | 90 // current size. |
89 int IconCapacity() const; | 91 int IconCapacity() const; |
90 | 92 |
91 // Returns whether the Tab should display a favicon. | 93 // Returns whether the Tab should display a favicon. |
92 bool ShouldShowIcon() const; | 94 bool ShouldShowIcon() const; |
93 | 95 |
94 // Gets the throb value for the tab. When a tab is not selected the | 96 // Gets the throb value for the tab. When a tab is not selected the |
95 // active background is drawn at |GetThrobValue()|%. This is used for hover, | 97 // active background is drawn at |GetThrobValue()|%. This is used for hover, |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 | 140 |
139 // The current color of the close button. | 141 // The current color of the close button. |
140 SkColor close_button_color_; | 142 SkColor close_button_color_; |
141 | 143 |
142 static bool initialized_; | 144 static bool initialized_; |
143 | 145 |
144 DISALLOW_COPY_AND_ASSIGN(Tab); | 146 DISALLOW_COPY_AND_ASSIGN(Tab); |
145 }; | 147 }; |
146 | 148 |
147 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ | 149 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ |
OLD | NEW |