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

Unified Diff: ui/views/widget/desktop_aura/desktop_native_widget_aura.cc

Issue 15827009: linux_aura: Close window when the OS requests it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 | « ui/views/widget/desktop_aura/desktop_native_widget_aura.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
diff --git a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
index 4e6c1c4e46da570505d5db71e9ed736515f10ab6..3b01b6abbdb91bb2baced78fc114138894f678f9 100644
--- a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
+++ b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
@@ -235,6 +235,8 @@ void DesktopNativeWidgetAura::InitNativeWidget(
this, params.bounds);
root_window_.reset(
desktop_root_window_host_->Init(window_, params));
+ root_window_->AddRootWindowObserver(this);
sky 2013/05/29 00:05:31 I like things that are balanced. Can you remove th
Elliot Glaysher 2013/05/29 00:11:05 Done.
+
stacking_client_.reset(
new DesktopNativeWidgetAuraStackingClient(root_window_.get()));
drop_helper_.reset(new DropHelper(
@@ -842,4 +844,12 @@ int DesktopNativeWidgetAura::OnPerformDrop(const ui::DropTargetEvent& event) {
last_drop_operation_);
}
+////////////////////////////////////////////////////////////////////////////////
+// DesktopNativeWidgetAura, aura::RootWindowObserver implementation:
+
+void DesktopNativeWidgetAura::OnRootWindowHostCloseRequested(
+ const aura::RootWindow* root) {
+ Close();
+}
+
} // namespace views
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_native_widget_aura.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698