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

Unified Diff: ash/mus/bridge/wm_window_mus.cc

Issue 2610853012: Remove DCHECK in WmWindowMus::CloseWidget() (Closed)
Patch Set: Created 3 years, 11 months 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 | « no previous file | ash/root_window_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/mus/bridge/wm_window_mus.cc
diff --git a/ash/mus/bridge/wm_window_mus.cc b/ash/mus/bridge/wm_window_mus.cc
index 6761fbfe224a1c5cb6647490c8407e0ba66ec5d5..3e58848f506514e2ea42caf7d2a91dbf2062a3a8 100644
--- a/ash/mus/bridge/wm_window_mus.cc
+++ b/ash/mus/bridge/wm_window_mus.cc
@@ -75,15 +75,15 @@ WmShell* WmWindowMus::GetShell() const {
}
void WmWindowMus::CloseWidget() {
- views::Widget* widget = views::Widget::GetWidgetForNativeView(aura_window());
- DCHECK(widget);
- // Allow the client to service the close request for remote widgets.
+ // NOTE: in the FOR_CLIENT case there is not necessarily a widget associated
+ // with the window. Mash only creates widgets for top level windows if mash
+ // renders the non-client frame.
if (aura_window()->GetProperty(kWidgetCreationTypeKey) ==
WidgetCreationType::FOR_CLIENT) {
WmShellMus::Get()->window_manager()->window_manager_client()->RequestClose(
aura_window());
} else {
- widget->Close();
+ WmWindowAura::CloseWidget();
}
}
« no previous file with comments | « no previous file | ash/root_window_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698