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

Side by Side Diff: ui/aura/layout_manager.h

Issue 851853002: It is time. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Trying to reup because the last upload failed. Created 5 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
« no previous file with comments | « ui/aura/input_state_lookup_win.cc ('k') | ui/aura/layout_manager.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) 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.
4
5 #ifndef UI_AURA_LAYOUT_MANAGER_H_
6 #define UI_AURA_LAYOUT_MANAGER_H_
7
8 #include "base/basictypes.h"
9 #include "ui/aura/aura_export.h"
10
11 namespace gfx {
12 class Rect;
13 }
14
15 namespace aura {
16 class Window;
17
18 // An interface implemented by an object that places child windows.
19 class AURA_EXPORT LayoutManager {
20 public:
21 LayoutManager();
22 virtual ~LayoutManager();
23
24 // Invoked when the window is resized.
25 virtual void OnWindowResized() = 0;
26
27 // Invoked when the window |child| has been added.
28 virtual void OnWindowAddedToLayout(Window* child) = 0;
29
30 // Invoked prior to removing |window|.
31 virtual void OnWillRemoveWindowFromLayout(Window* child) = 0;
32
33 // Invoked after removing |window|.
34 virtual void OnWindowRemovedFromLayout(Window* child) = 0;
35
36 // Invoked when the |SetVisible()| is invoked on the window |child|.
37 // |visible| is the value supplied to |SetVisible()|. If |visible| is true,
38 // window->IsVisible() may still return false. See description in
39 // Window::IsVisible() for details.
40 virtual void OnChildWindowVisibilityChanged(Window* child, bool visible) = 0;
41
42 // Invoked when |Window::SetBounds| is called on |child|.
43 // Implementation must call |SetChildBoundsDirect| to change the
44 // |child|'s bounds. LayoutManager may modify |requested_bounds|
45 // before applying, or ignore the request.
46 virtual void SetChildBounds(Window* child,
47 const gfx::Rect& requested_bounds) = 0;
48
49 protected:
50 // Sets the child's bounds forcibly. LayoutManager is responsible
51 // for checking the state and make sure the bounds are correctly
52 // adjusted.
53 void SetChildBoundsDirect(aura::Window* child, const gfx::Rect& bounds);
54 };
55
56 } // namespace aura
57
58 #endif // UI_AURA_LAYOUT_MANAGER_H_
OLDNEW
« no previous file with comments | « ui/aura/input_state_lookup_win.cc ('k') | ui/aura/layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698