Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6265)

Unified Diff: ash/common/wm/fullscreen_window_finder.cc

Issue 2736573002: chromeos: Move files in //ash/common to //ash, part 2 (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/common/wm/fullscreen_window_finder.h ('k') | ash/common/wm/immersive_context_ash.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/wm/fullscreen_window_finder.cc
diff --git a/ash/common/wm/fullscreen_window_finder.cc b/ash/common/wm/fullscreen_window_finder.cc
deleted file mode 100644
index ee1bef347cae9ccf6cc7b619574311f9aec6ca14..0000000000000000000000000000000000000000
--- a/ash/common/wm/fullscreen_window_finder.cc
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/common/wm/fullscreen_window_finder.h"
-
-#include "ash/common/wm/switchable_windows.h"
-#include "ash/common/wm/window_state.h"
-#include "ash/common/wm_shell.h"
-#include "ash/common/wm_window.h"
-#include "ash/public/cpp/shell_window_ids.h"
-#include "ui/compositor/layer.h"
-
-namespace ash {
-namespace wm {
-
-WmWindow* GetWindowForFullscreenMode(WmWindow* context) {
- WmWindow* topmost_window = nullptr;
- WmWindow* active_window = context->GetShell()->GetActiveWindow();
- if (active_window &&
- active_window->GetRootWindow() == context->GetRootWindow() &&
- IsSwitchableContainer(active_window->GetParent())) {
- // Use the active window when it is on the current root window to determine
- // the fullscreen state to allow temporarily using a panel or docked window
- // (which are always above the default container) while a fullscreen
- // window is open. We only use the active window when in a switchable
- // container as the launcher should not exit fullscreen mode.
- topmost_window = active_window;
- } else {
- // Otherwise, use the topmost window on the root window's default container
- // when there is no active window on this root window.
- std::vector<WmWindow*> windows =
- context->GetRootWindow()
- ->GetChildByShellWindowId(kShellWindowId_DefaultContainer)
- ->GetChildren();
- for (auto iter = windows.rbegin(); iter != windows.rend(); ++iter) {
- if ((*iter)->GetWindowState()->IsUserPositionable() &&
- (*iter)->GetLayerTargetVisibility()) {
- topmost_window = *iter;
- break;
- }
- }
- }
- while (topmost_window) {
- if (topmost_window->GetWindowState()->IsFullscreen())
- return topmost_window;
- topmost_window = topmost_window->GetTransientParent();
- }
- return nullptr;
-}
-
-} // namespace wm
-} // namespace ash
« no previous file with comments | « ash/common/wm/fullscreen_window_finder.h ('k') | ash/common/wm/immersive_context_ash.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698