Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" | 5 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
| 9 #include "ui/aura/client/activation_client.h" | 9 #include "ui/aura/client/activation_client.h" |
| 10 #include "ui/aura/client/aura_constants.h" | 10 #include "ui/aura/client/aura_constants.h" |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 125 top_level_widget_->GetNativeView()->RemoveObserver(this); | 125 top_level_widget_->GetNativeView()->RemoveObserver(this); |
| 126 // When we receive a notification that the child of the window created | 126 // When we receive a notification that the child of the window created |
| 127 // above is being destroyed we go ahead and initiate the destruction of | 127 // above is being destroyed we go ahead and initiate the destruction of |
| 128 // the corresponding widget. | 128 // the corresponding widget. |
| 129 top_level_widget_->Close(); | 129 top_level_widget_->Close(); |
| 130 top_level_widget_ = NULL; | 130 top_level_widget_ = NULL; |
| 131 } | 131 } |
| 132 delete this; | 132 delete this; |
| 133 } | 133 } |
| 134 | 134 |
| 135 virtual void OnWindowBoundsChanged(aura::Window* window, | |
| 136 const gfx::Rect& old_bounds, | |
| 137 const gfx::Rect& new_bounds) OVERRIDE { | |
| 138 if (top_level_widget_ && window != top_level_widget_->GetNativeView()) | |
|
sky
2014/01/07 16:36:33
Rather than window != can you test for the window
ananta
2014/01/07 18:56:08
Done. Added a child_window_ member to track the pa
| |
| 139 top_level_widget_->SetSize(new_bounds.size()); | |
| 140 } | |
| 141 | |
| 135 private: | 142 private: |
| 136 DesktopNativeWidgetTopLevelHandler() | 143 DesktopNativeWidgetTopLevelHandler() |
| 137 : top_level_widget_(NULL) {} | 144 : top_level_widget_(NULL) {} |
| 138 | 145 |
| 139 virtual ~DesktopNativeWidgetTopLevelHandler() {} | 146 virtual ~DesktopNativeWidgetTopLevelHandler() {} |
| 140 | 147 |
| 141 Widget* top_level_widget_; | 148 Widget* top_level_widget_; |
| 142 | 149 |
| 143 DISALLOW_COPY_AND_ASSIGN(DesktopNativeWidgetTopLevelHandler); | 150 DISALLOW_COPY_AND_ASSIGN(DesktopNativeWidgetTopLevelHandler); |
| 144 }; | 151 }; |
| (...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1116 input_method_event_filter_->SetInputMethodPropertyInRootWindow( | 1123 input_method_event_filter_->SetInputMethodPropertyInRootWindow( |
| 1117 root_window_->window()); | 1124 root_window_->window()); |
| 1118 root_window_event_filter_->AddHandler(input_method_event_filter_.get()); | 1125 root_window_event_filter_->AddHandler(input_method_event_filter_.get()); |
| 1119 } | 1126 } |
| 1120 | 1127 |
| 1121 void DesktopNativeWidgetAura::UpdateWindowTransparency() { | 1128 void DesktopNativeWidgetAura::UpdateWindowTransparency() { |
| 1122 content_window_->SetTransparent(ShouldUseNativeFrame()); | 1129 content_window_->SetTransparent(ShouldUseNativeFrame()); |
| 1123 } | 1130 } |
| 1124 | 1131 |
| 1125 } // namespace views | 1132 } // namespace views |
| OLD | NEW |