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

Unified Diff: ui/views/widget/native_widget_aura.cc

Issue 434343004: Call OnNativeWindowChanged after maximizing and restoring. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync and rebase Created 6 years, 4 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
Index: ui/views/widget/native_widget_aura.cc
diff --git a/ui/views/widget/native_widget_aura.cc b/ui/views/widget/native_widget_aura.cc
index e57a4ff0bc0ecb56c12fba415058f0d60a13b85f..b733b4f72182ba8c0aaae21eac29073578c799f9 100644
--- a/ui/views/widget/native_widget_aura.cc
+++ b/ui/views/widget/native_widget_aura.cc
@@ -82,6 +82,7 @@ NativeWidgetAura::NativeWidgetAura(internal::NativeWidgetDelegate* delegate)
saved_window_state_(ui::SHOW_STATE_DEFAULT) {
aura::client::SetFocusChangeObserver(window_, this);
aura::client::SetActivationChangeObserver(window_, this);
+ window_->AddObserver(this);
sky 2014/08/11 16:09:19 nit: move to init.
jackhou1 2014/08/12 05:23:44 Done.
}
// static
@@ -798,6 +799,7 @@ void NativeWidgetAura::OnDeviceScaleFactorChanged(float device_scale_factor) {
}
void NativeWidgetAura::OnWindowDestroying(aura::Window* window) {
+ window_->RemoveObserver(this);
delegate_->OnNativeWidgetDestroying();
// If the aura::Window is destroyed, we can no longer show tooltips.
@@ -825,6 +827,16 @@ void NativeWidgetAura::GetHitTestMask(gfx::Path* mask) const {
}
////////////////////////////////////////////////////////////////////////////////
+// NativeWidgetAura, aura::WindowObserver implementation:
+
+void NativeWidgetAura::OnWindowPropertyChanged(aura::Window* window,
+ const void* key,
+ intptr_t old) {
+ if (key == aura::client::kShowStateKey)
+ delegate_->OnNativeWidgetWindowShowStateChanged();
+}
+
+////////////////////////////////////////////////////////////////////////////////
// NativeWidgetAura, ui::EventHandler implementation:
void NativeWidgetAura::OnKeyEvent(ui::KeyEvent* event) {

Powered by Google App Engine
This is Rietveld 408576698