blob: 8ceaecd401917ef4ee5aca01901249ac7b154781 [file] [log] [blame]
[email protected]700849f2013-04-30 17:49:201// Copyright (c) 2013 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "chrome/browser/fullscreen.h"
6
7#include "ash/root_window_controller.h"
warxe058d072016-12-07 22:36:148#include "ash/shell.h"
sky2d6a8e02016-08-26 05:27:359#include "chrome/browser/ui/ash/ash_util.h"
warxe058d072016-12-07 22:36:1410#include "ui/display/display.h"
11#include "ui/display/screen.h"
[email protected]700849f2013-04-30 17:49:2012
warxe058d072016-12-07 22:36:1413bool IsFullScreenMode(int64_t display_id) {
fwang052ae582017-03-01 06:29:3614 if (ash_util::IsRunningInMash()) {
sky2d6a8e02016-08-26 05:27:3515 // TODO: http://crbug.com/640390.
16 NOTIMPLEMENTED();
17 return false;
18 }
warxe058d072016-12-07 22:36:1419
20 for (ash::RootWindowController* controller :
skycb4be5b2017-04-06 17:52:4521 ash::Shell::Get()->GetAllRootWindowControllers()) {
warxe058d072016-12-07 22:36:1422 if (display::Screen::GetScreen()
23 ->GetDisplayNearestWindow(controller->GetRootWindow())
24 .id() == display_id) {
25 return controller && controller->GetWindowForFullscreenMode();
26 }
27 }
28
29 return false;
[email protected]700849f2013-04-30 17:49:2030}