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

Side by Side Diff: ash/common/wm/container_finder.cc

Issue 2194353002: mash: Migrate ScopedTargetRootWindow to //ash/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: reflow comment Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/common/wm/container_finder.h" 5 #include "ash/common/wm/container_finder.h"
6 6
7 #include "ash/common/session/session_state_delegate.h" 7 #include "ash/common/session/session_state_delegate.h"
8 #include "ash/common/shell_window_ids.h" 8 #include "ash/common/shell_window_ids.h"
9 #include "ash/common/wm/always_on_top_controller.h" 9 #include "ash/common/wm/always_on_top_controller.h"
10 #include "ash/common/wm/root_window_finder.h" 10 #include "ash/common/wm/root_window_finder.h"
11 #include "ash/common/wm/window_state.h" 11 #include "ash/common/wm/window_state.h"
12 #include "ash/common/wm_root_window_controller.h" 12 #include "ash/common/wm_root_window_controller.h"
13 #include "ash/common/wm_shell.h" 13 #include "ash/common/wm_shell.h"
14 #include "ash/common/wm_window.h" 14 #include "ash/common/wm_window.h"
15 #include "ui/gfx/geometry/rect.h" 15 #include "ui/gfx/geometry/rect.h"
16 16
17 namespace ash { 17 namespace ash {
18 namespace wm { 18 namespace wm {
19 namespace { 19 namespace {
20 20
21 WmWindow* FindContainerRoot(WmShell* shell, const gfx::Rect& bounds) { 21 WmWindow* FindContainerRoot(WmShell* shell, const gfx::Rect& bounds) {
22 if (bounds == gfx::Rect()) 22 if (bounds == gfx::Rect())
23 return shell->GetRootWindowForNewWindows(); 23 return shell->root_window_for_new_windows();
24 return GetRootWindowMatching(bounds); 24 return GetRootWindowMatching(bounds);
25 } 25 }
26 26
27 bool HasTransientParentWindow(const WmWindow* window) { 27 bool HasTransientParentWindow(const WmWindow* window) {
28 return window->GetTransientParent() && 28 return window->GetTransientParent() &&
29 window->GetTransientParent()->GetType() != ui::wm::WINDOW_TYPE_UNKNOWN; 29 window->GetTransientParent()->GetType() != ui::wm::WINDOW_TYPE_UNKNOWN;
30 } 30 }
31 31
32 WmWindow* GetSystemModalContainer(WmWindow* root, WmWindow* window) { 32 WmWindow* GetSystemModalContainer(WmWindow* root, WmWindow* window) {
33 DCHECK(window->IsSystemModal()); 33 DCHECK(window->IsSystemModal());
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 default: 102 default:
103 NOTREACHED() << "Window " << window->GetShellWindowId() 103 NOTREACHED() << "Window " << window->GetShellWindowId()
104 << " has unhandled type " << window->GetType(); 104 << " has unhandled type " << window->GetType();
105 break; 105 break;
106 } 106 }
107 return nullptr; 107 return nullptr;
108 } 108 }
109 109
110 } // namespace wm 110 } // namespace wm
111 } // namespace ash 111 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698