Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: ui/aura/client/transient_window_client.h

Issue 115453004: Moves management of transients out of Window (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove unneeded parens Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/aura/aura.gyp ('k') | ui/aura/client/transient_window_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2014 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.
4
5 #ifndef UI_AURA_CLIENT_TRANSIENT_WINDOW_CLIENT_H_
6 #define UI_AURA_CLIENT_TRANSIENT_WINDOW_CLIENT_H_
7
8 #include "base/basictypes.h"
9 #include "ui/aura/aura_export.h"
10
11 namespace aura {
12
13 class Window;
14
15 namespace client {
16
17 // TransientWindowClient is used to add or remove transient windows. Transient
18 // children get the following behavior:
19 // . The transient parent destroys any transient children when it is
20 // destroyed. This means a transient child is destroyed if either its parent
21 // or transient parent is destroyed.
22 // . If a transient child and its transient parent share the same parent, then
23 // transient children are always ordered above the transient parent.
24 // Transient windows are typically used for popups and menus.
25 // TODO(sky): nuke this class and replace with calls to TransientWindowManager.
26 // This is temporary until we start moving to ui/wm.
27 class AURA_EXPORT TransientWindowClient {
28 public:
29 virtual void AddTransientChild(Window* parent, Window* child) = 0;
30 virtual void RemoveTransientChild(Window* parent, Window* child) = 0;
31 virtual Window* GetTransientParent(Window* window) = 0;
32 virtual const Window* GetTransientParent(const Window* window) = 0;
33
34 protected:
35 virtual ~TransientWindowClient() {}
36 };
37
38 // Sets/gets the TransientWindowClient. This does *not* take ownership of
39 // |client|. It is assumed the caller will invoke SetTransientWindowClient(NULL)
40 // before deleting |client|.
41 AURA_EXPORT void SetTransientWindowClient(TransientWindowClient* client);
42 AURA_EXPORT TransientWindowClient* GetTransientWindowClient();
43
44 } // namespace client
45 } // namespace aura
46
47 #endif // UI_AURA_CLIENT_TRANSIENT_WINDOW_CLIENT_H_
OLDNEW
« no previous file with comments | « ui/aura/aura.gyp ('k') | ui/aura/client/transient_window_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698