Separate Simple Backend creation from initialization.
[chromium-blink-merge.git] / ui / aura / client / stacking_client.h
blob89f83eb460193037e7ac68be4e6188476e4a4f65
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef UI_AURA_CLIENT_STACKING_CLIENT_H_
6 #define UI_AURA_CLIENT_STACKING_CLIENT_H_
8 #include "ui/aura/aura_export.h"
10 namespace gfx {
11 class Rect;
14 namespace aura {
15 class Window;
16 namespace client {
18 // An interface implemented by an object that stacks windows.
19 class AURA_EXPORT StackingClient {
20 public:
21 virtual ~StackingClient() {}
23 // Called by the Window when it looks for a default parent. Returns the
24 // window that |window| should be added to instead. |context| provides a
25 // Window (generally a RootWindow) that can be used to determine which
26 // desktop type the default parent should be chosen from. NOTE: this may
27 // have side effects. It should only be used when |window| is going to be
28 // immediately added.
30 // TODO(erg): Remove |context|, and maybe after oshima's patch lands,
31 // |bounds|.
32 virtual Window* GetDefaultParent(
33 Window* context,
34 Window* window,
35 const gfx::Rect& bounds) = 0;
38 // Set/Get a stacking client for a specific window. Setting the stacking client
39 // sets the stacking client on the window's RootWindow, not the window itself.
40 // Likewise getting obtains it from the window's RootWindow. If |window| is
41 // non-NULL it must be in a RootWindow. If |window| is NULL, the default
42 // stacking client is used.
43 AURA_EXPORT void SetStackingClient(Window* window,
44 StackingClient* stacking_client);
45 StackingClient* GetStackingClient(Window* window);
47 } // namespace client
48 } // namespace aura
50 #endif // UI_AURA_CLIENT_STACKING_CLIENT_H_