Index: chrome/browser/ui/gtk/browser_window_gtk.cc |
diff --git a/chrome/browser/ui/gtk/browser_window_gtk.cc b/chrome/browser/ui/gtk/browser_window_gtk.cc |
index 2d37e6903e0a6ca2e6dd59f92b17fa832a3bd105..6782e27f2fe0cb38046dbf20eb27ef7052a7b731 100644 |
--- a/chrome/browser/ui/gtk/browser_window_gtk.cc |
+++ b/chrome/browser/ui/gtk/browser_window_gtk.cc |
@@ -1819,7 +1819,8 @@ void BrowserWindowGtk::InitWidgets() { |
tabstrip_->Init(); |
// Build the titlebar (tabstrip + header space + min/max/close buttons). |
- titlebar_.reset(new BrowserTitlebar(this, window_)); |
+ titlebar_.reset(CreateBrowserTitlebar()); |
+ titlebar_->Init(); |
// Insert the tabstrip into the window. |
gtk_box_pack_start(GTK_BOX(window_vbox_), titlebar_->widget(), FALSE, FALSE, |
@@ -2454,6 +2455,10 @@ bool BrowserWindowGtk::UsingCustomPopupFrame() const { |
(browser()->is_type_popup() || browser()->is_type_panel()); |
} |
+BrowserTitlebar* BrowserWindowGtk::CreateBrowserTitlebar() { |
+ return new BrowserTitlebar(this, window_); |
+} |
+ |
bool BrowserWindowGtk::GetWindowEdge(int x, int y, GdkWindowEdge* edge) { |
if (!UseCustomFrame()) |
return false; |