| Index: chrome/browser/extensions/api/app_window/app_window_api.cc
|
| diff --git a/chrome/browser/extensions/api/app_window/app_window_api.cc b/chrome/browser/extensions/api/app_window/app_window_api.cc
|
| index 92fe656df91b9b94f07a699610530db8291e9f68..3a95c7624b835d073e3b376cfd56a31d15cef199 100644
|
| --- a/chrome/browser/extensions/api/app_window/app_window_api.cc
|
| +++ b/chrome/browser/extensions/api/app_window/app_window_api.cc
|
| @@ -52,6 +52,8 @@ const char kHtmlFrameOption[] = "experimental-html";
|
|
|
| namespace {
|
|
|
| +const int kUnboundedSize = apps::ShellWindow::SizeConstraints::kUnboundedSize;
|
| +
|
| // Opens an inspector window and delays the response to the
|
| // AppWindowCreateFunction until the DevToolsWindow has finished loading, and is
|
| // ready to stop on breakpoints in the callback.
|
| @@ -101,6 +103,19 @@ void SetCreateResultFromShellWindow(ShellWindow* window,
|
| boundsValue->SetInteger("width", bounds.width());
|
| boundsValue->SetInteger("height", bounds.height());
|
| result->Set("bounds", boundsValue);
|
| +
|
| + const ShellWindow::SizeConstraints& size_constraints =
|
| + window->size_constraints();
|
| + gfx::Size min_size = size_constraints.GetMinimumSize();
|
| + gfx::Size max_size = size_constraints.GetMaximumSize();
|
| + if (min_size.width() != kUnboundedSize)
|
| + result->SetInteger("minWidth", min_size.width());
|
| + if (min_size.height() != kUnboundedSize)
|
| + result->SetInteger("minHeight", min_size.height());
|
| + if (max_size.width() != kUnboundedSize)
|
| + result->SetInteger("maxWidth", max_size.width());
|
| + if (max_size.height() != kUnboundedSize)
|
| + result->SetInteger("maxHeight", max_size.height());
|
| }
|
|
|
| } // namespace
|
|
|