| Index: views/window/window.cc
|
| ===================================================================
|
| --- views/window/window.cc (revision 25660)
|
| +++ views/window/window.cc (working copy)
|
| @@ -9,6 +9,7 @@
|
| #include "app/resource_bundle.h"
|
| #include "base/gfx/size.h"
|
| #include "base/string_util.h"
|
| +#include "views/widget/widget.h"
|
|
|
| namespace views {
|
|
|
| @@ -41,4 +42,21 @@
|
| GetLocalizedContentsHeight(row_resource_id));
|
| }
|
|
|
| +// static
|
| +void Window::CloseSecondaryWidget(Widget* widget) {
|
| + if (!widget)
|
| + return;
|
| +
|
| + // Close widget if it's identified as a secondary window.
|
| + Window* window = widget->GetWindow();
|
| + if (window) {
|
| + if (!window->IsAppWindow())
|
| + window->Close();
|
| + } else {
|
| + // If it's not a Window, then close it anyway since it probably is
|
| + // secondary.
|
| + widget->Close();
|
| + }
|
| +}
|
| +
|
| } // namespace views
|
|
|