diff options
author | harrym@chromium.org <harrym@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-16 01:18:18 +0000 |
---|---|---|
committer | harrym@chromium.org <harrym@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-16 01:18:18 +0000 |
commit | 5fbb90a02cc1ea5b6dffbb9a9a5e932008a2ec90 (patch) | |
tree | 7f830be7fc442aaf9350a8dc14d299cc229b3d8a /ui | |
parent | da4c7f4f1aacf564c39b527425b3fc6e5796976e (diff) | |
download | chromium_src-5fbb90a02cc1ea5b6dffbb9a9a5e932008a2ec90.zip chromium_src-5fbb90a02cc1ea5b6dffbb9a9a5e932008a2ec90.tar.gz chromium_src-5fbb90a02cc1ea5b6dffbb9a9a5e932008a2ec90.tar.bz2 |
Allow closing root window, or pressing the power button to shutdown ash_shell, and chrome /w chromeos flag (not running on chromeos) to exit the application
BUG=113123
Review URL: https://chromiumcodereview.appspot.com/10825191
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151815 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r-- | ui/aura/root_window.cc | 4 | ||||
-rw-r--r-- | ui/aura/root_window.h | 2 | ||||
-rw-r--r-- | ui/aura/root_window_host_linux.cc | 2 | ||||
-rw-r--r-- | ui/aura/root_window_observer.h | 2 | ||||
-rw-r--r-- | ui/views/widget/desktop_native_widget_helper_aura.cc | 2 | ||||
-rw-r--r-- | ui/views/widget/desktop_native_widget_helper_aura.h | 3 |
6 files changed, 8 insertions, 7 deletions
diff --git a/ui/aura/root_window.cc b/ui/aura/root_window.cc index f978fb1..f53cfb4 100644 --- a/ui/aura/root_window.cc +++ b/ui/aura/root_window.cc @@ -338,9 +338,9 @@ void RootWindow::OnKeyboardMappingChanged() { OnKeyboardMappingChanged(this)); } -void RootWindow::OnRootWindowHostClosed() { +void RootWindow::OnRootWindowHostCloseRequested() { FOR_EACH_OBSERVER(RootWindowObserver, observers_, - OnRootWindowHostClosed(this)); + OnRootWindowHostCloseRequested(this)); } void RootWindow::AddRootWindowObserver(RootWindowObserver* observer) { diff --git a/ui/aura/root_window.h b/ui/aura/root_window.h index a9d392a..9236269 100644 --- a/ui/aura/root_window.h +++ b/ui/aura/root_window.h @@ -167,7 +167,7 @@ class AURA_EXPORT RootWindow : public ui::CompositorDelegate, void OnKeyboardMappingChanged(); // The system windowing system has sent a request that we close our window. - void OnRootWindowHostClosed(); + void OnRootWindowHostCloseRequested(); // Add/remove observer. There is no need to remove the observer if // the root window is being deleted. In particular, you SHOULD NOT remove diff --git a/ui/aura/root_window_host_linux.cc b/ui/aura/root_window_host_linux.cc index b7b1af8..4dd801e 100644 --- a/ui/aura/root_window_host_linux.cc +++ b/ui/aura/root_window_host_linux.cc @@ -714,7 +714,7 @@ bool RootWindowHostLinux::Dispatch(const base::NativeEvent& event) { Atom message_type = static_cast<Atom>(xev->xclient.data.l[0]); if (message_type == atom_cache_.GetAtom("WM_DELETE_WINDOW")) { // We have received a close message from the window manager. - delegate_->AsRootWindow()->OnRootWindowHostClosed(); + delegate_->AsRootWindow()->OnRootWindowHostCloseRequested(); } else if (message_type == atom_cache_.GetAtom("_NET_WM_PING")) { XEvent reply_event = *xev; reply_event.xclient.window = x_root_window_; diff --git a/ui/aura/root_window_observer.h b/ui/aura/root_window_observer.h index 9f4cfd9..31bd37f 100644 --- a/ui/aura/root_window_observer.h +++ b/ui/aura/root_window_observer.h @@ -23,7 +23,7 @@ class AURA_EXPORT RootWindowObserver { // Invoked when the native windowing system sends us a request to close our // window. - virtual void OnRootWindowHostClosed(const RootWindow* root) {} + virtual void OnRootWindowHostCloseRequested(const RootWindow* root) {} // Invoked when the keyboard mapping has changed. virtual void OnKeyboardMappingChanged(const RootWindow* root) {} diff --git a/ui/views/widget/desktop_native_widget_helper_aura.cc b/ui/views/widget/desktop_native_widget_helper_aura.cc index ee4fb13..b2618f8 100644 --- a/ui/views/widget/desktop_native_widget_helper_aura.cc +++ b/ui/views/widget/desktop_native_widget_helper_aura.cc @@ -242,7 +242,7 @@ void DesktopNativeWidgetHelperAura::OnRootWindowResized( root->GetHostSize())); } -void DesktopNativeWidgetHelperAura::OnRootWindowHostClosed( +void DesktopNativeWidgetHelperAura::OnRootWindowHostCloseRequested( const aura::RootWindow* root) { DCHECK_EQ(root, root_window_.get()); widget_->GetWidget()->Close(); diff --git a/ui/views/widget/desktop_native_widget_helper_aura.h b/ui/views/widget/desktop_native_widget_helper_aura.h index 90d41cb..43e2232 100644 --- a/ui/views/widget/desktop_native_widget_helper_aura.h +++ b/ui/views/widget/desktop_native_widget_helper_aura.h @@ -62,7 +62,8 @@ class VIEWS_EXPORT DesktopNativeWidgetHelperAura // Overridden from aura::RootWindowObserver: virtual void OnRootWindowResized(const aura::RootWindow* root, const gfx::Size& old_size) OVERRIDE; - virtual void OnRootWindowHostClosed(const aura::RootWindow* root) OVERRIDE; + virtual void OnRootWindowHostCloseRequested( + const aura::RootWindow* root) OVERRIDE; private: // A weak pointer back to our owning widget. |