From b42910f2a08d5eb08015f202c18bb05af1575125 Mon Sep 17 00:00:00 2001 From: "oshima@chromium.org" Date: Thu, 1 Aug 2013 11:45:29 +0000 Subject: open new window in the same root window where the launcher was in * Introduced ScopedRootWindowActivator to temporarily switch active root window. BUG=241571 TEST=covered by test Review URL: https://chromiumcodereview.appspot.com/19945008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@215000 0039d316-1c4b-4281-b951-d872f2087c98 --- ash/scoped_target_root_window.cc | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 ash/scoped_target_root_window.cc (limited to 'ash/scoped_target_root_window.cc') diff --git a/ash/scoped_target_root_window.cc b/ash/scoped_target_root_window.cc new file mode 100644 index 0000000..b488a6f --- /dev/null +++ b/ash/scoped_target_root_window.cc @@ -0,0 +1,21 @@ +// Copyright 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +#include "ash/scoped_target_root_window.h" + +#include "ash/shell.h" + +namespace ash { +namespace internal { + +ScopedTargetRootWindow::ScopedTargetRootWindow( + aura::RootWindow* root_window) { + Shell::GetInstance()->scoped_target_root_window_ = root_window; +} + +ScopedTargetRootWindow::~ScopedTargetRootWindow() { + Shell::GetInstance()->scoped_target_root_window_ = NULL; +} + +} // namespace internal +} // namespace ash -- cgit v1.1