Commit 139c3db1 authored by Ivan Sandrk's avatar Ivan Sandrk Committed by Commit Bot

[Bugfix] Couldn't enter locked-fullscreen while in tablet mode

Locked fullscreen mode wasn't working for devices that were in tablet mode.

Needed to put SetLockedFullscreenState below window()->Show() as that one
was resetting the locked-fullscreen mode.

Bug: chromium:857125
Change-Id: Ic36e2dc0f4f76e05bf713b1f2dcc384d1ead308e
Reviewed-on: https://chromium-review.googlesource.com/1120526
Commit-Queue: Ivan Šandrk <isandrk@chromium.org>
Reviewed-by: default avatarIstiaque Ahmed <lazyboy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#572226}
parent 450a8893
...@@ -645,20 +645,21 @@ ExtensionFunction::ResponseAction WindowsCreateFunction::Run() { ...@@ -645,20 +645,21 @@ ExtensionFunction::ResponseAction WindowsCreateFunction::Run() {
} }
chrome::SelectNumberedTab(new_window, 0); chrome::SelectNumberedTab(new_window, 0);
if (focused)
new_window->window()->Show();
else
new_window->window()->ShowInactive();
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
// Lock the window fullscreen only after the new tab has been created // Lock the window fullscreen only after the new tab has been created
// (otherwise the tabstrip is empty). // (otherwise the tabstrip is empty), and window()->show() has been called
// (otherwise that resets the locked mode for devices in tablet mode).
if (create_data && if (create_data &&
create_data->state == windows::WINDOW_STATE_LOCKED_FULLSCREEN) { create_data->state == windows::WINDOW_STATE_LOCKED_FULLSCREEN) {
SetLockedFullscreenState(new_window, true); SetLockedFullscreenState(new_window, true);
} }
#endif #endif
if (focused)
new_window->window()->Show();
else
new_window->window()->ShowInactive();
std::unique_ptr<base::Value> result; std::unique_ptr<base::Value> result;
if (new_window->profile()->IsOffTheRecord() && if (new_window->profile()->IsOffTheRecord() &&
!browser_context()->IsOffTheRecord() && !browser_context()->IsOffTheRecord() &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment