Index: chrome/browser/ui/cocoa/panels/panel_cocoa.mm |
diff --git a/chrome/browser/ui/cocoa/panels/panel_cocoa.mm b/chrome/browser/ui/cocoa/panels/panel_cocoa.mm |
index 722d88ed24bbe7f2db2ddfa78a63d2fc9319d6c8..3c0e79a50dc2344870bb56abfa8026d9f9f1c65e 100644 |
--- a/chrome/browser/ui/cocoa/panels/panel_cocoa.mm |
+++ b/chrome/browser/ui/cocoa/panels/panel_cocoa.mm |
@@ -210,8 +210,22 @@ void PanelCocoa::HandlePanelKeyboardEvent( |
[event_window redispatchKeyEvent:event.os_event]; |
} |
-void PanelCocoa::FullScreenModeChanged( |
- bool is_full_screen) { |
+void PanelCocoa::FullScreenModeChanged(bool is_full_screen) { |
+ if (!is_shown_) { |
+ // If the panel window is not shown due to that a Chrome tab window is in |
+ // fullscreen mode when the panel is being created, we need to show the |
+ // panel window now. In addition, its titlebar needs to be updated since it |
+ // is not done at the panel creation time. |
+ if (!is_full_screen) { |
+ ShowPanelInactive(); |
+ UpdatePanelTitleBar(); |
+ } |
+ |
+ // No need to proceed when the panel window was not shown previously. |
+ // We either show the panel window or do not show it depending on current |
+ // full screen state. |
+ return; |
+ } |
[controller_ fullScreenModeChanged:is_full_screen]; |
} |