summaryrefslogtreecommitdiffstats
path: root/ash/scoped_target_root_window.h
blob: 0e7a8b18d7ca238b40da0c8705ae5e93c83854da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// 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.
#ifndef ASH_SCOPED_TARGET_ROOT_WINDOW_H_
#define ASH_SCOPED_TARGET_ROOT_WINDOW_H_

#include "base/basictypes.h"

namespace aura {
class Window;
}

namespace ash {
namespace internal {

// Constructing a ScopedTargetRootWindow allows temporarily
// switching a target root window so that a new window gets created
// in the same window where a user interaction happened.
// An example usage is to specify the target root window when creating
// a new window using launcher's icon.
class ScopedTargetRootWindow {
 public:
  explicit ScopedTargetRootWindow(aura::Window* root_window);
  ~ScopedTargetRootWindow();

 private:
  DISALLOW_COPY_AND_ASSIGN(ScopedTargetRootWindow);
};

}  // namespace internal
}  // namespace ash

#endif  // ASH_SCOPED_TARGET_ROOT_WINDOW_H_