Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(960)

Unified Diff: chrome/browser/ui/exclusive_access/fullscreen_controller.cc

Issue 1488653002: Fix scroll restoration when exiting fullscreen mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Trying to fix test broken on Mac Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 3c7018ccf49f8d54c38ee112054071ec6037fc46..2f69c677f7616d5ad3a923735236433ac920d3c8 100644
--- a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc
+++ b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc
@@ -272,7 +272,7 @@ void FullscreenController::OnTabDetachedFromView(WebContents* old_contents) {
void FullscreenController::OnTabClosing(WebContents* web_contents) {
if (IsFullscreenForCapturedTab(web_contents)) {
- web_contents->ExitFullscreen();
+ web_contents->ExitFullscreen(IsFullscreenCausedByTab());
scheib 2016/01/04 22:26:48 For readability please use the pattern you used be
bokan 2016/01/05 15:37:11 Done.
} else {
ExclusiveAccessControllerBase::OnTabClosing(web_contents);
}
@@ -299,7 +299,7 @@ bool FullscreenController::HandleUserPressedEscape() {
WebContents* const active_web_contents =
exclusive_access_manager()->context()->GetActiveWebContents();
if (IsFullscreenForCapturedTab(active_web_contents)) {
- active_web_contents->ExitFullscreen();
+ active_web_contents->ExitFullscreen(IsFullscreenCausedByTab());
scheib 2016/01/04 22:26:48 For readability please use the pattern you used be
bokan 2016/01/05 15:37:11 Done.
return true;
} else if (IsWindowFullscreenForTabOrPending()) {
ExitExclusiveAccessIfNecessary();
@@ -408,9 +408,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);
exclusive_access_manager()->UpdateExclusiveAccessExitBubbleContent();
}
}

Powered by Google App Engine
This is Rietveld 408576698