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

Unified Diff: ui/aura/window.cc

Issue 8574049: [Aura] Fix HtmlDialogBrowserTest.SizeWindow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix aura bots Created 9 years, 1 month 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/aura/window.cc
diff --git a/ui/aura/window.cc b/ui/aura/window.cc
index d8535ff73be3166882fc2ebcc3aadf04a439d110..398a3faeccc7cac5165f330b7af4cc431955c505 100644
--- a/ui/aura/window.cc
+++ b/ui/aura/window.cc
@@ -415,21 +415,27 @@ void Window::WindowDetachedFromDesktop(aura::Window* window) {
}
void Window::SetBoundsInternal(const gfx::Rect& new_bounds) {
+ gfx::Rect actual_new_bounds(new_bounds);
+
+ // Gives delegate a change to examine and change the new bounds.
+ if (delegate_)
+ delegate_->OnBoundsChanging(&actual_new_bounds);
+
const gfx::Rect old_bounds = layer_->GetTargetBounds();
// Always need to set the layer's bounds -- even if it is to the same thing.
// This may cause important side effects such as stopping animation.
- layer_->SetBounds(new_bounds);
+ layer_->SetBounds(actual_new_bounds);
// If we're not changing the effective bounds, then we can bail early and skip
// notifying our listeners.
- if (old_bounds == new_bounds)
+ if (old_bounds == actual_new_bounds)
return;
if (layout_manager_.get())
layout_manager_->OnWindowResized();
if (delegate_)
- delegate_->OnBoundsChanged(old_bounds, new_bounds);
+ delegate_->OnBoundsChanged(old_bounds, actual_new_bounds);
}
void Window::SetVisible(bool visible) {

Powered by Google App Engine
This is Rietveld 408576698