Commit 7d1f3a0a authored by Antonio Gomes's avatar Antonio Gomes Committed by Commit Bot

Implement ImmersiveContextLacros::GetDisplayBoundsInScreen()

With this method implemented, immersive fullscreen starts to visually
behave in Lacros/Chrome: the slide-down tabstrip shows up upon user
hovering over the screen upper boundary.

BUG=1113900
R=jamescook@chromium.org

Change-Id: I2fa155c108854b709d49e020eb7add4b2bc6e14c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2519481Reviewed-by: default avatarJames Cook <jamescook@chromium.org>
Commit-Queue: Antonio Gomes <tonikitoo@igalia.com>
Cr-Commit-Position: refs/heads/master@{#824047}
parent 770f00ec
......@@ -5,6 +5,9 @@
#include "chrome/browser/lacros/immersive_context_lacros.h"
#include "chromeos/ui/frame/immersive/immersive_fullscreen_controller.h"
#include "ui/display/display.h"
#include "ui/display/screen.h"
#include "ui/views/widget/widget.h"
ImmersiveContextLacros::ImmersiveContextLacros() = default;
......@@ -18,8 +21,10 @@ void ImmersiveContextLacros::OnEnteringOrExitingImmersive(
gfx::Rect ImmersiveContextLacros::GetDisplayBoundsInScreen(
views::Widget* widget) {
NOTIMPLEMENTED_LOG_ONCE();
return gfx::Rect();
display::Display display =
display::Screen::GetScreen()->GetDisplayNearestWindow(
widget->GetNativeWindow());
return display.bounds();
}
bool ImmersiveContextLacros::DoesAnyWindowHaveCapture() {
......
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