summaryrefslogtreecommitdiffstats
path: root/ash/scoped_target_root_window.h
blob: c0ab7ef7557b861d32ee7c8c61081d38a38057c5 (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
34
// 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 "ash/ash_export.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 ASH_EXPORT 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_