Chromium Code Reviews| Index: ash/wm/window_util.cc |
| diff --git a/ash/wm/window_util.cc b/ash/wm/window_util.cc |
| index cfbacdce8ce6279a66c84cbb283e823adad6ff3c..a05529d2de3cd67e6c6a11025a162faebe7bb35c 100644 |
| --- a/ash/wm/window_util.cc |
| +++ b/ash/wm/window_util.cc |
| @@ -14,6 +14,8 @@ |
| #include "ui/aura/root_window.h" |
| #include "ui/aura/window.h" |
| #include "ui/compositor/layer.h" |
| +#include "ui/views/widget/widget.h" |
| +#include "ui/views/widget/widget_delegate.h" |
| #include "ui/gfx/display.h" |
| #include "ui/gfx/screen.h" |
| @@ -61,6 +63,18 @@ bool CanActivateWindow(aura::Window* window) { |
| return client && client->CanActivateWindow(window); |
| } |
| +bool CanMaximizeWindow(aura::Window* window) { |
| + if (!window) |
| + return false; |
| + views::Widget* widget = views::Widget::GetWidgetForNativeWindow(window); |
|
sky
2012/09/13 00:46:22
Instead of this, add a new property that says whet
sschmitz
2012/09/13 19:34:13
Thanks for your help on this.
Done.
|
| + if (!widget) |
| + return false; |
| + views::WidgetDelegate* widget_delegate = widget->widget_delegate(); |
| + if (!widget_delegate) |
| + return false; |
| + return widget_delegate->CanMaximize(); |
| +} |
| + |
| bool IsWindowNormal(aura::Window* window) { |
| return IsWindowStateNormal(window->GetProperty(aura::client::kShowStateKey)); |
| } |