blob: 932a548681e0a3a98a16043430056233d61cc416 [file] [log] [blame]
tonikitoob10ea66f2016-11-07 23:52:011// Copyright 2016 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
Alexander Dunaev8e719902019-07-18 08:37:397#include <algorithm>
tonikitoob10ea66f2016-11-07 23:52:018
Alexander Dunaev8e719902019-07-18 08:37:399#include "chrome/browser/ui/browser.h"
10#include "chrome/browser/ui/browser_list.h"
11#include "chrome/browser/ui/browser_window.h"
12
13// The Ozone implementation is limited to chrome only: it checks whether any
14// existing browser object has a fullscreen window, but does not try to find
15// if there are ones belonging to other applications.
Tom Anderson13e9b842017-11-02 20:07:3516bool IsFullScreenMode() {
Alexander Dunaev8e719902019-07-18 08:37:3917 const auto* list = BrowserList::GetInstance();
18 return std::any_of(list->begin(), list->end(), [](const Browser* browser) {
19 return browser->window()->IsFullscreen();
20 });
tonikitoob10ea66f2016-11-07 23:52:0121}