Chromium Code Reviews| 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 9f18156b6f09cca7b8ef2857e9901875a6db8cd8..c7f7f9a54678bc19de4b158f4f59b3e37a41352a 100644 |
| --- a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc |
| +++ b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc |
| @@ -273,7 +273,8 @@ void FullscreenController::OnTabDetachedFromView(WebContents* old_contents) { |
| void FullscreenController::OnTabClosing(WebContents* web_contents) { |
| if (IsFullscreenForCapturedTab(web_contents)) { |
| - web_contents->ExitFullscreen(); |
| + bool will_cause_resize = IsFullscreenCausedByTab(); |
| + web_contents->ExitFullscreen(will_cause_resize); |
|
Peter Kasting
2016/01/05 20:34:26
Nit: Inline:
web_contents->ExitFullscreen(IsF
bokan
2016/01/06 17:48:32
Using the local was actually suggested by scheib@
Peter Kasting
2016/01/06 20:00:28
Readers who don't already know what ExitFullscreen
scheib
2016/01/06 21:21:01
A compromise could be
web_contents->ExitFulls
Peter Kasting
2016/01/06 21:26:04
All programmers should have an easy and near-insta
bokan
2016/01/06 21:40:57
I'm personally one such person who doesn't have th
Peter Kasting
2016/01/06 21:56:41
Why? You don't have Chromium codesearch bookmarke
scheib
2016/01/06 22:06:56
I don't think we should spend much time debating.
|
| } else { |
| ExclusiveAccessControllerBase::OnTabClosing(web_contents); |
| } |
| @@ -300,7 +301,8 @@ bool FullscreenController::HandleUserPressedEscape() { |
| WebContents* const active_web_contents = |
| exclusive_access_manager()->context()->GetActiveWebContents(); |
| if (IsFullscreenForCapturedTab(active_web_contents)) { |
| - active_web_contents->ExitFullscreen(); |
| + bool will_cause_resize = IsFullscreenCausedByTab(); |
| + active_web_contents->ExitFullscreen(will_cause_resize); |
|
Peter Kasting
2016/01/05 20:34:26
Nit: Inline as above.
|
| return true; |
| } else if (IsWindowFullscreenForTabOrPending()) { |
|
Peter Kasting
2016/01/05 20:34:26
Nit: No "else" after "return".
Can reverse this c
bokan
2016/01/06 17:48:32
Done.
|
| ExitExclusiveAccessIfNecessary(); |
| @@ -409,9 +411,10 @@ void FullscreenController::NotifyTabExclusiveAccessLost() { |
| WebContents* web_contents = exclusive_access_tab(); |
| SetTabWithExclusiveAccess(nullptr); |
| fullscreened_origin_ = GURL(); |
| + bool will_cause_resize = IsFullscreenCausedByTab(); |
| state_prior_to_tab_fullscreen_ = STATE_INVALID; |
| tab_fullscreen_accepted_ = false; |
| - web_contents->ExitFullscreen(); |
| + web_contents->ExitFullscreen(will_cause_resize); |
|
Peter Kasting
2016/01/05 20:34:26
Nit: Inline as above.
|
| exclusive_access_manager()->UpdateExclusiveAccessExitBubbleContent(); |
| } |
| } |