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

Unified Diff: ash/wm/aura/aura_layout_manager_adapter.cc

Issue 1894593002: Adds WmLayoutManager and the aura wrapper AuraLayoutManagerAdapter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge and feedback 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/wm/aura/aura_layout_manager_adapter.h ('k') | ash/wm/common/wm_layout_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/aura/aura_layout_manager_adapter.cc
diff --git a/ash/wm/aura/aura_layout_manager_adapter.cc b/ash/wm/aura/aura_layout_manager_adapter.cc
new file mode 100644
index 0000000000000000000000000000000000000000..3bc0bc831ace815c66a5043d4452ed220db390a9
--- /dev/null
+++ b/ash/wm/aura/aura_layout_manager_adapter.cc
@@ -0,0 +1,51 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ash/wm/aura/aura_layout_manager_adapter.h"
+
+#include "ash/wm/aura/wm_window_aura.h"
+#include "ash/wm/common/wm_layout_manager.h"
+
+namespace ash {
+namespace wm {
+
+AuraLayoutManagerAdapter::AuraLayoutManagerAdapter(
+ std::unique_ptr<WmLayoutManager> wm_layout_manager)
+ : wm_layout_manager_(std::move(wm_layout_manager)) {}
+
+AuraLayoutManagerAdapter::~AuraLayoutManagerAdapter() {}
+
+void AuraLayoutManagerAdapter::OnWindowResized() {
+ wm_layout_manager_->OnWindowResized();
+}
+
+void AuraLayoutManagerAdapter::OnWindowAddedToLayout(aura::Window* child) {
+ wm_layout_manager_->OnWindowAddedToLayout(WmWindowAura::Get(child));
+}
+
+void AuraLayoutManagerAdapter::OnWillRemoveWindowFromLayout(
+ aura::Window* child) {
+ wm_layout_manager_->OnWillRemoveWindowFromLayout(WmWindowAura::Get(child));
+}
+
+void AuraLayoutManagerAdapter::OnWindowRemovedFromLayout(aura::Window* child) {
+ wm_layout_manager_->OnWindowRemovedFromLayout(WmWindowAura::Get(child));
+}
+
+void AuraLayoutManagerAdapter::OnChildWindowVisibilityChanged(
+ aura::Window* child,
+ bool visible) {
+ wm_layout_manager_->OnChildWindowVisibilityChanged(WmWindowAura::Get(child),
+ visible);
+}
+
+void AuraLayoutManagerAdapter::SetChildBounds(
+ aura::Window* child,
+ const gfx::Rect& requested_bounds) {
+ wm_layout_manager_->SetChildBounds(WmWindowAura::Get(child),
+ requested_bounds);
+}
+
+} // namespace wm
+} // namespace ash
« no previous file with comments | « ash/wm/aura/aura_layout_manager_adapter.h ('k') | ash/wm/common/wm_layout_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698