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

Unified Diff: ui/views/widget/widget_delegate.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/widget/widget_delegate.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/widget_delegate.cc
diff --git a/ui/views/widget/widget_delegate.cc b/ui/views/widget/widget_delegate.cc
index 917124976c4a1505e9fdc6ce9ec4f9c8b5b802e6..a7696103df3117b7dd32cf0d8786ea80cacd7f37 100644
--- a/ui/views/widget/widget_delegate.cc
+++ b/ui/views/widget/widget_delegate.cc
@@ -5,6 +5,7 @@
#include "ui/views/widget/widget_delegate.h"
#include "base/strings/utf_string_conversions.h"
+#include "services/ui/public/interfaces/window_manager_constants.mojom.h"
#include "ui/gfx/image/image_skia.h"
#include "ui/views/view.h"
#include "ui/views/views_delegate.h"
@@ -54,6 +55,17 @@ bool WidgetDelegate::CanMinimize() const {
return false;
}
+int32_t WidgetDelegate::GetResizeBehavior() const {
+ int32_t behavior = ui::mojom::kResizeBehaviorNone;
+ if (CanResize())
+ behavior |= ui::mojom::kResizeBehaviorCanResize;
+ if (CanMaximize())
+ behavior |= ui::mojom::kResizeBehaviorCanMaximize;
+ if (CanMinimize())
+ behavior |= ui::mojom::kResizeBehaviorCanMinimize;
+ return behavior;
+}
+
bool WidgetDelegate::CanActivate() const {
return can_activate_;
}
« no previous file with comments | « ui/views/widget/widget_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698