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

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

Issue 1894593002: Adds WmLayoutManager and the aura wrapper AuraLayoutManagerAdapter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 4 years, 8 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
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_WM_AURA_AURA_LAYOUT_MANAGER_ADAPTER_H_
6 #define ASH_WM_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 namespace wm {
16
17 class WmLayoutManager;
18
19 // AuraLayoutManagerAdapter is an aura::LayoutManager that calls to to
James Cook 2016/04/15 17:44:35 nit: "to to" -> "to" or "into"
sky 2016/04/15 19:26:36 Done.
20 // WmLayoutManager. Use it when you have a WmLayoutManager you want to use
21 // with an aura::Window.
22 class ASH_EXPORT AuraLayoutManagerAdapter : public aura::LayoutManager {
23 public:
24 explicit AuraLayoutManagerAdapter(
25 std::unique_ptr<WmLayoutManager> wm_layout_manager);
26 ~AuraLayoutManagerAdapter() override;
27
28 // aura::LayoutManager:
29 void OnWindowResized() override;
30 void OnWindowAddedToLayout(aura::Window* child) override;
31 void OnWillRemoveWindowFromLayout(aura::Window* child) override;
32 void OnWindowRemovedFromLayout(aura::Window* child) override;
33 void OnChildWindowVisibilityChanged(aura::Window* child,
34 bool visible) override;
35 void SetChildBounds(aura::Window* child,
36 const gfx::Rect& requested_bounds) override;
37
38 private:
39 std::unique_ptr<WmLayoutManager> wm_layout_manager_;
40
41 DISALLOW_COPY_AND_ASSIGN(AuraLayoutManagerAdapter);
42 };
43
44 } // namespace wm
45 } // namespace ash
46
47 #endif // ASH_WM_AURA_AURA_LAYOUT_MANAGER_ADAPTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698