aura: Hide transient children of a Window when the window hides.

BUG=121409
TEST=manual

Review URL: https://chromiumcodereview.appspot.com/10181005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133575 0039d316-1c4b-4281-b951-d872f2087c98
parent 538b24c3
......@@ -183,6 +183,10 @@ void Window::Show() {
}
void Window::Hide() {
for (Windows::iterator it = transient_children_.begin();
it != transient_children_.end(); ++it) {
(*it)->Hide();
}
SetVisible(false);
ReleaseCapture();
}
......
......@@ -1042,6 +1042,11 @@ TEST_F(WindowTest, TransientChildren) {
ASSERT_EQ(2u, parent->children().size());
EXPECT_EQ(w3.get(), parent->children()[0]);
EXPECT_EQ(w1.get(), parent->children()[1]);
// Hiding parent should hide transient children.
EXPECT_TRUE(w2->IsVisible());
w1->Hide();
EXPECT_FALSE(w2->IsVisible());
}
// Tests that when a focused window is closed, its parent inherits the focus.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment