Commit 9f064ab1 authored by Elliot Glaysher's avatar Elliot Glaysher Committed by Commit Bot

[ash] Don't depend on ash to go fullscreen.

When the user releases the mouse on a drag in ash, the new window must
go fullscreen if the source window was previously fullscreen. Instead of
directly fiddling with ash state for this, set the fullscreen bit on the
window, which will be synced.

Bug: 756091
Change-Id: I26df2c1932ec2e185d9cb527e573438cc26bafa0
Reviewed-on: https://chromium-review.googlesource.com/671656Reviewed-by: default avatarScott Violet <sky@chromium.org>
Reviewed-by: default avatarTom Sepez <tsepez@chromium.org>
Reviewed-by: default avatarJames Cook <jamescook@chromium.org>
Commit-Queue: Elliot Glaysher <erg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#502958}
parent 4ea545ab
...@@ -41,7 +41,6 @@ ...@@ -41,7 +41,6 @@
#include "ui/views/widget/widget.h" #include "ui/views/widget/widget.h"
#if defined(USE_ASH) #if defined(USE_ASH)
#include "ash/accelerators/accelerator_commands.h" // nogncheck
#include "ash/shell.h" // nogncheck #include "ash/shell.h" // nogncheck
#include "ash/wm/tablet_mode/tablet_mode_controller.h" // nogncheck #include "ash/wm/tablet_mode/tablet_mode_controller.h" // nogncheck
#include "ash/wm/window_state.h" // nogncheck #include "ash/wm/window_state.h" // nogncheck
...@@ -1533,7 +1532,7 @@ void TabDragController::MaximizeAttachedWindow() { ...@@ -1533,7 +1532,7 @@ void TabDragController::MaximizeAttachedWindow() {
if (was_source_fullscreen_) { if (was_source_fullscreen_) {
// In fullscreen mode it is only possible to get here if the source // In fullscreen mode it is only possible to get here if the source
// was in "immersive fullscreen" mode, so toggle it back on. // was in "immersive fullscreen" mode, so toggle it back on.
ash::accelerators::ToggleFullscreen(); GetAttachedBrowserWidget()->SetFullscreen(true);
} }
#endif #endif
} }
......
...@@ -4,8 +4,10 @@ ...@@ -4,8 +4,10 @@
#include "chrome/browser/ui/views/tabs/window_finder.h" #include "chrome/browser/ui/views/tabs/window_finder.h"
// The direct usage of //ash/ is fine here, as this code is only executed in
// classic ash. See //c/b/u/v/tabs/window_finder_chromeos.h.
#include "ash/public/cpp/shell_window_ids.h" #include "ash/public/cpp/shell_window_ids.h"
#include "ash/wm/root_window_finder.h" #include "ash/wm/root_window_finder.h" // mash-ok
#include "ui/aura/client/screen_position_client.h" #include "ui/aura/client/screen_position_client.h"
#include "ui/aura/window.h" #include "ui/aura/window.h"
#include "ui/aura/window_event_dispatcher.h" #include "ui/aura/window_event_dispatcher.h"
......
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