| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/exclusive_access/fullscreen_controller.h" | 5 #include "chrome/browser/ui/exclusive_access/fullscreen_controller.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/location.h" | 9 #include "base/location.h" |
| 10 #include "base/metrics/histogram_macros.h" | 10 #include "base/metrics/histogram_macros.h" |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 // Tab Fullscreen -> Normal. | 179 // Tab Fullscreen -> Normal. |
| 180 ToggleFullscreenModeInternal(TAB); | 180 ToggleFullscreenModeInternal(TAB); |
| 181 return; | 181 return; |
| 182 } | 182 } |
| 183 | 183 |
| 184 // Tab Fullscreen -> Browser Fullscreen. | 184 // Tab Fullscreen -> Browser Fullscreen. |
| 185 if (state_prior_to_tab_fullscreen_ == STATE_BROWSER_FULLSCREEN) | 185 if (state_prior_to_tab_fullscreen_ == STATE_BROWSER_FULLSCREEN) |
| 186 exclusive_access_context->UpdateUIForTabFullscreen( | 186 exclusive_access_context->UpdateUIForTabFullscreen( |
| 187 ExclusiveAccessContext::STATE_EXIT_TAB_FULLSCREEN); | 187 ExclusiveAccessContext::STATE_EXIT_TAB_FULLSCREEN); |
| 188 | 188 |
| 189 #if defined(OS_MACOSX) | |
| 190 // Clear the bubble URL, which forces the Mac UI to redraw. | |
| 191 exclusive_access_manager()->UpdateExclusiveAccessExitBubbleContent(); | |
| 192 #endif // defined(OS_MACOSX) | |
| 193 | |
| 194 // If currently there is a tab in "tab fullscreen" mode and fullscreen | 189 // If currently there is a tab in "tab fullscreen" mode and fullscreen |
| 195 // was not caused by it (i.e., previously it was in "browser fullscreen" | 190 // was not caused by it (i.e., previously it was in "browser fullscreen" |
| 196 // mode), we need to switch back to "browser fullscreen" mode. In this | 191 // mode), we need to switch back to "browser fullscreen" mode. In this |
| 197 // case, all we have to do is notifying the tab that it has exited "tab | 192 // case, all we have to do is notifying the tab that it has exited "tab |
| 198 // fullscreen" mode. | 193 // fullscreen" mode. |
| 199 NotifyTabExclusiveAccessLost(); | 194 NotifyTabExclusiveAccessLost(); |
| 200 | 195 |
| 201 // This is only a change between Browser and Tab fullscreen. We generate | 196 // This is only a change between Browser and Tab fullscreen. We generate |
| 202 // a fullscreen notification now because there is no window change. | 197 // a fullscreen notification now because there is no window change. |
| 203 PostFullscreenChangeNotification(true); | 198 PostFullscreenChangeNotification(true); |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 452 return fullscreened_origin_; | 447 return fullscreened_origin_; |
| 453 | 448 |
| 454 return exclusive_access_tab()->GetLastCommittedURL(); | 449 return exclusive_access_tab()->GetLastCommittedURL(); |
| 455 } | 450 } |
| 456 | 451 |
| 457 GURL FullscreenController::GetEmbeddingOrigin() const { | 452 GURL FullscreenController::GetEmbeddingOrigin() const { |
| 458 DCHECK(exclusive_access_tab()); | 453 DCHECK(exclusive_access_tab()); |
| 459 | 454 |
| 460 return exclusive_access_tab()->GetLastCommittedURL(); | 455 return exclusive_access_tab()->GetLastCommittedURL(); |
| 461 } | 456 } |
| OLD | NEW |