Chromium Code Reviews| Index: content/browser/web_contents/web_contents_view_aura.cc |
| diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc |
| index 7d19edba5beb58f06ce2011af32432d8f5532227..2070352e3e15bb180e273a115570016501d65515 100644 |
| --- a/content/browser/web_contents/web_contents_view_aura.cc |
| +++ b/content/browser/web_contents/web_contents_view_aura.cc |
| @@ -489,6 +489,15 @@ void WebContentsViewAura::OnBoundsChanged(const gfx::Rect& old_bounds, |
| SizeChangedCommon(new_bounds.size()); |
| if (delegate_.get()) |
| delegate_->SizeChanged(new_bounds.size()); |
| + |
| + // Constrained web dialog windows, need to be kept centered over our content |
| + // area. Note that the dialog is the second child - so we start with index 1. |
| + for (size_t i = 1; i < window_->children().size(); i++) { |
|
sky
2012/09/14 17:23:21
Now you've got me worried. Add a property that is
Mr4D (OOO till 08-26)
2012/09/14 20:44:03
Aha! I knew it! :) Done.
|
| + gfx::Rect bounds = window_->children()[i]->bounds(); |
| + bounds.Offset((new_bounds.width() - old_bounds.width()) / 2, |
| + (new_bounds.height() - old_bounds.height()) / 2); |
| + window_->children()[i]->SetBounds(bounds); |
| + } |
| } |
| void WebContentsViewAura::OnFocus(aura::Window* old_focused_window) { |