| Index: chrome/browser/gtk/extension_shelf_gtk.cc
|
| diff --git a/chrome/browser/gtk/extension_shelf_gtk.cc b/chrome/browser/gtk/extension_shelf_gtk.cc
|
| index 121f77dade6f9a9f1ca2f92b29f40b8b87101255..0383dcc7ffd1117df2e0f37d6a4b9a79064c3f01 100644
|
| --- a/chrome/browser/gtk/extension_shelf_gtk.cc
|
| +++ b/chrome/browser/gtk/extension_shelf_gtk.cc
|
| @@ -37,6 +37,10 @@ class ExtensionShelfGtk::Toolstrip {
|
| void AddToolstripToBox(GtkWidget* box);
|
| void RemoveToolstripFromBox(GtkWidget* box);
|
|
|
| + void SetBackground(const SkBitmap& background) {
|
| + host_->view()->SetBackground(background);
|
| + }
|
| +
|
| private:
|
| void Init();
|
|
|
| @@ -93,7 +97,9 @@ void ExtensionShelfGtk::Hide() {
|
|
|
| void ExtensionShelfGtk::ToolstripInsertedAt(ExtensionHost* host,
|
| int index) {
|
| + InitBackground();
|
| Toolstrip* toolstrip = new Toolstrip(host);
|
| + toolstrip->SetBackground(*background_.get());
|
| toolstrip->AddToolstripToBox(shelf_hbox_);
|
| toolstrips_.insert(toolstrip);
|
| model_->SetToolstripDataAt(index, toolstrip);
|
| @@ -188,6 +194,17 @@ void ExtensionShelfGtk::Init(Profile* profile) {
|
| model_->AddObserver(this);
|
| }
|
|
|
| +void ExtensionShelfGtk::InitBackground() {
|
| + if (background_.get())
|
| + return;
|
| + background_.reset(new SkBitmap);
|
| + background_->setConfig(SkBitmap::kARGB_8888_Config, 3, 3);
|
| + background_->allocPixels();
|
| + background_->eraseRGB(kBackgroundColor.red >> 8,
|
| + kBackgroundColor.green >> 8,
|
| + kBackgroundColor.blue >> 8);
|
| +}
|
| +
|
| void ExtensionShelfGtk::AdjustHeight() {
|
| if (model_->empty() || toolstrips_.empty()) {
|
| // It's possible that |model_| is not empty, but |toolstrips_| are empty
|
|
|