Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(180)

Unified Diff: chrome/browser/ui/views/tabs/tab.h

Issue 2126103003: Change chrome:// favicons in tabstrip based on theming. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc ('k') | chrome/browser/ui/views/tabs/tab.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/tabs/tab.h
diff --git a/chrome/browser/ui/views/tabs/tab.h b/chrome/browser/ui/views/tabs/tab.h
index 7e854cbaf1a3da75b46f4e68f9b94596594a73f0..bc31de495892b14f6dedddf680657c117b615367 100644
--- a/chrome/browser/ui/views/tabs/tab.h
+++ b/chrome/browser/ui/views/tabs/tab.h
@@ -16,6 +16,7 @@
#include "ui/base/layout.h"
#include "ui/gfx/animation/animation_delegate.h"
#include "ui/gfx/geometry/point.h"
+#include "ui/gfx/image/image_skia.h"
#include "ui/gfx/paint_throbber.h"
#include "ui/views/context_menu_controller.h"
#include "ui/views/controls/button/button.h"
@@ -257,12 +258,11 @@ class Tab : public gfx::AnimationDelegate,
int y_offset,
bool is_active);
- // Paints the pinned tab title changed indicator and favicon. |favicon| may
- // be null. |favicon_draw_bounds| is |favicon_bounds_| adjusted for rtl and
- // clipped to the bounds of the tab.
+ // Paints the pinned tab title changed indicator and |favicon_|. |favicon_|
+ // may be null. |favicon_draw_bounds| is |favicon_bounds_| adjusted for rtl
+ // and clipped to the bounds of the tab.
void PaintPinnedTabTitleChangedIndicatorAndIcon(
gfx::Canvas* canvas,
- const gfx::ImageSkia& favicon,
const gfx::Rect& favicon_draw_bounds);
// Paints the favicon, mirrored for RTL if needed.
@@ -297,9 +297,7 @@ class Tab : public gfx::AnimationDelegate,
// animation.
void SetFaviconHidingOffset(int offset);
- void set_should_display_crashed_favicon() {
- should_display_crashed_favicon_ = true;
- }
+ void SetShouldDisplayCrashedFavicon(bool value);
// Recalculates the correct |button_color_| and resets the title, alert
// indicator, and close button colors if necessary. This should be called any
@@ -402,6 +400,11 @@ class Tab : public gfx::AnimationDelegate,
// The current color of the alert indicator and close button icons.
SkColor button_color_;
+ // The favicon for the tab. This might be the sad tab icon or a copy of
+ // data().favicon and may be modified for theming. It is created on demand
+ // and thus may be null.
+ gfx::ImageSkia favicon_;
+
// As the majority of the tabs are inactive, and painting tabs is slowish,
// we cache a handful of the inactive tab backgrounds here.
static ImageCache* image_cache_;
« no previous file with comments | « chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc ('k') | chrome/browser/ui/views/tabs/tab.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698