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

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

Issue 153803006: Makes Wiget::OnNativeWidgetMove() be invoked during a maximize (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 | « no previous file | ui/views/widget/native_widget_aura_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4fc2afc3149c83d939581326ffa2b6a0eb1ffd77..2fd2983473b38861103e48cd4b66fc24e0429e20 100644
--- a/ui/views/widget/native_widget_aura.cc
+++ b/ui/views/widget/native_widget_aura.cc
@@ -713,8 +713,13 @@ gfx::Size NativeWidgetAura::GetMaximumSize() const {
void NativeWidgetAura::OnBoundsChanged(const gfx::Rect& old_bounds,
const gfx::Rect& new_bounds) {
- if (old_bounds.origin() != new_bounds.origin())
+ // Assume that if the old bounds was completely empty a move happened. This
+ // handles the case of a maximize animation acquiring the layer (acquiring a
+ // layer results in clearing the bounds).
+ if (old_bounds.origin() != new_bounds.origin() ||
+ (old_bounds == gfx::Rect(0, 0, 0, 0) && !new_bounds.IsEmpty())) {
delegate_->OnNativeWidgetMove();
+ }
if (old_bounds.size() != new_bounds.size())
delegate_->OnNativeWidgetSizeChanged(new_bounds.size());
}
« no previous file with comments | « no previous file | ui/views/widget/native_widget_aura_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698