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

Unified Diff: ash/aura/aura_layout_manager_adapter.cc

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/aura/aura_layout_manager_adapter.h ('k') | ash/keyboard/keyboard_observer_register.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/aura/aura_layout_manager_adapter.cc
diff --git a/ash/aura/aura_layout_manager_adapter.cc b/ash/aura/aura_layout_manager_adapter.cc
deleted file mode 100644
index 140cad9800e0277212c1eeeaf4f13cc1ffbdbdcc..0000000000000000000000000000000000000000
--- a/ash/aura/aura_layout_manager_adapter.cc
+++ /dev/null
@@ -1,73 +0,0 @@
-// 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/aura/aura_layout_manager_adapter.h"
-
-#include "ash/wm_layout_manager.h"
-#include "ash/wm_window.h"
-#include "ui/aura/window.h"
-#include "ui/base/class_property.h"
-
-DECLARE_UI_CLASS_PROPERTY_TYPE(ash::AuraLayoutManagerAdapter*);
-
-namespace ash {
-namespace {
-// AuraLayoutManagerAdapter is an aura::LayoutManager, so it's owned by the
-// aura::Window it is installed on. This property is used to lookup the
-// AuraLayoutManagerAdapter given only an aura::Window.
-DEFINE_UI_CLASS_PROPERTY_KEY(AuraLayoutManagerAdapter*,
- kAuraLayoutManagerAdapter,
- nullptr);
-} // namespace
-
-AuraLayoutManagerAdapter::AuraLayoutManagerAdapter(
- aura::Window* window,
- std::unique_ptr<WmLayoutManager> wm_layout_manager)
- : window_(window), wm_layout_manager_(std::move(wm_layout_manager)) {
- window->SetProperty(kAuraLayoutManagerAdapter, this);
-}
-
-AuraLayoutManagerAdapter::~AuraLayoutManagerAdapter() {
- // Only one AuraLayoutManagerAdapter is created per window at a time, so this
- // AuraLayoutManagerAdapter should be the installed AuraLayoutManagerAdapter.
- DCHECK_EQ(this, window_->GetProperty(kAuraLayoutManagerAdapter));
- window_->ClearProperty(kAuraLayoutManagerAdapter);
-}
-
-// static
-AuraLayoutManagerAdapter* AuraLayoutManagerAdapter::Get(aura::Window* window) {
- return window->GetProperty(kAuraLayoutManagerAdapter);
-}
-
-void AuraLayoutManagerAdapter::OnWindowResized() {
- wm_layout_manager_->OnWindowResized();
-}
-
-void AuraLayoutManagerAdapter::OnWindowAddedToLayout(aura::Window* child) {
- wm_layout_manager_->OnWindowAddedToLayout(WmWindow::Get(child));
-}
-
-void AuraLayoutManagerAdapter::OnWillRemoveWindowFromLayout(
- aura::Window* child) {
- wm_layout_manager_->OnWillRemoveWindowFromLayout(WmWindow::Get(child));
-}
-
-void AuraLayoutManagerAdapter::OnWindowRemovedFromLayout(aura::Window* child) {
- wm_layout_manager_->OnWindowRemovedFromLayout(WmWindow::Get(child));
-}
-
-void AuraLayoutManagerAdapter::OnChildWindowVisibilityChanged(
- aura::Window* child,
- bool visible) {
- wm_layout_manager_->OnChildWindowVisibilityChanged(WmWindow::Get(child),
- visible);
-}
-
-void AuraLayoutManagerAdapter::SetChildBounds(
- aura::Window* child,
- const gfx::Rect& requested_bounds) {
- wm_layout_manager_->SetChildBounds(WmWindow::Get(child), requested_bounds);
-}
-
-} // namespace ash
« no previous file with comments | « ash/aura/aura_layout_manager_adapter.h ('k') | ash/keyboard/keyboard_observer_register.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698