Index: chrome/browser/gtk/browser_window_gtk.cc |
diff --git a/chrome/browser/gtk/browser_window_gtk.cc b/chrome/browser/gtk/browser_window_gtk.cc |
index db15bd9919c7aec51ba0c4c02cc90207851b7304..567535af2f0338d82dbd4ad9de2d8f6bd6a89845 100644 |
--- a/chrome/browser/gtk/browser_window_gtk.cc |
+++ b/chrome/browser/gtk/browser_window_gtk.cc |
@@ -36,6 +36,7 @@ |
#include "chrome/browser/gtk/clear_browsing_data_dialog_gtk.h" |
#include "chrome/browser/gtk/download_shelf_gtk.h" |
#include "chrome/browser/gtk/edit_search_engine_dialog.h" |
+#include "chrome/browser/gtk/extension_shelf_gtk.h" |
#include "chrome/browser/gtk/find_bar_gtk.h" |
#include "chrome/browser/gtk/go_button_gtk.h" |
#include "chrome/browser/gtk/gtk_theme_provider.h" |
@@ -645,10 +646,11 @@ void BrowserWindowGtk::SetFullscreen(bool fullscreen) { |
UpdateCustomFrame(); |
if (fullscreen) { |
- // These three balanced by ShowSupportedWindowFeatures(). |
+ // These four balanced by ShowSupportedWindowFeatures(). |
toolbar_->Hide(); |
tabstrip_->Hide(); |
bookmark_bar_->Hide(false); |
+ extension_shelf_->Hide(); |
gtk_window_fullscreen(window_); |
} else { |
@@ -904,6 +906,10 @@ void BrowserWindowGtk::MaybeShowBookmarkBar(TabContents* contents, |
} |
} |
+void BrowserWindowGtk::MaybeShowExtensionShelf() { |
+ extension_shelf_->Show(); |
+} |
+ |
void BrowserWindowGtk::UpdateDevToolsForContents(TabContents* contents) { |
TabContents* old_devtools = devtools_container_->GetTabContents(); |
if (old_devtools) |
@@ -1108,6 +1114,11 @@ void BrowserWindowGtk::InitWidgets() { |
this)); |
bookmark_bar_->AddBookmarkbarToBox(content_vbox_); |
+ extension_shelf_.reset(new ExtensionShelfGtk(browser()->profile(), |
+ browser_.get())); |
+ extension_shelf_->AddShelfToBox(content_vbox_); |
+ MaybeShowExtensionShelf(); |
+ |
// This vbox surrounds the render area: find bar, info bars and render view. |
// The reason is that this area as a whole needs to be grouped in its own |
// GdkWindow hierarchy so that animations originating inside it (infobar, |
@@ -1407,6 +1418,9 @@ void BrowserWindowGtk::ShowSupportedWindowFeatures() { |
if (IsBookmarkBarSupported()) |
MaybeShowBookmarkBar(browser_->GetSelectedTabContents(), false); |
+ |
+ if (IsExtensionShelfSupported()) |
+ MaybeShowExtensionShelf(); |
} |
void BrowserWindowGtk::HideUnsupportedWindowFeatures() { |
@@ -1418,6 +1432,9 @@ void BrowserWindowGtk::HideUnsupportedWindowFeatures() { |
if (!IsBookmarkBarSupported()) |
bookmark_bar_->Hide(false); |
+ |
+ if (!IsExtensionShelfSupported()) |
+ extension_shelf_->Hide(); |
} |
bool BrowserWindowGtk::IsTabStripSupported() { |
@@ -1433,6 +1450,10 @@ bool BrowserWindowGtk::IsBookmarkBarSupported() { |
return browser_->SupportsWindowFeature(Browser::FEATURE_BOOKMARKBAR); |
} |
+bool BrowserWindowGtk::IsExtensionShelfSupported() { |
+ return browser_->SupportsWindowFeature(Browser::FEATURE_EXTENSIONSHELF); |
+} |
+ |
bool BrowserWindowGtk::GetWindowEdge(int x, int y, GdkWindowEdge* edge) { |
if (!use_custom_frame_.GetValue()) |
return false; |