OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef UI_AURA_DESKTOP_DESKTOP_STACKING_CLIENT_H_ | 5 #ifndef UI_AURA_DESKTOP_DESKTOP_STACKING_CLIENT_H_ |
6 #define UI_AURA_DESKTOP_DESKTOP_STACKING_CLIENT_H_ | 6 #define UI_AURA_DESKTOP_DESKTOP_STACKING_CLIENT_H_ |
7 | 7 |
8 #include "ui/aura/client/stacking_client.h" | 8 #include "ui/aura/client/stacking_client.h" |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/memory/scoped_ptr.h" |
12 #include "ui/aura/aura_export.h" | 13 #include "ui/aura/aura_export.h" |
13 | 14 |
14 namespace aura { | 15 namespace aura { |
| 16 class RootWindow; |
15 class Window; | 17 class Window; |
16 | 18 |
17 // A stacking client for the desktop; always sets the default parent to the | 19 // A stacking client for the desktop; always sets the default parent to the |
18 // RootWindow of the passed in Window. | 20 // RootWindow of the passed in Window. |
19 class AURA_EXPORT DesktopStackingClient : public client::StackingClient { | 21 class AURA_EXPORT DesktopStackingClient : public client::StackingClient { |
20 public: | 22 public: |
21 DesktopStackingClient(); | 23 DesktopStackingClient(); |
22 virtual ~DesktopStackingClient(); | 24 virtual ~DesktopStackingClient(); |
23 | 25 |
24 // Overridden from client::StackingClient: | 26 // Overridden from client::StackingClient: |
25 virtual Window* GetDefaultParent(Window* window) OVERRIDE; | 27 virtual Window* GetDefaultParent(Window* window) OVERRIDE; |
26 | 28 |
| 29 private: |
| 30 // Windows with NULL parents are parented to this. |
| 31 scoped_ptr<aura::RootWindow> null_parent_; |
| 32 |
27 DISALLOW_COPY_AND_ASSIGN(DesktopStackingClient); | 33 DISALLOW_COPY_AND_ASSIGN(DesktopStackingClient); |
28 }; | 34 }; |
29 | 35 |
30 } // namespace aura | 36 } // namespace aura |
31 | 37 |
32 #endif // UI_AURA_DESKTOP_DESKTOP_STACKING_CLIENT_H_ | 38 #endif // UI_AURA_DESKTOP_DESKTOP_STACKING_CLIENT_H_ |
OLD | NEW |