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

Side by Side Diff: ui/wm/core/window_util.h

Issue 2383263002: Generalize layer mirroring for phantom windows (Closed)
Patch Set: Rebase Created 4 years, 2 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef UI_WM_CORE_WINDOW_UTIL_H_ 5 #ifndef UI_WM_CORE_WINDOW_UTIL_H_
6 #define UI_WM_CORE_WINDOW_UTIL_H_ 6 #define UI_WM_CORE_WINDOW_UTIL_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 // 55 //
56 // As a result of this |root| has freshly created layers, meaning the layers 56 // As a result of this |root| has freshly created layers, meaning the layers
57 // have not yet been painted to. 57 // have not yet been painted to.
58 // 58 //
59 // When a non null |delegate_factory| is passed, it will be used to 59 // When a non null |delegate_factory| is passed, it will be used to
60 // create a delegate for an old layer which had its own delegate. 60 // create a delegate for an old layer which had its own delegate.
61 WM_EXPORT std::unique_ptr<ui::LayerTreeOwner> RecreateLayers( 61 WM_EXPORT std::unique_ptr<ui::LayerTreeOwner> RecreateLayers(
62 ui::LayerOwner* root, 62 ui::LayerOwner* root,
63 LayerDelegateFactory* delegate_factory); 63 LayerDelegateFactory* delegate_factory);
64 64
65 // Returns a layer tree that mirrors |root|. Used for live window previews.
66 WM_EXPORT std::unique_ptr<ui::LayerTreeOwner> MirrorLayers(
67 ui::LayerOwner* root,
68 LayerDelegateFactory* delegate_factory,
69 bool sync_bounds);
70
65 // Convenience functions that get the TransientWindowManager for the window and 71 // Convenience functions that get the TransientWindowManager for the window and
66 // redirect appropriately. These are preferable to calling functions on 72 // redirect appropriately. These are preferable to calling functions on
67 // TransientWindowManager as they handle the appropriate NULL checks. 73 // TransientWindowManager as they handle the appropriate NULL checks.
68 WM_EXPORT aura::Window* GetTransientParent(aura::Window* window); 74 WM_EXPORT aura::Window* GetTransientParent(aura::Window* window);
69 WM_EXPORT const aura::Window* GetTransientParent( 75 WM_EXPORT const aura::Window* GetTransientParent(
70 const aura::Window* window); 76 const aura::Window* window);
71 WM_EXPORT const std::vector<aura::Window*>& GetTransientChildren( 77 WM_EXPORT const std::vector<aura::Window*>& GetTransientChildren(
72 const aura::Window* window); 78 const aura::Window* window);
73 WM_EXPORT void AddTransientChild(aura::Window* parent, aura::Window* child); 79 WM_EXPORT void AddTransientChild(aura::Window* parent, aura::Window* child);
74 WM_EXPORT void RemoveTransientChild(aura::Window* parent, aura::Window* child); 80 WM_EXPORT void RemoveTransientChild(aura::Window* parent, aura::Window* child);
75 81
76 // Returns true if |window| has |ancestor| as a transient ancestor. A transient 82 // Returns true if |window| has |ancestor| as a transient ancestor. A transient
77 // ancestor is found by following the transient parent chain of the window. 83 // ancestor is found by following the transient parent chain of the window.
78 WM_EXPORT bool HasTransientAncestor(const aura::Window* window, 84 WM_EXPORT bool HasTransientAncestor(const aura::Window* window,
79 const aura::Window* ancestor); 85 const aura::Window* ancestor);
80 86
81 } // namespace wm 87 } // namespace wm
82 88
83 #endif // UI_WM_CORE_WINDOW_UTIL_H_ 89 #endif // UI_WM_CORE_WINDOW_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698