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

Unified Diff: ui/wm/core/window_util.h

Issue 2854543002: Block incognito browser windows for voice interaction. (Closed)
Patch Set: address review comments Created 3 years, 7 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/snapshot/snapshot_aura.cc ('k') | ui/wm/core/window_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/wm/core/window_util.h
diff --git a/ui/wm/core/window_util.h b/ui/wm/core/window_util.h
index 1bd9cb8b4969ff5a4ca4700dd743449bb54a8a76..8c699c0595dcb7b5c93511a87f9d2f4756aee8e7 100644
--- a/ui/wm/core/window_util.h
+++ b/ui/wm/core/window_util.h
@@ -6,8 +6,10 @@
#define UI_WM_CORE_WINDOW_UTIL_H_
#include <memory>
+#include <utility>
#include <vector>
+#include "base/callback_forward.h"
#include "base/compiler_specific.h"
#include "ui/wm/wm_export.h"
@@ -46,6 +48,17 @@ WM_EXPORT aura::Window* GetToplevelWindow(aura::Window* window);
WM_EXPORT std::unique_ptr<ui::LayerTreeOwner> RecreateLayers(
ui::LayerOwner* root);
+using MapLayerFunc =
+ base::RepeatingCallback<std::unique_ptr<ui::Layer>(ui::LayerOwner*)>;
+
+// Maps |map_func| over each layer of the layer tree and returns a copy of the
+// layer tree. The recursion stops at the level when |map_func| returns nullptr
+// on the owner's layer. MapLayers might return nullptr when |map_func| returns
+// nullptr on the root layer's owner.
+WM_EXPORT std::unique_ptr<ui::LayerTreeOwner> RecreateLayersWithClosure(
+ ui::LayerOwner* root,
+ const MapLayerFunc& map_func);
+
// Returns a layer tree that mirrors |root|. Used for live window previews. If
// |sync_bounds| is true, the bounds of all mirror layers except the root are
// synchronized. See |sync_bounds_| in ui::Layer.
« no previous file with comments | « ui/snapshot/snapshot_aura.cc ('k') | ui/wm/core/window_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698