Commit 21adf48e authored by sky's avatar sky Committed by Commit bot

Remove DCHECK in WmWindowMus::CloseWidget()

And improve comment. Additionally removes some dead includes in
RootWindowController.

BUG=671246
TEST=none
R=jamescook@chromium.org

Review-Url: https://codereview.chromium.org/2610853012
Cr-Commit-Position: refs/heads/master@{#442029}
parent 9ea74b3f
...@@ -75,15 +75,15 @@ WmShell* WmWindowMus::GetShell() const { ...@@ -75,15 +75,15 @@ WmShell* WmWindowMus::GetShell() const {
} }
void WmWindowMus::CloseWidget() { void WmWindowMus::CloseWidget() {
views::Widget* widget = views::Widget::GetWidgetForNativeView(aura_window()); // NOTE: in the FOR_CLIENT case there is not necessarily a widget associated
DCHECK(widget); // with the window. Mash only creates widgets for top level windows if mash
// Allow the client to service the close request for remote widgets. // renders the non-client frame.
if (aura_window()->GetProperty(kWidgetCreationTypeKey) == if (aura_window()->GetProperty(kWidgetCreationTypeKey) ==
WidgetCreationType::FOR_CLIENT) { WidgetCreationType::FOR_CLIENT) {
WmShellMus::Get()->window_manager()->window_manager_client()->RequestClose( WmShellMus::Get()->window_manager()->window_manager_client()->RequestClose(
aura_window()); aura_window());
} else { } else {
widget->Close(); WmWindowAura::CloseWidget();
} }
} }
......
...@@ -66,9 +66,6 @@ ...@@ -66,9 +66,6 @@
#include "ui/aura/window_event_dispatcher.h" #include "ui/aura/window_event_dispatcher.h"
#include "ui/aura/window_observer.h" #include "ui/aura/window_observer.h"
#include "ui/aura/window_tracker.h" #include "ui/aura/window_tracker.h"
#include "ui/display/display.h"
#include "ui/display/manager/display_manager.h"
#include "ui/display/screen.h"
#include "ui/display/types/display_constants.h" #include "ui/display/types/display_constants.h"
#include "ui/keyboard/keyboard_controller.h" #include "ui/keyboard/keyboard_controller.h"
#include "ui/keyboard/keyboard_util.h" #include "ui/keyboard/keyboard_util.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment