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

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

Issue 2438853002: Renames aura::client::WindowTreeClient to WindowParentingClient (Closed)
Patch Set: cleanup Created 4 years, 2 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
« no previous file with comments | « ui/aura/BUILD.gn ('k') | ui/aura/client/window_parenting_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
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_CLIENT_WINDOW_TREE_CLIENT_H_ 5 #ifndef UI_AURA_CLIENT_WINDOW_PARENTING_CLIENT_H_
6 #define UI_AURA_CLIENT_WINDOW_TREE_CLIENT_H_ 6 #define UI_AURA_CLIENT_WINDOW_PARENTING_CLIENT_H_
7 7
8 #include "ui/aura/aura_export.h" 8 #include "ui/aura/aura_export.h"
9 9
10 namespace gfx { 10 namespace gfx {
11 class Rect; 11 class Rect;
12 } 12 }
13 13
14 namespace aura { 14 namespace aura {
15 class Window; 15 class Window;
16 namespace client { 16 namespace client {
17 17
18 // Implementations of this object are used to help locate a default parent for 18 // Implementations of this object are used to help locate a default parent for
19 // NULL-parented Windows. 19 // NULL-parented Windows.
20 class AURA_EXPORT WindowTreeClient { 20 class AURA_EXPORT WindowParentingClient {
21 public: 21 public:
22 virtual ~WindowTreeClient() {} 22 virtual ~WindowParentingClient() {}
23 23
24 // Called by the Window when it looks for a default parent. Returns the 24 // Called by the Window when it looks for a default parent. Returns the
25 // window that |window| should be added to instead. |context| provides a 25 // window that |window| should be added to instead. |context| provides a
26 // Window (generally a RootWindow) that can be used to determine which 26 // Window (generally a RootWindow) that can be used to determine which
27 // desktop type the default parent should be chosen from. NOTE: this may 27 // desktop type the default parent should be chosen from. NOTE: this may
28 // have side effects. It should only be used when |window| is going to be 28 // have side effects. It should only be used when |window| is going to be
29 // immediately added. 29 // immediately added.
30 // 30 //
31 // TODO(erg): Remove |context|, and maybe after oshima's patch lands, 31 // TODO(erg): Remove |context|, and maybe after oshima's patch lands,
32 // |bounds|. 32 // |bounds|.
33 virtual Window* GetDefaultParent( 33 virtual Window* GetDefaultParent(Window* context,
34 Window* context, 34 Window* window,
35 Window* window, 35 const gfx::Rect& bounds) = 0;
36 const gfx::Rect& bounds) = 0;
37 }; 36 };
38 37
39 // Set/Get a window tree client for the RootWindow containing |window|. |window| 38 // Set/Get a window tree client for the RootWindow containing |window|. |window|
40 // must not be NULL. 39 // must not be NULL.
41 AURA_EXPORT void SetWindowTreeClient(Window* window, 40 AURA_EXPORT void SetWindowParentingClient(
42 WindowTreeClient* window_tree_client); 41 Window* window,
43 WindowTreeClient* GetWindowTreeClient(Window* window); 42 WindowParentingClient* window_tree_client);
43 WindowParentingClient* GetWindowParentingClient(Window* window);
44 44
45 // Adds |window| to an appropriate parent by consulting an implementation of 45 // Adds |window| to an appropriate parent by consulting an implementation of
46 // WindowTreeClient attached at the root Window containing |context|. The final 46 // WindowParentingClient attached at the root Window containing |context|. The
47 // final
47 // location may be a window hierarchy other than the one supplied via 48 // location may be a window hierarchy other than the one supplied via
48 // |context|, which must not be NULL. |screen_bounds| may be empty. 49 // |context|, which must not be NULL. |screen_bounds| may be empty.
49 AURA_EXPORT void ParentWindowWithContext(Window* window, 50 AURA_EXPORT void ParentWindowWithContext(Window* window,
50 Window* context, 51 Window* context,
51 const gfx::Rect& screen_bounds); 52 const gfx::Rect& screen_bounds);
52 53
53 } // namespace client 54 } // namespace client
54 } // namespace aura 55 } // namespace aura
55 56
56 #endif // UI_AURA_CLIENT_WINDOW_TREE_CLIENT_H_ 57 #endif // UI_AURA_CLIENT_WINDOW_PARENTING_CLIENT_H_
OLDNEW
« no previous file with comments | « ui/aura/BUILD.gn ('k') | ui/aura/client/window_parenting_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698