Chromium Code Reviews| 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) { |