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

Side by Side Diff: ash/aura/aura_layout_manager_adapter.h

Issue 2871813002: Converts remaining usage of WmLayoutManager to aura::LayoutManager (Closed)
Patch Set: cleanup Created 3 years, 7 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 | « ash/BUILD.gn ('k') | ash/aura/aura_layout_manager_adapter.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 2016 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 ASH_AURA_AURA_LAYOUT_MANAGER_ADAPTER_H_
6 #define ASH_AURA_AURA_LAYOUT_MANAGER_ADAPTER_H_
7
8 #include <memory>
9
10 #include "ash/ash_export.h"
11 #include "base/macros.h"
12 #include "ui/aura/layout_manager.h"
13
14 namespace ash {
15
16 class WmLayoutManager;
17
18 // AuraLayoutManagerAdapter is an aura::LayoutManager that calls to
19 // WmLayoutManager. Use it when you have a WmLayoutManager you want to use
20 // with an aura::Window.
21 class ASH_EXPORT AuraLayoutManagerAdapter : public aura::LayoutManager {
22 public:
23 AuraLayoutManagerAdapter(aura::Window* window,
24 std::unique_ptr<WmLayoutManager> wm_layout_manager);
25 ~AuraLayoutManagerAdapter() override;
26
27 // Returns the AuraLayoutManagerAdapter installed on |window|, or null if
28 // an AuraLayoutManagerAdapter is not installed on |window|.
29 static AuraLayoutManagerAdapter* Get(aura::Window* window);
30
31 WmLayoutManager* wm_layout_manager() { return wm_layout_manager_.get(); }
32
33 // aura::LayoutManager:
34 void OnWindowResized() override;
35 void OnWindowAddedToLayout(aura::Window* child) override;
36 void OnWillRemoveWindowFromLayout(aura::Window* child) override;
37 void OnWindowRemovedFromLayout(aura::Window* child) override;
38 void OnChildWindowVisibilityChanged(aura::Window* child,
39 bool visible) override;
40 void SetChildBounds(aura::Window* child,
41 const gfx::Rect& requested_bounds) override;
42
43 private:
44 aura::Window* window_;
45 std::unique_ptr<WmLayoutManager> wm_layout_manager_;
46
47 DISALLOW_COPY_AND_ASSIGN(AuraLayoutManagerAdapter);
48 };
49
50 } // namespace ash
51
52 #endif // ASH_AURA_AURA_LAYOUT_MANAGER_ADAPTER_H_
OLDNEW
« no previous file with comments | « ash/BUILD.gn ('k') | ash/aura/aura_layout_manager_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698