diff options
author | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-31 18:07:12 +0000 |
---|---|---|
committer | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-31 18:07:12 +0000 |
commit | b5cd43eb964e452d7a0245b9e14bd9a9d1e89b4a (patch) | |
tree | 1d6a191a02ca8b5f477847a662562b0dd13781f3 /chrome | |
parent | 6fd95736baf7a2667124f6182a4c3cbb2b69bbc3 (diff) | |
download | chromium_src-b5cd43eb964e452d7a0245b9e14bd9a9d1e89b4a.zip chromium_src-b5cd43eb964e452d7a0245b9e14bd9a9d1e89b4a.tar.gz chromium_src-b5cd43eb964e452d7a0245b9e14bd9a9d1e89b4a.tar.bz2 |
Convert the gtk tab rendering code to use ChromeCanvas instead of directly drawing with gdk.
Review URL: http://codereview.chromium.org/57063
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12880 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/gtk/tabs/tab_renderer_gtk.cc | 186 | ||||
-rw-r--r-- | chrome/browser/gtk/tabs/tab_renderer_gtk.h | 33 | ||||
-rw-r--r-- | chrome/browser/gtk/tabs/tab_strip_gtk.cc | 35 | ||||
-rw-r--r-- | chrome/browser/gtk/tabs/tab_strip_gtk.h | 7 |
4 files changed, 102 insertions, 159 deletions
diff --git a/chrome/browser/gtk/tabs/tab_renderer_gtk.cc b/chrome/browser/gtk/tabs/tab_renderer_gtk.cc index c75e982..498d3d6 100644 --- a/chrome/browser/gtk/tabs/tab_renderer_gtk.cc +++ b/chrome/browser/gtk/tabs/tab_renderer_gtk.cc @@ -4,7 +4,6 @@ #include "chrome/browser/gtk/tabs/tab_renderer_gtk.h" -#include "base/gfx/gtk_util.h" #include "chrome/browser/browser.h" #include "chrome/browser/tab_contents/tab_contents.h" #include "chrome/common/l10n_util.h" @@ -22,8 +21,8 @@ const int kFavIconTitleSpacing = 4; const int kTitleCloseButtonSpacing = 5; const int kStandardTitleWidth = 175; const int kFavIconSize = 16; -const GdkColor kSelectedTitleColor = GDK_COLOR_RGB(0, 0, 0); -const GdkColor kUnselectedTitleColor = GDK_COLOR_RGB(64, 64, 64); +const int kSelectedTitleColor = SK_ColorBLACK; +const int kUnselectedTitleColor = SkColorSetRGB(64, 64, 64); // The vertical and horizontal offset used to position the close button // in the tab. TODO(jhawkins): Ask pkasting what the Fuzz is about. @@ -57,9 +56,9 @@ TabRendererGtk::TabImage TabRendererGtk::tab_inactive_otr_ = {0}; TabRendererGtk::TabImage TabRendererGtk::tab_hover_ = {0}; TabRendererGtk::ButtonImage TabRendererGtk::close_button_ = {0}; TabRendererGtk::ButtonImage TabRendererGtk::newtab_button_ = {0}; -GdkFont* TabRendererGtk::title_font_ = NULL; +ChromeFont TabRendererGtk::title_font_; int TabRendererGtk::title_font_height_ = 0; -GdkPixbuf* TabRendererGtk::download_icon_ = NULL; +SkBitmap* TabRendererGtk::download_icon_ = NULL; int TabRendererGtk::download_icon_width_ = 0; int TabRendererGtk::download_icon_height_ = 0; @@ -106,7 +105,7 @@ gfx::Size TabRendererGtk::GetMinimumUnselectedSize() { minimum_size.set_width(kLeftPadding + kRightPadding); // Since we use bitmap images, the real minimum height of the image is // defined most accurately by the height of the end cap images. - minimum_size.set_height(gdk_pixbuf_get_height(tab_active_.image_l)); + minimum_size.set_height(tab_active_.image_l->height()); return minimum_size; } @@ -136,44 +135,44 @@ int TabRendererGtk::GetContentHeight() { void TabRendererGtk::LoadTabImages() { ResourceBundle& rb = ResourceBundle::GetSharedInstance(); - tab_active_.image_l = rb.LoadPixbuf(IDR_TAB_ACTIVE_LEFT); - tab_active_.image_c = rb.LoadPixbuf(IDR_TAB_ACTIVE_CENTER); - tab_active_.image_r = rb.LoadPixbuf(IDR_TAB_ACTIVE_RIGHT); - tab_active_.l_width = gdk_pixbuf_get_width(tab_active_.image_l); - tab_active_.r_width = gdk_pixbuf_get_width(tab_active_.image_r); + tab_active_.image_l = rb.GetBitmapNamed(IDR_TAB_ACTIVE_LEFT); + tab_active_.image_c = rb.GetBitmapNamed(IDR_TAB_ACTIVE_CENTER); + tab_active_.image_r = rb.GetBitmapNamed(IDR_TAB_ACTIVE_RIGHT); + tab_active_.l_width = tab_active_.image_l->width(); + tab_active_.r_width = tab_active_.image_r->width(); - tab_inactive_.image_l = rb.LoadPixbuf(IDR_TAB_INACTIVE_LEFT); - tab_inactive_.image_c = rb.LoadPixbuf(IDR_TAB_INACTIVE_CENTER); - tab_inactive_.image_r = rb.LoadPixbuf(IDR_TAB_INACTIVE_RIGHT); - tab_inactive_.l_width = gdk_pixbuf_get_width(tab_inactive_.image_l); - tab_inactive_.r_width = gdk_pixbuf_get_width(tab_inactive_.image_r); + tab_inactive_.image_l = rb.GetBitmapNamed(IDR_TAB_INACTIVE_LEFT); + tab_inactive_.image_c = rb.GetBitmapNamed(IDR_TAB_INACTIVE_CENTER); + tab_inactive_.image_r = rb.GetBitmapNamed(IDR_TAB_INACTIVE_RIGHT); + tab_inactive_.l_width = tab_inactive_.image_l->width(); + tab_inactive_.r_width = tab_inactive_.image_r->width(); - tab_hover_.image_l = rb.LoadPixbuf(IDR_TAB_HOVER_LEFT); - tab_hover_.image_c = rb.LoadPixbuf(IDR_TAB_HOVER_CENTER); - tab_hover_.image_r = rb.LoadPixbuf(IDR_TAB_HOVER_RIGHT); + tab_hover_.image_l = rb.GetBitmapNamed(IDR_TAB_HOVER_LEFT); + tab_hover_.image_c = rb.GetBitmapNamed(IDR_TAB_HOVER_CENTER); + tab_hover_.image_r = rb.GetBitmapNamed(IDR_TAB_HOVER_RIGHT); - tab_inactive_otr_.image_l = rb.LoadPixbuf(IDR_TAB_INACTIVE_LEFT_OTR); - tab_inactive_otr_.image_c = rb.LoadPixbuf(IDR_TAB_INACTIVE_CENTER_OTR); - tab_inactive_otr_.image_r = rb.LoadPixbuf(IDR_TAB_INACTIVE_RIGHT_OTR); + tab_inactive_otr_.image_l = rb.GetBitmapNamed(IDR_TAB_INACTIVE_LEFT_OTR); + tab_inactive_otr_.image_c = rb.GetBitmapNamed(IDR_TAB_INACTIVE_CENTER_OTR); + tab_inactive_otr_.image_r = rb.GetBitmapNamed(IDR_TAB_INACTIVE_RIGHT_OTR); // tab_[hover,inactive_otr] width are not used and are initialized to 0 // during static initialization. - close_button_.normal = rb.LoadPixbuf(IDR_TAB_CLOSE); - close_button_.hot = rb.LoadPixbuf(IDR_TAB_CLOSE_H); - close_button_.pushed = rb.LoadPixbuf(IDR_TAB_CLOSE_P); - close_button_.width = gdk_pixbuf_get_width(close_button_.normal); - close_button_.height = gdk_pixbuf_get_height(close_button_.normal); - - newtab_button_.normal = rb.LoadPixbuf(IDR_NEWTAB_BUTTON); - newtab_button_.hot = rb.LoadPixbuf(IDR_NEWTAB_BUTTON_H); - newtab_button_.pushed = rb.LoadPixbuf(IDR_NEWTAB_BUTTON_P); - newtab_button_.width = gdk_pixbuf_get_width(newtab_button_.normal); - newtab_button_.height = gdk_pixbuf_get_height(newtab_button_.normal); - - download_icon_ = rb.LoadPixbuf(IDR_DOWNLOAD_ICON); - download_icon_width_ = gdk_pixbuf_get_width(download_icon_); - download_icon_height_ = gdk_pixbuf_get_height(download_icon_); + close_button_.normal = rb.GetBitmapNamed(IDR_TAB_CLOSE); + close_button_.hot = rb.GetBitmapNamed(IDR_TAB_CLOSE_H); + close_button_.pushed = rb.GetBitmapNamed(IDR_TAB_CLOSE_P); + close_button_.width = close_button_.normal->width(); + close_button_.height = close_button_.normal->height(); + + newtab_button_.normal = rb.GetBitmapNamed(IDR_NEWTAB_BUTTON); + newtab_button_.hot = rb.GetBitmapNamed(IDR_NEWTAB_BUTTON_H); + newtab_button_.pushed = rb.GetBitmapNamed(IDR_NEWTAB_BUTTON_P); + newtab_button_.width = newtab_button_.normal->width(); + newtab_button_.height = newtab_button_.normal->height(); + + download_icon_ = rb.GetBitmapNamed(IDR_DOWNLOAD_ICON); + download_icon_width_ = download_icon_->width(); + download_icon_height_ = download_icon_->height(); } void TabRendererGtk::SetBounds(const gfx::Rect& bounds) { @@ -191,8 +190,7 @@ std::wstring TabRendererGtk::GetTitle() const { //////////////////////////////////////////////////////////////////////////////// // TabRendererGtk, private: -void TabRendererGtk::Paint(GtkWidget* canvas) { - GdkGC* gc = gdk_gc_new(canvas->window); +void TabRendererGtk::Paint(ChromeCanvasPaint* canvas) { // Don't paint if we're narrower than we can render correctly. (This should // only happen during animations). if (width() < GetMinimumUnselectedSize().width()) @@ -210,14 +208,13 @@ void TabRendererGtk::Paint(GtkWidget* canvas) { PaintTabBackground(canvas); if (show_icon && !data_.favicon.isNull()) { - GdkPixbuf* favicon = gfx::GdkPixbufFromSkBitmap(&data_.favicon); - DrawImageInt(canvas, favicon, favicon_bounds_.x(), - favicon_bounds_.y() + fav_icon_hiding_offset_); + canvas->DrawBitmapInt(data_.favicon, favicon_bounds_.x(), + favicon_bounds_.y() + fav_icon_hiding_offset_); } if (show_download_icon) { - DrawImageInt(canvas, download_icon_, - download_icon_bounds_.x(), download_icon_bounds_.y()); + canvas->DrawBitmapInt(*download_icon_, + download_icon_bounds_.x(), download_icon_bounds_.y()); } // Paint the Title. @@ -232,21 +229,14 @@ void TabRendererGtk::Paint(GtkWidget* canvas) { Browser::FormatTitleForDisplay(&title); } - if (IsSelected()) { - gdk_gc_set_rgb_fg_color(gc, &kSelectedTitleColor); - } else { - gdk_gc_set_rgb_fg_color(gc, &kUnselectedTitleColor); - } - - // TODO(jhawkins): Clip the title. - gdk_draw_text(canvas->window, title_font_, gc, - title_bounds_.x(), title_bounds_.y(), - WideToUTF8(title).c_str(), title.length()); + SkColor title_color = IsSelected() ? kSelectedTitleColor + : kUnselectedTitleColor; + canvas->DrawStringInt(title, title_font_, title_color, title_bounds_.x(), + title_bounds_.y(), title_bounds_.width(), + title_bounds_.height()); - DrawImageInt(canvas, close_button_.normal, - close_button_bounds_.x(), close_button_bounds_.y()); - - g_object_unref(gc); + canvas->DrawBitmapInt(*close_button_.normal, + close_button_bounds_.x(), close_button_bounds_.y()); } void TabRendererGtk::Layout() { @@ -293,9 +283,7 @@ void TabRendererGtk::Layout() { // Size the Title text to fill the remaining space. int title_left = favicon_bounds_.right() + kFavIconTitleSpacing; - int title_top = bounds_.y() + kTopPadding + - (content_height - title_font_height_) / 2; - title_top = bounds_.height() - title_top; + int title_top = kTopPadding + (bounds_.height() + title_font_height_) / 2; // If the user has big fonts, the title will appear rendered too far down on // the y-axis if we use the regular top padding, so we need to adjust it so @@ -320,39 +308,7 @@ void TabRendererGtk::Layout() { // TODO(jhawkins): Handle RTL layout. } -void TabRendererGtk::DrawImageInt(GtkWidget* canvas, GdkPixbuf* pixbuf, - int x, int y) { - GdkGC* gc = canvas->style->fg_gc[GTK_WIDGET_STATE(canvas)]; - - gdk_draw_pixbuf(canvas->window, // The destination drawable. - gc, // Graphics context. - pixbuf, // Source image. - 0, 0, // Source x, y. - x, y, -1, -1, // Destination x, y, width, height. - GDK_RGB_DITHER_NONE, 0, 0); // Dithering mode, x,y offsets. -} - -void TabRendererGtk::TileImageInt(GtkWidget* canvas, GdkPixbuf* pixbuf, - int x, int y, int w, int h) { - GdkGC* gc = canvas->style->fg_gc[GTK_WIDGET_STATE(canvas)]; - int image_width = gdk_pixbuf_get_width(pixbuf); - int slices = w / image_width; - int remaining = w - slices * image_width; - - for (int i = 0; i < slices; i++) { - gdk_draw_pixbuf(canvas->window, gc, - pixbuf, 0, 0, x + image_width * i, y, -1, -1, - GDK_RGB_DITHER_NONE, 0, 0); - } - - if (remaining) { - gdk_draw_pixbuf(canvas->window, gc, - pixbuf, 0, 0, x + image_width * slices, y, remaining, -1, - GDK_RGB_DITHER_NONE, 0, 0); - } -} - -void TabRendererGtk::PaintTabBackground(GtkWidget* canvas) { +void TabRendererGtk::PaintTabBackground(ChromeCanvasPaint* canvas) { if (IsSelected()) { // Sometimes detaching a tab quickly can result in the model reporting it // as not being selected, so is_drag_clone_ ensures that we always paint @@ -363,26 +319,29 @@ void TabRendererGtk::PaintTabBackground(GtkWidget* canvas) { } } -void TabRendererGtk::PaintInactiveTabBackground(GtkWidget* canvas) { +void TabRendererGtk::PaintInactiveTabBackground(ChromeCanvasPaint* canvas) { bool is_otr = data_.off_the_record; const TabImage& image = is_otr ? tab_inactive_otr_ : tab_inactive_; - DrawImageInt(canvas, image.image_l, bounds_.x(), bounds_.y()); - TileImageInt(canvas, image.image_c, - bounds_.x() + tab_inactive_.l_width, bounds_.y(), - width() - tab_inactive_.l_width - tab_inactive_.r_width, - height()); - DrawImageInt(canvas, image.image_r, - bounds_.x() + width() - tab_inactive_.r_width, bounds_.y()); + canvas->DrawBitmapInt(*image.image_l, bounds_.x(), bounds_.y()); + canvas->TileImageInt(*image.image_c, + bounds_.x() + tab_inactive_.l_width, bounds_.y(), + width() - tab_inactive_.l_width - tab_inactive_.r_width, + height()); + canvas->DrawBitmapInt(*image.image_r, + bounds_.x() + width() - tab_inactive_.r_width, + bounds_.y()); } -void TabRendererGtk::PaintActiveTabBackground(GtkWidget* canvas) { - DrawImageInt(canvas, tab_active_.image_l, bounds_.x(), bounds_.y()); - TileImageInt(canvas, tab_active_.image_c, - bounds_.x() + tab_active_.l_width, bounds_.y(), - width() - tab_active_.l_width - tab_active_.r_width, height()); - DrawImageInt(canvas, tab_active_.image_r, - bounds_.x() + width() - tab_active_.r_width, bounds_.y()); +void TabRendererGtk::PaintActiveTabBackground(ChromeCanvasPaint* canvas) { + canvas->DrawBitmapInt(*tab_active_.image_l, bounds_.x(), bounds_.y()); + canvas->TileImageInt(*tab_active_.image_c, + bounds_.x() + tab_active_.l_width, bounds_.y(), + width() - tab_active_.l_width - tab_active_.r_width, + height()); + canvas->DrawBitmapInt(*tab_active_.image_r, + bounds_.x() + width() - tab_active_.r_width, + bounds_.y()); } int TabRendererGtk::IconCapacity() const { @@ -414,10 +373,9 @@ void TabRendererGtk::InitResources() { LoadTabImages(); - // TODO(jhawkins): Move this into ChromeFont. Also, my default gtk font - // is really ugly compared to the other fonts being used in the UI. - title_font_ = load_default_font(); - DCHECK(title_font_); - title_font_height_ = gdk_char_height(title_font_, 'X'); + ResourceBundle& rb = ResourceBundle::GetSharedInstance(); + title_font_ = rb.GetFont(ResourceBundle::BaseFont); + title_font_height_ = title_font_.height(); + initialized_ = true; } diff --git a/chrome/browser/gtk/tabs/tab_renderer_gtk.h b/chrome/browser/gtk/tabs/tab_renderer_gtk.h index 80d3084..a79b7b2 100644 --- a/chrome/browser/gtk/tabs/tab_renderer_gtk.h +++ b/chrome/browser/gtk/tabs/tab_renderer_gtk.h @@ -9,6 +9,8 @@ #include "base/basictypes.h" #include "base/gfx/rect.h" +#include "chrome/common/gfx/chrome_canvas.h" +#include "chrome/common/gfx/chrome_font.h" #include "skia/include/SkBitmap.h" namespace gfx { @@ -55,7 +57,7 @@ class TabRendererGtk { void SetBounds(const gfx::Rect& bounds); // Paints the tab into |canvas|. - void Paint(GtkWidget* canvas); + void Paint(ChromeCanvasPaint* canvas); protected: const gfx::Rect& title_bounds() const { return title_bounds_; } @@ -70,17 +72,12 @@ class TabRendererGtk { // Returns the largest of the favicon, title text, and the close button. static int GetContentHeight(); - // TODO(jhawkins): Use a NineBox. - void DrawImageInt(GtkWidget* tabstrip, GdkPixbuf* pixbuf, int x, int y); - void TileImageInt(GtkWidget* tabstrip, GdkPixbuf* pixbuf, - int x, int y, int w, int h); - // Paint various portions of the Tab // TODO(jhawkins): Paint hover tab. - void PaintTabBackground(GtkWidget* canvas); - void PaintInactiveTabBackground(GtkWidget* canvas); - void PaintActiveTabBackground(GtkWidget* canvas); - void PaintLoadingAnimation(GtkWidget* canvas); + void PaintTabBackground(ChromeCanvasPaint* canvas); + void PaintInactiveTabBackground(ChromeCanvasPaint* canvas); + void PaintActiveTabBackground(ChromeCanvasPaint* canvas); + void PaintLoadingAnimation(ChromeCanvasPaint* canvas); // Returns the number of favicon-size elements that can fit in the tab's // current size. @@ -118,9 +115,9 @@ class TabRendererGtk { // TODO(jhawkins): Move into TabResources class. struct TabImage { - GdkPixbuf* image_l; - GdkPixbuf* image_c; - GdkPixbuf* image_r; + SkBitmap* image_l; + SkBitmap* image_c; + SkBitmap* image_r; int l_width; int r_width; }; @@ -130,19 +127,19 @@ class TabRendererGtk { static TabImage tab_hover_; struct ButtonImage { - GdkPixbuf* normal; - GdkPixbuf* hot; - GdkPixbuf* pushed; + SkBitmap* normal; + SkBitmap* hot; + SkBitmap* pushed; int width; int height; }; static ButtonImage close_button_; static ButtonImage newtab_button_; - static GdkFont* title_font_; + static ChromeFont title_font_; static int title_font_height_; - static GdkPixbuf* download_icon_; + static SkBitmap* download_icon_; static int download_icon_width_; static int download_icon_height_; diff --git a/chrome/browser/gtk/tabs/tab_strip_gtk.cc b/chrome/browser/gtk/tabs/tab_strip_gtk.cc index ba369c8..e854d10 100644 --- a/chrome/browser/gtk/tabs/tab_strip_gtk.cc +++ b/chrome/browser/gtk/tabs/tab_strip_gtk.cc @@ -7,6 +7,7 @@ #include "base/gfx/gtk_util.h" #include "chrome/browser/browser.h" #include "chrome/browser/tab_contents/tab_contents.h" +#include "chrome/common/gfx/chrome_canvas.h" #include "chrome/common/l10n_util.h" #include "chrome/common/resource_bundle.h" #include "grit/generated_resources.h" @@ -21,6 +22,8 @@ const int kNewTabButtonVOffset = 5; // which results in overlapping tabs. const int kTabHOffset = -16; +SkBitmap* background = NULL; + inline int Round(double x) { return static_cast<int>(floor(x + 0.5)); } @@ -35,8 +38,6 @@ gfx::Rect GetInitialWidgetBounds(GtkWidget* widget) { } // namespace -NineBox* TabStripGtk::background_ = NULL; - //////////////////////////////////////////////////////////////////////////////// // TabStripGtk, public: @@ -56,7 +57,10 @@ TabStripGtk::~TabStripGtk() { void TabStripGtk::Init() { model_->AddObserver(this); - InitBackgroundNineBox(); + if (!background) { + ResourceBundle &rb = ResourceBundle::GetSharedInstance(); + background = rb.GetBitmapNamed(IDR_WINDOW_TOP_CENTER); + } tabstrip_.Own(gtk_drawing_area_new()); gtk_widget_set_size_request(tabstrip_.get(), -1, @@ -372,7 +376,12 @@ void TabStripGtk::GetDesiredTabWidths(int tab_count, // static gboolean TabStripGtk::OnExpose(GtkWidget* widget, GdkEventExpose* e, TabStripGtk* tabstrip) { - background_->RenderToWidget(widget); + ChromeCanvasPaint canvas(e); + if (canvas.isEmpty()) + return TRUE; + + canvas.TileImageInt(*background, 0, 0, tabstrip->bounds_.width(), + tabstrip->bounds_.height()); // Paint the tabs in reverse order, so they stack to the left. TabGtk* selected_tab = NULL; @@ -383,7 +392,7 @@ gboolean TabStripGtk::OnExpose(GtkWidget* widget, GdkEventExpose* e, // the model will be different to this object, e.g. when a Tab is being // removed after its TabContents has been destroyed. if (!tab->IsSelected()) { - tab->Paint(widget); + tab->Paint(&canvas); } else { selected_tab = tab; } @@ -391,7 +400,7 @@ gboolean TabStripGtk::OnExpose(GtkWidget* widget, GdkEventExpose* e, // Paint the selected tab last, so it overlaps all the others. if (selected_tab) - selected_tab->Paint(widget); + selected_tab->Paint(&canvas); return TRUE; } @@ -404,17 +413,3 @@ gboolean TabStripGtk::OnConfigure(GtkWidget* widget, GdkEventConfigure* event, tabstrip->Layout(); return TRUE; } - -// static -void TabStripGtk::InitBackgroundNineBox() { - if (background_) - return; - - ResourceBundle &rb = ResourceBundle::GetSharedInstance(); - - GdkPixbuf* images[9] = {0}; - images[0] = rb.LoadPixbuf(IDR_WINDOW_TOP_CENTER); - images[1] = rb.LoadPixbuf(IDR_WINDOW_TOP_CENTER); - images[2] = rb.LoadPixbuf(IDR_WINDOW_TOP_CENTER); - background_ = new NineBox(images); -} diff --git a/chrome/browser/gtk/tabs/tab_strip_gtk.h b/chrome/browser/gtk/tabs/tab_strip_gtk.h index 695cd1a..2508300 100644 --- a/chrome/browser/gtk/tabs/tab_strip_gtk.h +++ b/chrome/browser/gtk/tabs/tab_strip_gtk.h @@ -9,7 +9,6 @@ #include <vector> #include "base/gfx/rect.h" -#include "chrome/browser/gtk/nine_box.h" #include "chrome/browser/gtk/tabs/tab_gtk.h" #include "chrome/browser/tabs/tab_strip_model.h" #include "chrome/common/owned_widget_gtk.h" @@ -106,9 +105,6 @@ class TabStripGtk : public TabStripModelObserver, // stable representations of Tab positions. void GenerateIdealBounds(); - // Loads the background resource into a NineBox. - static void InitBackgroundNineBox(); - // The Tabs we contain, and their last generated "good" bounds. struct TabData { TabGtk* tab; @@ -137,9 +133,6 @@ class TabStripGtk : public TabStripModelObserver, // TODO(beng): (Cleanup) this would be better named "needs_resize_layout_". bool resize_layout_scheduled_; - // The NineBox that renders the tabstrip background. - static NineBox* background_; - // The drawing area widget. OwnedWidgetGtk tabstrip_; |