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

Unified Diff: ui/views/widget/desktop_aura/desktop_native_widget_aura.cc

Issue 2542493002: Replace kCanMaximize/Minimize/Resize with kResizeBehavior. (Closed)
Patch Set: Fix int->bool compile issue. Created 4 years 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/mus/native_widget_mus.cc ('k') | ui/views/widget/desktop_aura/desktop_screen_x11_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
diff --git a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
index 17448ee6258549ecebdfce1b963e495d7a097eeb..0a8c70d7fb5408d6fca31a36a33b3d6086500c08 100644
--- a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
+++ b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
@@ -8,6 +8,7 @@
#include "base/macros.h"
#include "base/trace_event/trace_event.h"
#include "build/build_config.h"
+#include "services/ui/public/interfaces/window_manager_constants.mojom.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/client/cursor_client.h"
#include "ui/aura/client/drag_drop_client.h"
@@ -943,12 +944,10 @@ bool DesktopNativeWidgetAura::IsTranslucentWindowOpacitySupported() const {
}
void DesktopNativeWidgetAura::OnSizeConstraintsChanged() {
- content_window_->SetProperty(aura::client::kCanMaximizeKey,
- GetWidget()->widget_delegate()->CanMaximize());
- content_window_->SetProperty(aura::client::kCanMinimizeKey,
- GetWidget()->widget_delegate()->CanMinimize());
- content_window_->SetProperty(aura::client::kCanResizeKey,
- GetWidget()->widget_delegate()->CanResize());
+ int32_t behavior = ui::mojom::kResizeBehaviorNone;
+ if (GetWidget()->widget_delegate())
+ behavior = GetWidget()->widget_delegate()->GetResizeBehavior();
+ content_window_->SetProperty(aura::client::kResizeBehaviorKey, behavior);
desktop_window_tree_host_->SizeConstraintsChanged();
}
« no previous file with comments | « ui/views/mus/native_widget_mus.cc ('k') | ui/views/widget/desktop_aura/desktop_screen_x11_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698