| Index: ash/wm/workspace/workspace_layout_manager.cc
|
| diff --git a/ash/wm/workspace/workspace_layout_manager.cc b/ash/wm/workspace/workspace_layout_manager.cc
|
| deleted file mode 100644
|
| index 2cf5e6e2b1bac5f05b41a3e78494c3723887078e..0000000000000000000000000000000000000000
|
| --- a/ash/wm/workspace/workspace_layout_manager.cc
|
| +++ /dev/null
|
| @@ -1,116 +0,0 @@
|
| -// Copyright (c) 2012 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/workspace/workspace_layout_manager.h"
|
| -
|
| -#include "ash/screen_ash.h"
|
| -#include "ash/wm/window_properties.h"
|
| -#include "ash/wm/window_util.h"
|
| -#include "ash/wm/workspace/workspace.h"
|
| -#include "ash/wm/workspace/workspace_manager.h"
|
| -#include "ui/aura/client/aura_constants.h"
|
| -#include "ui/aura/root_window.h"
|
| -#include "ui/aura/window.h"
|
| -#include "ui/aura/window_observer.h"
|
| -#include "ui/base/events/event.h"
|
| -#include "ui/base/ui_base_types.h"
|
| -#include "ui/gfx/rect.h"
|
| -
|
| -namespace ash {
|
| -namespace internal {
|
| -
|
| -WorkspaceLayoutManager::WorkspaceLayoutManager(
|
| - aura::RootWindow* root_window,
|
| - WorkspaceManager* workspace_manager)
|
| - : BaseLayoutManager(root_window),
|
| - workspace_manager_(workspace_manager) {
|
| -}
|
| -
|
| -WorkspaceLayoutManager::~WorkspaceLayoutManager() {
|
| -}
|
| -
|
| -void WorkspaceLayoutManager::OnWindowResized() {
|
| - // Workspace is updated via OnRootWindowResized.
|
| -}
|
| -
|
| -void WorkspaceLayoutManager::OnWindowAddedToLayout(aura::Window* child) {
|
| - BaseLayoutManager::OnWindowAddedToLayout(child);
|
| - if (!workspace_manager_->ShouldManageWindow(child)) {
|
| - if (child->IsVisible())
|
| - workspace_manager_->UpdateShelfVisibility();
|
| - return;
|
| - }
|
| -
|
| - if (child->IsVisible())
|
| - workspace_manager_->AddWindow(child);
|
| -}
|
| -
|
| -void WorkspaceLayoutManager::OnWillRemoveWindowFromLayout(aura::Window* child) {
|
| - workspace_manager_->RemoveWindow(child);
|
| - BaseLayoutManager::OnWillRemoveWindowFromLayout(child);
|
| -}
|
| -
|
| -void WorkspaceLayoutManager::OnWindowRemovedFromLayout(aura::Window* child) {
|
| - workspace_manager_->UpdateShelfVisibility();
|
| - BaseLayoutManager::OnWindowRemovedFromLayout(child);
|
| -}
|
| -
|
| -void WorkspaceLayoutManager::OnChildWindowVisibilityChanged(
|
| - aura::Window* child,
|
| - bool visible) {
|
| - BaseLayoutManager::OnChildWindowVisibilityChanged(child, visible);
|
| - if (!workspace_manager_->ShouldManageWindow(child)) {
|
| - workspace_manager_->UpdateShelfVisibility();
|
| - return;
|
| - }
|
| -
|
| - if (visible)
|
| - workspace_manager_->AddWindow(child);
|
| - else
|
| - workspace_manager_->RemoveWindow(child);
|
| -}
|
| -
|
| -void WorkspaceLayoutManager::SetChildBounds(
|
| - aura::Window* child,
|
| - const gfx::Rect& requested_bounds) {
|
| - if (GetTrackedByWorkspace(child))
|
| - BaseLayoutManager::SetChildBounds(child, requested_bounds);
|
| - else
|
| - SetChildBoundsDirect(child, requested_bounds);
|
| - workspace_manager_->UpdateShelfVisibility();
|
| -}
|
| -
|
| -void WorkspaceLayoutManager::OnWindowPropertyChanged(aura::Window* window,
|
| - const void* key,
|
| - intptr_t old) {
|
| - BaseLayoutManager::OnWindowPropertyChanged(window, key, old);
|
| - if (key == ash::internal::kWindowTrackedByWorkspaceKey &&
|
| - ash::GetTrackedByWorkspace(window)) {
|
| - // We currently don't need to support transitioning from true to false, so
|
| - // we ignore it.
|
| - workspace_manager_->AddWindow(window);
|
| - }
|
| -}
|
| -
|
| -void WorkspaceLayoutManager::ShowStateChanged(
|
| - aura::Window* window,
|
| - ui::WindowShowState last_show_state) {
|
| - if (workspace_manager_->ShouldManageWindow(window)) {
|
| - if (wm::IsWindowMinimized(window)) {
|
| - workspace_manager_->RemoveWindow(window);
|
| - } else if ((window->TargetVisibility() ||
|
| - last_show_state == ui::SHOW_STATE_MINIMIZED) &&
|
| - !workspace_manager_->Contains(window)) {
|
| - workspace_manager_->AddWindow(window);
|
| - }
|
| - }
|
| - BaseLayoutManager::ShowStateChanged(window, last_show_state);
|
| - workspace_manager_->ShowStateChanged(window);
|
| - // As BaseLayoutManager::ShowStateChanged() may change the visibility of the
|
| - // window we need to invoke UpdateShelfVisibility() after ShowStateChanged().
|
| - workspace_manager_->UpdateShelfVisibility();
|
| -}
|
| -
|
| -} // namespace internal
|
| -} // namespace ash
|
|
|