| 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 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 // ui::EventHandler: | 224 // ui::EventHandler: |
| 225 void OnGestureEvent(ui::GestureEvent* event) override; | 225 void OnGestureEvent(ui::GestureEvent* event) override; |
| 226 | 226 |
| 227 // Invoked from Layout to adjust the position of the favicon or alert | 227 // Invoked from Layout to adjust the position of the favicon or alert |
| 228 // indicator for pinned tabs. | 228 // indicator for pinned tabs. |
| 229 void MaybeAdjustLeftForPinnedTab(gfx::Rect* bounds) const; | 229 void MaybeAdjustLeftForPinnedTab(gfx::Rect* bounds) const; |
| 230 | 230 |
| 231 // Invoked from SetData after |data_| has been updated to the new data. | 231 // Invoked from SetData after |data_| has been updated to the new data. |
| 232 void DataChanged(const TabRendererData& old); | 232 void DataChanged(const TabRendererData& old); |
| 233 | 233 |
| 234 // Paint with the normal tab style. | 234 // Paint with the normal tab style. If |clip| is non-empty, the tab border |
| 235 void PaintTab(gfx::Canvas* canvas); | 235 // should be clipped against it. |
| 236 void PaintTab(gfx::Canvas* canvas, const gfx::Path& clip); |
| 236 | 237 |
| 237 // Paint with the "immersive mode" light-bar style. | 238 // Paint with the "immersive mode" light-bar style. |
| 238 void PaintImmersiveTab(gfx::Canvas* canvas); | 239 void PaintImmersiveTab(gfx::Canvas* canvas); |
| 239 | 240 |
| 240 // Paint various portions of the Tab. | 241 // Paint various portions of the Tab. |
| 241 void PaintInactiveTabBackground(gfx::Canvas* canvas); | 242 void PaintInactiveTabBackground(gfx::Canvas* canvas, const gfx::Path& clip); |
| 242 void PaintTabBackgroundUsingFillId(gfx::Canvas* canvas, | 243 void PaintTabBackgroundUsingFillId(gfx::Canvas* fill_canvas, |
| 244 gfx::Canvas* stroke_canvas, |
| 243 bool is_active, | 245 bool is_active, |
| 244 int fill_id, | 246 int fill_id, |
| 245 bool has_custom_image, | 247 bool has_custom_image, |
| 246 int y_offset); | 248 int y_offset); |
| 247 | 249 |
| 248 // Paints the pinned tab title changed indicator and |favicon_|. |favicon_| | 250 // Paints the pinned tab title changed indicator and |favicon_|. |favicon_| |
| 249 // may be null. |favicon_draw_bounds| is |favicon_bounds_| adjusted for rtl | 251 // may be null. |favicon_draw_bounds| is |favicon_bounds_| adjusted for rtl |
| 250 // and clipped to the bounds of the tab. | 252 // and clipped to the bounds of the tab. |
| 251 void PaintPinnedTabTitleChangedIndicatorAndIcon( | 253 void PaintPinnedTabTitleChangedIndicatorAndIcon( |
| 252 gfx::Canvas* canvas, | 254 gfx::Canvas* canvas, |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 | 364 |
| 363 // The favicon for the tab. This might be the sad tab icon or a copy of | 365 // The favicon for the tab. This might be the sad tab icon or a copy of |
| 364 // data().favicon and may be modified for theming. It is created on demand | 366 // data().favicon and may be modified for theming. It is created on demand |
| 365 // and thus may be null. | 367 // and thus may be null. |
| 366 gfx::ImageSkia favicon_; | 368 gfx::ImageSkia favicon_; |
| 367 | 369 |
| 368 DISALLOW_COPY_AND_ASSIGN(Tab); | 370 DISALLOW_COPY_AND_ASSIGN(Tab); |
| 369 }; | 371 }; |
| 370 | 372 |
| 371 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ | 373 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_H_ |
| OLD | NEW |