Index: chrome/browser/ui/cocoa/browser_window_cocoa.mm |
diff --git a/chrome/browser/ui/cocoa/browser_window_cocoa.mm b/chrome/browser/ui/cocoa/browser_window_cocoa.mm |
index 515594d62ca41f120e0e80426625ac8ceb49b8b2..f1d1c176dd97e0c4b499b077b7c7c1bce2918bcd 100644 |
--- a/chrome/browser/ui/cocoa/browser_window_cocoa.mm |
+++ b/chrome/browser/ui/cocoa/browser_window_cocoa.mm |
@@ -16,6 +16,7 @@ |
#include "chrome/browser/chrome_notification_types.h" |
#include "chrome/browser/download/download_shelf.h" |
#include "chrome/browser/extensions/extension_util.h" |
+#include "chrome/browser/extensions/sidebar_container.h" |
#include "chrome/browser/extensions/tab_helper.h" |
#include "chrome/browser/fullscreen.h" |
#include "chrome/browser/profiles/profile.h" |
@@ -316,6 +317,7 @@ void BrowserWindowCocoa::BookmarkBarStateChanged( |
void BrowserWindowCocoa::UpdateDevTools() { |
[controller_ updateDevToolsForContents: |
browser_->tab_strip_model()->GetActiveWebContents()]; |
+ UpdateSidebarForContents(nullptr); |
} |
void BrowserWindowCocoa::UpdateLoadingAnimations(bool should_animate) { |
@@ -830,6 +832,14 @@ void BrowserWindowCocoa::ShowAvatarBubbleFromAvatarButton( |
withServiceType:manage_accounts_params.service_type]; |
} |
+void BrowserWindowCocoa::UpdateSidebarForContents( |
+ content::WebContents* sidebar_contents) { |
+ WebContents* web_contents = |
+ browser_->tab_strip_model()->GetActiveWebContents(); |
+ [controller_ updateSidebarForContents:web_contents |
+ sidebar_contents:sidebar_contents]; |
+} |
+ |
int |
BrowserWindowCocoa::GetRenderViewHeightInsetWithDetachedBookmarkBar() { |
if (browser_->bookmark_bar_state() != BookmarkBar::DETACHED) |
@@ -865,3 +875,11 @@ void BrowserWindowCocoa::HideDownloadShelf() { |
if (statusBubble) |
statusBubble->Hide(); |
} |
+ |
+void BrowserWindowCocoa::ShowSidebar(content::WebContents* sidebar_contents) { |
+ UpdateSidebarForContents(sidebar_contents); |
+} |
+ |
+void BrowserWindowCocoa::HideSidebar() { |
+ UpdateSidebarForContents(nullptr); |
+} |