[email protected] | 700849f | 2013-04-30 17:49:20 | [diff] [blame] | 1 | // 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" | ||||
warx | e058d07 | 2016-12-07 22:36:14 | [diff] [blame] | 8 | #include "ash/shell.h" |
sky | 2d6a8e0 | 2016-08-26 05:27:35 | [diff] [blame] | 9 | #include "chrome/browser/ui/ash/ash_util.h" |
warx | e058d07 | 2016-12-07 22:36:14 | [diff] [blame] | 10 | #include "ui/display/display.h" |
11 | #include "ui/display/screen.h" | ||||
[email protected] | 700849f | 2013-04-30 17:49:20 | [diff] [blame] | 12 | |
warx | e058d07 | 2016-12-07 22:36:14 | [diff] [blame] | 13 | bool IsFullScreenMode(int64_t display_id) { |
fwang | 052ae58 | 2017-03-01 06:29:36 | [diff] [blame] | 14 | if (ash_util::IsRunningInMash()) { |
sky | 2d6a8e0 | 2016-08-26 05:27:35 | [diff] [blame] | 15 | // TODO: http://crbug.com/640390. |
16 | NOTIMPLEMENTED(); | ||||
17 | return false; | ||||
18 | } | ||||
warx | e058d07 | 2016-12-07 22:36:14 | [diff] [blame] | 19 | |
20 | for (ash::RootWindowController* controller : | ||||
sky | cb4be5b | 2017-04-06 17:52:45 | [diff] [blame] | 21 | ash::Shell::Get()->GetAllRootWindowControllers()) { |
warx | e058d07 | 2016-12-07 22:36:14 | [diff] [blame] | 22 | 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] | 700849f | 2013-04-30 17:49:20 | [diff] [blame] | 30 | } |