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

Unified Diff: ui/wm/core/window_modality_controller.cc

Issue 2172363002: Created min size for print preview dialog and modified to allow the Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Track independent bounds as native window property not member of widget class 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 side-by-side diff with in-line comments
Download patch
Index: ui/wm/core/window_modality_controller.cc
diff --git a/ui/wm/core/window_modality_controller.cc b/ui/wm/core/window_modality_controller.cc
index 094acc49189b86f2d21d4dbade56e7b8b7e1486d..ec51e5cba1044854cd9eafa7cd28655011f0f307 100644
--- a/ui/wm/core/window_modality_controller.cc
+++ b/ui/wm/core/window_modality_controller.cc
@@ -22,11 +22,11 @@
#include "ui/wm/core/window_util.h"
namespace wm {
+// const char kHasIndependentBoundsKey[] = "INDEPENDENT_BOUNDS";
// Transient child's modal parent.
extern const aura::WindowProperty<aura::Window*>* const kModalParentKey;
DEFINE_WINDOW_PROPERTY_KEY(aura::Window*, kModalParentKey, NULL);
-
namespace {
bool HasAncestor(aura::Window* window, aura::Window* ancestor) {
@@ -82,8 +82,11 @@ aura::Window* GetModalTransientChild(
} // namespace
-void SetModalParent(aura::Window* child, aura::Window* parent) {
+void SetModalParent(aura::Window* child, aura::Window* parent,
+ bool* independent, const char * kHasIndependentBoundsKey) {
child->SetProperty(kModalParentKey, parent);
+ if (kHasIndependentBoundsKey)
+ child->SetNativeWindowProperty(kHasIndependentBoundsKey, independent);
}
aura::Window* GetModalTransient(aura::Window* window) {

Powered by Google App Engine
This is Rietveld 408576698