Index: chrome/browser/ui/exclusive_access/fullscreen_controller.cc |
diff --git a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc |
index 04d2a6de8f66ede1e09f2b5728bdeeaab07a86f4..70ee7a5dcdf65958aae4fe3ae182b3df1f3b4351 100644 |
--- a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc |
+++ b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc |
@@ -238,6 +238,15 @@ void FullscreenController::OnTabClosing(WebContents* web_contents) { |
ExclusiveAccessControllerBase::OnTabClosing(web_contents); |
} |
+void FullscreenController::WindowFullscreenStateWillChange() { |
+ auto* exclusive_access_context = exclusive_access_manager()->context(); |
Nico
2017/02/17 15:53:46
nit: style guide says "only use auto if type obvio
Sidney San Martín
2017/02/17 16:07:08
Done.
|
+ if (exclusive_access_context->IsFullscreen()) { |
+ exclusive_access_context->HideDownloadShelf(); |
+ } else { |
+ exclusive_access_context->UnhideDownloadShelf(); |
+ } |
+} |
+ |
void FullscreenController::WindowFullscreenStateChanged() { |
reentrant_window_state_change_call_check_ = true; |
ExclusiveAccessContext* const exclusive_access_context = |
@@ -249,9 +258,6 @@ void FullscreenController::WindowFullscreenStateChanged() { |
toggled_into_fullscreen_ = false; |
extension_caused_fullscreen_ = GURL(); |
NotifyTabExclusiveAccessLost(); |
- exclusive_access_context->UnhideDownloadShelf(); |
- } else { |
- exclusive_access_context->HideDownloadShelf(); |
} |
} |