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

Unified Diff: ui/views/corewm/window_util.h

Issue 115453004: Moves management of transients out of Window (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove unneeded parens Created 6 years, 11 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 | « ui/views/corewm/window_modality_controller.cc ('k') | ui/views/corewm/window_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/corewm/window_util.h
diff --git a/ui/views/corewm/window_util.h b/ui/views/corewm/window_util.h
index 01a3ea43f0688cd8e4069346c30c8da877d529b0..c3b552de88b03a1578edbb391163aab6c3206d00 100644
--- a/ui/views/corewm/window_util.h
+++ b/ui/views/corewm/window_util.h
@@ -5,6 +5,8 @@
#ifndef UI_VIEWS_COREWM_WINDOW_UTIL_H_
#define UI_VIEWS_COREWM_WINDOW_UTIL_H_
+#include <vector>
+
#include "base/compiler_specific.h"
#include "ui/views/views_export.h"
@@ -47,6 +49,22 @@ VIEWS_EXPORT void DeepDeleteLayers(ui::Layer* layer);
VIEWS_EXPORT ui::Layer* RecreateWindowLayers(aura::Window* window,
bool set_bounds) WARN_UNUSED_RESULT;
+// Convenience functions that get the TransientWindowManager for the window and
+// redirect appropriately. These are preferable to calling functions on
+// TransientWindowManager as they handle the appropriate NULL checks.
+VIEWS_EXPORT aura::Window* GetTransientParent(aura::Window* window);
+VIEWS_EXPORT const aura::Window* GetTransientParent(const aura::Window* window);
+VIEWS_EXPORT const std::vector<aura::Window*>& GetTransientChildren(
+ const aura::Window* window);
+VIEWS_EXPORT void AddTransientChild(aura::Window* parent, aura::Window* child);
+VIEWS_EXPORT void RemoveTransientChild(aura::Window* parent,
+ aura::Window* child);
+
+// Returns true if |window| has |ancestor| as a transient ancestor. A transient
+// ancestor is found by following the transient parent chain of the window.
+VIEWS_EXPORT bool HasTransientAncestor(const aura::Window* window,
+ const aura::Window* ancestor);
+
} // namespace corewm
} // namespace views
« no previous file with comments | « ui/views/corewm/window_modality_controller.cc ('k') | ui/views/corewm/window_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698