summaryrefslogtreecommitdiffstats
path: root/ash/shell_unittest.cc
diff options
context:
space:
mode:
authorerg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-28 21:00:03 +0000
committererg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-28 21:00:03 +0000
commit5ebe610732ff3d41b2c288e332767ef56d67fcd3 (patch)
treead306d1d45b9dee174640ecbecb9e305220a42e0 /ash/shell_unittest.cc
parent3e3f945d8a7b0305b5aaf7a31edb6bb23176229c (diff)
downloadchromium_src-5ebe610732ff3d41b2c288e332767ef56d67fcd3.zip
chromium_src-5ebe610732ff3d41b2c288e332767ef56d67fcd3.tar.gz
chromium_src-5ebe610732ff3d41b2c288e332767ef56d67fcd3.tar.bz2
Desktop aura: Break aura::Window::SetParent in two.
Previously, SetParent will query a global StackingClient object if NULL is passed to it. Since we want different behavior on the desktop and on ash, we need to break that. It has been replaced with two methods: - SetParentTo(), which takes an aura window and does the parenting. - SetDefaultParentByTargetRoot(), which takes a RootWindow as context and asks the StackingClient on said RootWindow where it should parent the window. The problem is that people have relied for a long time on what amounts to a global variable. This is the first of several patches that pass around a context RootWindow. This patch focuses on ash/ unittests mostly. Later patches will focus on threading context through Widget creation. The last patch in this series will pull out the global stacking client interface and add DCHECKs so NULL can't be passed to either of these methods on Window. BUG=161882 Review URL: https://chromiumcodereview.appspot.com/11421006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170049 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/shell_unittest.cc')
-rw-r--r--ash/shell_unittest.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/ash/shell_unittest.cc b/ash/shell_unittest.cc
index b762abb..8885320 100644
--- a/ash/shell_unittest.cc
+++ b/ash/shell_unittest.cc
@@ -359,7 +359,7 @@ TEST_F(ShellTest, ToggleAutoHide) {
window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL);
window->SetType(aura::client::WINDOW_TYPE_NORMAL);
window->Init(ui::LAYER_TEXTURED);
- window->SetParent(NULL);
+ SetDefaultParentByPrimaryRootWindow(window.get());
window->Show();
wm::ActivateWindow(window.get());